DynBindModelExamples: Difference between revisions

From EiffelStudio: an EiffelSoftware project
Jump to navigation Jump to search
Konradm (talk | contribs)
Konradm (talk | contribs)
Line 33: Line 33:
       select f1 end
       select f1 end
   C1  
   C1  
       rename f1 as f3, g as g3
       redefine f1, g1
      redefine f3, g3
       select g1 end
       select g3 end
feature
feature
   f3 do ... end
   f1 do ... end
   g3 do ... end
   g1 do ... end
end
end
</code>
</code>
Line 48: Line 47:
   C_1 \mapsto \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},  
   C_1 \mapsto \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},  
   C_2 \mapsto \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},
   C_2 \mapsto \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},
   C_3 \mapsto \left\{ f_3 \mapsto \underline{C_3.f_3}, g_3 \mapsto \underline{C_3.g_3} \right\}
   C_3 \mapsto \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1} \right\}
\right\}
\right\}
</math>
</math>
Line 55: Line 54:
   C_2 \mapsto \left\{  
   C_2 \mapsto \left\{  
       C_1 \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}  
       C_1 \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}  
  \right\},
  C3 \mapsto \left\{
      C2 \mapsto \left\{ f1 \mapsto f3, f \mapsto f3 \right\}
   \right\}
   \right\}
\right\}
\right\}
</math>
</math>
*<math>\alpha = \left\{
*<math>\alpha = \left\{
   C \mapsto \left\{ B \right\},
   C_2 \mapsto \left\{ C_1 \right\},
   D \mapsto \left\{ B, C \right\}
   C_3 \mapsto \left\{ C_2, C_1 \right\}
\right\}
\right\}
</math>
</math>
*<math>\sigma = \left\{
*<math>\sigma = \left\{
   D \mapsto \left\{ C \mapsto \left\{ f1 \right\} \right\}
   C_3 \mapsto \left\{ C_2 \mapsto \left\{ f_1 \right\}, C_2 \mapsto \left\{ g_1 \right\} \right\}
\right\}
\right\}
</math>
</math>

Revision as of 18:48, 6 October 2006

This page shows

F

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

We get:

  • S={C1,C2,C3}
  • τ={C1↦{f1↦C1.f1_,g1↦C1.g1_},C2↦{f2↦C2.f2_,g2↦C2.g2_},C3↦{f1↦C3.f1_,g1↦C3.g1_}}
  • η={C2↦{C1↦{f1↦f2,g1↦g2}}}
  • α={C2↦{C1},C3↦{C2,C1}}
  • σ={C3↦{C2↦{f1},C2↦{g1}}}