DynBindModelExamples: Difference between revisions
Jump to navigation
Jump to search
| Line 131: | Line 131: | ||
\mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2 | \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2 | ||
\ |\ | \ |\ | ||
\beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b}\right) | \mbox{id}\left(\mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right) | ||
\right) | |||
</math> | </math> | ||
Lets calculate the left part first: | |||
#<math> | #<math> | ||
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} | \tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} | ||
| Line 141: | Line 143: | ||
\mbox{id} \left( \mbox{dom} \left( \tau_2 \right) \right) = \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\} | \mbox{id} \left( \mbox{dom} \left( \tau_2 \right) \right) = \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\} | ||
</math> | </math> | ||
And now the right part: | |||
#<math> | #<math> | ||
\mbox {UNION} \ b \, \cdot \, \left(b \in \ | \mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\} | ||
\ |\ | \ |\ | ||
\beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b}\right) | \mbox{id}\left(\mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)\right) | ||
= | = | ||
\mbox { | \mbox{id}\left(\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)\right) | ||
</math> | </math> | ||
#<math> | #<math> | ||
| Line 164: | Line 165: | ||
= | = | ||
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} | \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} | ||
</math> | |||
#<math> | |||
\mbox{id}\left(\mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) \right) | |||
= | |||
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\} | |||
</math> | </math> | ||
Revision as of 16:46, 9 October 2006
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
Lets calculate the easy part first:
The next least difficult thing we can calculate is:
Lets calculate the left part first:
And now the right part: