|
|
| Line 124: |
Line 124: |
| </math> | | </math> |
|
| |
|
| The next least difficult thing we can calculate is:
| | ====Calculate <math>\beta_{S_2}\left( C_2 \mapsto C_2 \right)</math>==== |
|
| |
|
| *<math> | | *<math> |
This page shows
Example 1
The system
In this example we are studying a symple system with three classes that contains both renaming and selects:
class
C1
feature
f1 do ... end
g1 do ... end
end
|
class
C2
inherit
B
rename f1 as f2, g1 as g2
redefine f2, g2 end
feature
f2 do ... end
g2 do ... end
end
|
class
C3
inherit
C2
select f1 end
C1
redefine f1, g1
select g1 end
feature
f1 do ... end
g1 do ... end
end
|
This system is defined by:
The naming function
We proceed by calculating the naming function. According to its definition we have to do that incrementaly. Meaning that we first calculate then and finally .
Calculating
Since contains only one class it is sufficient to define . According to the definition:
We can forget about the right part of the union since has no base classes. So we need to calculate:
.
This done we calculate:
So we get:
Calculating
We show the calculation of the different (four) parts of the function in separate sections:
Calculate
Calculate
Calculate
Lets calculate the left part first:
And now the right part:
So we get:
And finally we calculate:
By first calculating:
-
Next we need to calculate:
So:
And:
By putting the parts together we get:
|
|
|
|
|
|
|
|
|
|
|
|
Calculating
We will not show the complete construction of but restrict our self to the most interesting part: