DynBindModelExamples: Difference between revisions

From EiffelStudio: an EiffelSoftware project
Jump to navigation Jump to search
Konradm (talk | contribs)
Konradm (talk | contribs)
Line 1: Line 1:
This page shows
This page shows


====F====
==Example 1==
=====The system====
{|border="0" cellpadding="2" cellspacing="0" align="center"
{|border="0" cellpadding="2" cellspacing="0" align="center"
|-valign="top" -halign="center"
|-valign="top" -halign="center"

Revision as of 18:50, 6 October 2006

This page shows

Example 1

=The system

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}}}