<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Konradm</id>
		<title>EiffelStudio: an EiffelSoftware project - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Konradm"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/Special:Contributions/Konradm"/>
		<updated>2026-06-09T06:44:38Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Melting_Ice_Technology&amp;diff=7289</id>
		<title>Melting Ice Technology</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Melting_Ice_Technology&amp;diff=7289"/>
				<updated>2007-01-30T10:51:05Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The interpreter and the byte code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Compiler]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
====Introduction====&lt;br /&gt;
There are two main criteria for any good compiler. Both the compilation and the compiled program need to be fast. There is a trade off, the more time a compiler takes to make optimizations, the faster the compiled program is and the slower the compilation process becomes. &lt;br /&gt;
&lt;br /&gt;
Fortunately the need for fast compilation and fast compiled programs occurs at different times during the development cycle. When the developer is incrementally writing and testing a program he needs short compilation time to be productive. At the end, when his work is thoroughly tested and ready to ship there can be a slower compilation that generates a very fast delivery. &lt;br /&gt;
&lt;br /&gt;
EiffelStudio exploits this by providing two basic compilation modes: workbench and finalized mode. &lt;br /&gt;
The C code generated by the compiler looks different for workbench and finalized mode. The terms workbench code and finalized code are used to refer to the corresponding generated C code.&lt;br /&gt;
&lt;br /&gt;
Workbench code has the following properties:&lt;br /&gt;
* It is easily testable (by debugging).&lt;br /&gt;
* It compiles and recompiles very fast (due to melting ice technology).&lt;br /&gt;
* It supports precompiles.&lt;br /&gt;
&lt;br /&gt;
Finalized code has only two advantages, smallness and speed. Whereas the former contributes to the latter due too better cache efficiency. Finalized code can only be debugged at the C level. This article focuses on the workbench mode of EiffelStudio&lt;br /&gt;
&lt;br /&gt;
====Compiled versus interpreted====&lt;br /&gt;
EiffelStudio was designed with the following principle in mind: When a programmer makes a small change he expects a short recompilation time, when he makes a big change he will accept some waiting time. &lt;br /&gt;
&lt;br /&gt;
Traditionally, the fastest programming environments (in terms of recompilation time) were interpreted languages (like VisualBasic). Unfortunately interpreted languages are not competitive performance wise. &lt;br /&gt;
&lt;br /&gt;
The designers of EiffelStudio circumnavigated the trade off by taking the best of both approaches. Thus, in workbench mode EiffelStudio is half compiler and half interpreter. The technology behind this is called melting ice. &lt;br /&gt;
&lt;br /&gt;
An Eiffel System compiled in workbench mode consists of both frozen and melted code. Frozen code is code, that is translated to C code. Melted code is not yet translated to C code but to a form of byte code that has to be interpreted. This byte code is called EiffelStudio byte code (EBC).&lt;br /&gt;
&lt;br /&gt;
This yields two requirements to the EiffelStudio runtime. It needs both to be able to execute the EiffelStudio byte code and to handle calls from frozen code into melted code and vice versa.&lt;br /&gt;
&lt;br /&gt;
====The interpreter and the byte code====&lt;br /&gt;
The EiffelStudio byte code interpreter is a stack machine. The byte code itself is not very different from .NET byte code or Java Byte Code. &lt;br /&gt;
&lt;br /&gt;
This article won't explain the byte codes. This is partially done in [[Byte Code]]. To give a general idea the Fibonacci feature and its EiffelStudio byte code are shown:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]fibonacci (n: INTEGER): INTEGER&lt;br /&gt;
   require&lt;br /&gt;
      n &amp;gt;= 0&lt;br /&gt;
   do&lt;br /&gt;
      if n = 0 then&lt;br /&gt;
         Result := 0&lt;br /&gt;
      elseif n = 1 then&lt;br /&gt;
         Result := 1&lt;br /&gt;
      else&lt;br /&gt;
         Result := &lt;br /&gt;
            fibonacci (n - 1) + &lt;br /&gt;
            fibonacci (n - 2)&lt;br /&gt;
      end&lt;br /&gt;
   end&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;  1: BC_START &lt;br /&gt;
Routine Id   : 186&lt;br /&gt;
Body Id      : 185&lt;br /&gt;
Result Type  : [INTEGER_32]&lt;br /&gt;
Nr. args     : 1&lt;br /&gt;
Nr. locals   : 0&lt;br /&gt;
  18: BC_NO_CLONE_ARG &lt;br /&gt;
Routine name : fibonacci&lt;br /&gt;
Written      : 9&lt;br /&gt;
 32: BC_PRECOND offset 23&lt;br /&gt;
 37: BC_HOOK 1&lt;br /&gt;
 42: BC_ASSERT &amp;lt;8, 16&amp;gt;&lt;br /&gt;
 45: BC_ARG 1 &lt;br /&gt;
 48: BC_INT32 0&lt;br /&gt;
 53: BC_GE &lt;br /&gt;
 54: BC_END_PRE offset 0&lt;br /&gt;
 59: BC_RAISE_PREC &lt;br /&gt;
 60: BC_HOOK 2&lt;br /&gt;
 65: BC_ARG 1 &lt;br /&gt;
 68: BC_INT32 0&lt;br /&gt;
 73: BC_EQ &lt;br /&gt;
 74: BC_JMP_F 16&lt;br /&gt;
 79: BC_HOOK 3&lt;br /&gt;
 84: BC_INT32 0&lt;br /&gt;
 89: BC_RASSIGN &lt;br /&gt;
 90: BC_JMP 80&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
 95: BC_HOOK 4&lt;br /&gt;
100: BC_ARG 1 &lt;br /&gt;
103: BC_INT32 1&lt;br /&gt;
108: BC_EQ &lt;br /&gt;
109: BC_JMP_F 16&lt;br /&gt;
114: BC_HOOK 5&lt;br /&gt;
119: BC_INT32 1&lt;br /&gt;
124: BC_RASSIGN &lt;br /&gt;
125: BC_JMP 45&lt;br /&gt;
130: BC_HOOK 6&lt;br /&gt;
135: BC_ARG 1 &lt;br /&gt;
138: BC_INT32 1&lt;br /&gt;
143: BC_MINUS &lt;br /&gt;
144: BC_CURRENT &lt;br /&gt;
145: BC_FEATURE fid 36 [9: HELLO_WORLD]&lt;br /&gt;
154: BC_ARG 1 &lt;br /&gt;
157: BC_INT32 2&lt;br /&gt;
162: BC_MINUS &lt;br /&gt;
163: BC_CURRENT &lt;br /&gt;
164: BC_FEATURE fid 36 [9: HELLO_WORLD]&lt;br /&gt;
173: BC_PLUS &lt;br /&gt;
174: BC_RASSIGN &lt;br /&gt;
175: BC_HOOK 7&lt;br /&gt;
180: BC_NULL &amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The byte code is not that difficult to understand. Most instructions have an effect on the interpreter stack. Instruction 124 for example pops one value from the stack and saves it to the result of the current feature.&lt;br /&gt;
&lt;br /&gt;
====Patterns to call the other side====&lt;br /&gt;
Every feature call in workbench mode is a possible transition out of or into interpreted code. This transitions are handled by so called patterns (term comes from the idea of calling patterns). &lt;br /&gt;
&lt;br /&gt;
Patterns that go out of interpreted code have the prefix ''toc'' (to C code) and the ones that go into interpreted code ''toi'' (to interpreted code).&lt;br /&gt;
&lt;br /&gt;
The following snippet shows the ''toi'' pattern that could be used for the Fibonacci feature (or any other feature that expects an INTEGER_32 as argument and returns an INTEGER_32):&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[c,N]static EIF_INTEGER_32 toi49 (EIF_REFERENCE Current, EIF_INTEGER_32 arg1) {&lt;br /&gt;
	GTCX&lt;br /&gt;
	struct item *it;&lt;br /&gt;
       	it = iget();                // Push arg1 on the interpreters stack &lt;br /&gt;
	it-&amp;gt;type = SK_INT32;           &lt;br /&gt;
	it-&amp;gt;it_int32 = arg1;          &lt;br /&gt;
	it = iget();                // Push Current on the interpreters stack &lt;br /&gt;
	it-&amp;gt;type = SK_REF;             &lt;br /&gt;
	it-&amp;gt;it_ref = Current;&lt;br /&gt;
	xinterp(IC);                // Call the interpreter&lt;br /&gt;
	it = opop();                // Pop the result from the interpreters stack&lt;br /&gt;
	return it-&amp;gt;it_int32;        // Return the result in the C way&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Arguments that were passed to the C function are pushed onto the interpreters stack. After that the interpreter is called and finally the result is popped from the interpreter stack and returned to the caller.&lt;br /&gt;
&lt;br /&gt;
What follows is the pattern that goes out of interpreted code:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[c,N]static void toc49 (fnptr ptr) {    //The patterns expects a pointer to the C function&lt;br /&gt;
	GTCX&lt;br /&gt;
	EIF_REFERENCE Current;&lt;br /&gt;
	EIF_INTEGER_32 result;&lt;br /&gt;
	struct item *it;&lt;br /&gt;
	EIF_INTEGER_32 arg1;&lt;br /&gt;
	Current = opop()-&amp;gt;it_ref;          //The current is popped from the interpreter stack&lt;br /&gt;
	arg1 = opop()-&amp;gt;it_int32;           //arg1 is popped from the interpreter stack&lt;br /&gt;
        //The function is called with the arguments that are popped from the stack.&lt;br /&gt;
	result = (FUNCTION_CAST(EIF_INTEGER_32, (EIF_REFERENCE, EIF_INTEGER_32)) ptr)(Current,arg1);&lt;br /&gt;
	it = iget();                       //The result of the function is pushed onto the interpreters stack&lt;br /&gt;
	it-&amp;gt;type = SK_INT32;&lt;br /&gt;
	it-&amp;gt;it_int32 = result;&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The arguments for the feature call are popped from the interpreters stack. Then the C function for the feature is called before the result is pushed back onto the interpreters stack.&lt;br /&gt;
&lt;br /&gt;
This two patterns need to be available not for every feature in the system but for every signature type. They are generated into the file epattern.c.&lt;br /&gt;
&lt;br /&gt;
====Locating the right pattern====&lt;br /&gt;
In workbench mode every piece of translated code is referenced by its real_body_id. In the runtime the array mpatidtab serves as a function between real_body_id and pattern_id. There is a second array called pattern that makes the mapping between pattern_id and the two function pointers to the ''toi'' and ''toc'' patterns. &lt;br /&gt;
&lt;br /&gt;
So the right pattern ''toi'' could be resolved like:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[c,N]&lt;br /&gt;
pattern [mpatidtab [real_body_id]].toi&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7288</id>
		<title>DynBindModelHaskell</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7288"/>
				<updated>2007-01-30T10:48:03Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
===Some set theory:===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
--Set theory&lt;br /&gt;
import Data.Set&lt;br /&gt;
&lt;br /&gt;
--domain of a relation&lt;br /&gt;
dom :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set a&lt;br /&gt;
dom s = Data.Set.map (\(d, r) -&amp;gt; d) s&lt;br /&gt;
&lt;br /&gt;
--range of a relation&lt;br /&gt;
ran :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set b&lt;br /&gt;
ran s = Data.Set.map (\(d, r) -&amp;gt; r) s&lt;br /&gt;
&lt;br /&gt;
--identity of a set&lt;br /&gt;
ids :: (Ord a) =&amp;gt; Set a -&amp;gt; Set (a, a)&lt;br /&gt;
ids s = Data.Set.map (\e -&amp;gt; (e, e)) s&lt;br /&gt;
&lt;br /&gt;
--domain substraction&lt;br /&gt;
domSub :: (Ord a, Ord b) =&amp;gt; Set a -&amp;gt; Set (a, b) -&amp;gt;  Set (a, b)&lt;br /&gt;
domSub s r = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (notMember e1 s)]&lt;br /&gt;
&lt;br /&gt;
--range restriction&lt;br /&gt;
ranRes :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b) -&amp;gt;  Set (a, b)&lt;br /&gt;
ranRes r s = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (member e2 s)]&lt;br /&gt;
&lt;br /&gt;
--override&lt;br /&gt;
(&amp;lt;&amp;lt;) :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a, b) -&amp;gt; Set (a, b)&lt;br /&gt;
(&amp;lt;&amp;lt;) s t = union t (domSub (dom t) s)&lt;br /&gt;
&lt;br /&gt;
--composition&lt;br /&gt;
comp :: (Ord a, Ord b, Ord c) =&amp;gt;  Set (a, b) -&amp;gt; Set (b, c) -&amp;gt; Set (a, c)&lt;br /&gt;
comp r v = fromList [(e1, e4) | (e1,e2) &amp;lt;- toList r, (e3,e4) &amp;lt;- toList v, e2 == e3 ]&lt;br /&gt;
&lt;br /&gt;
--inverse&lt;br /&gt;
inv :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b, a)&lt;br /&gt;
inv r = fromList [(e2,e1)|(e1,e2) &amp;lt;- toList r]&lt;br /&gt;
&lt;br /&gt;
--relation image&lt;br /&gt;
image :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a) -&amp;gt; Set (b)&lt;br /&gt;
image r w = fromList [e2 |(e1,e2) &amp;lt;-toList r, member e1 w]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
beta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
beta 0 0 0 = empty&lt;br /&gt;
beta m q p | q &amp;gt; p = empty&lt;br /&gt;
	   | p &amp;gt; m = empty&lt;br /&gt;
	   | p &amp;lt; m = beta(m-1) q p&lt;br /&gt;
  	   | q &amp;lt; p = unions [phi m q b | b &amp;lt;- toList (alpha m)] &amp;lt;&amp;lt; &lt;br /&gt;
                     unions [phi m q b `ranRes` sigma m b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
	   | otherwise =  ids (dom (tau m) `union` &lt;br /&gt;
                          unions [ran (beta (m-1) b b &amp;lt;&amp;lt; eta m b) | b &amp;lt;- toList (alpha m)])&lt;br /&gt;
 &lt;br /&gt;
phi :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
phi m q b = beta (m-1) q b `comp` (beta (m-1) b b &amp;lt;&amp;lt; eta m b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
gamma :: Int -&amp;gt; String -&amp;gt; Set (Int, String)&lt;br /&gt;
gamma st fn = fromList [(dt, f)|dt &amp;lt;- [1..n], f &amp;lt;- toList (image (delta n st dt) (fromList [fn]))]&lt;br /&gt;
 &lt;br /&gt;
delta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
delta m q p | p &amp;gt; m = empty&lt;br /&gt;
	    | q &amp;gt; p = empty&lt;br /&gt;
	    | p &amp;lt; m = delta (m-1) q p&lt;br /&gt;
	    | otherwise = beta n q m `comp` (&lt;br /&gt;
		unions [(inv (beta n b b &amp;lt;&amp;lt; eta m b)) `comp` delta (m-1) b b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
		   &amp;lt;&amp;lt; tau m)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An example system===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
tau:: Int -&amp;gt; Set (String, String)&lt;br /&gt;
tau 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;A.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;A.g1&amp;quot;)]&lt;br /&gt;
tau 2 = fromList [(&amp;quot;f2&amp;quot;, &amp;quot;B.f2&amp;quot;), (&amp;quot;g2&amp;quot;, &amp;quot;B.g2&amp;quot;)]&lt;br /&gt;
tau 3 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;D.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;D.g1&amp;quot;)]&lt;br /&gt;
&lt;br /&gt;
eta:: Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
eta 2 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;f2&amp;quot;), (&amp;quot;g1&amp;quot;,&amp;quot;g2&amp;quot;)]&lt;br /&gt;
eta 3 1 = empty&lt;br /&gt;
eta 3 2 = empty&lt;br /&gt;
&lt;br /&gt;
alpha:: Int -&amp;gt; Set (Int)&lt;br /&gt;
alpha 1 = empty&lt;br /&gt;
alpha 2 = insert 1 empty&lt;br /&gt;
alpha 3 = fromList [1, 2]&lt;br /&gt;
&lt;br /&gt;
sigma:: Int -&amp;gt; Int -&amp;gt; Set (String)&lt;br /&gt;
sigma 2 1 = empty&lt;br /&gt;
sigma 3 1 = insert &amp;quot;g1&amp;quot; empty&lt;br /&gt;
sigma 3 2 = insert &amp;quot;f2&amp;quot; empty&lt;br /&gt;
&lt;br /&gt;
n :: Int&lt;br /&gt;
n = 3&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Melting_Ice_Technology&amp;diff=7282</id>
		<title>Melting Ice Technology</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Melting_Ice_Technology&amp;diff=7282"/>
				<updated>2007-01-29T18:16:52Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Compiler]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
====Introduction====&lt;br /&gt;
There are two main criteria for any good compiler. Both the compilation and the compiled program need to be fast. There is a trade off, the more time a compiler takes to make optimizations, the faster the compiled program is and the slower the compilation process becomes. &lt;br /&gt;
&lt;br /&gt;
Fortunately the need for fast compilation and fast compiled programs occurs at different times during the development cycle. When the developer is incrementally writing and testing a program he needs short compilation time to be productive. At the end, when his work is thoroughly tested and ready to ship there can be a slower compilation that generates a very fast delivery. &lt;br /&gt;
&lt;br /&gt;
EiffelStudio exploits this by providing two basic compilation modes: workbench and finalized mode. &lt;br /&gt;
The C code generated by the compiler looks different for workbench and finalized mode. The terms workbench code and finalized code are used to refer to the corresponding generated C code.&lt;br /&gt;
&lt;br /&gt;
Workbench code has the following properties:&lt;br /&gt;
* It is easily testable (by debugging).&lt;br /&gt;
* It compiles and recompiles very fast (due to melting ice technology).&lt;br /&gt;
* It supports precompiles.&lt;br /&gt;
&lt;br /&gt;
Finalized code has only two advantages, smallness and speed. Whereas the former contributes to the latter due too better cache efficiency. Finalized code can only be debugged at the C level. This article focuses on the workbench mode of EiffelStudio&lt;br /&gt;
&lt;br /&gt;
====Compiled versus interpreted====&lt;br /&gt;
EiffelStudio was designed with the following principle in mind: When a programmer makes a small change he expects a short recompilation time, when he makes a big change he will accept some waiting time. &lt;br /&gt;
&lt;br /&gt;
Traditionally, the fastest programming environments (in terms of recompilation time) were interpreted languages (like VisualBasic). Unfortunately interpreted languages are not competitive performance wise. &lt;br /&gt;
&lt;br /&gt;
The designers of EiffelStudio circumnavigated the trade off by taking the best of both approaches. Thus, in workbench mode EiffelStudio is half compiler and half interpreter. The technology behind this is called melting ice. &lt;br /&gt;
&lt;br /&gt;
An Eiffel System compiled in workbench mode consists of both frozen and melted code. Frozen code is code, that is translated to C code. Melted code is not yet translated to C code but to a form of byte code that has to be interpreted. This byte code is called EiffelStudio byte code (EBC).&lt;br /&gt;
&lt;br /&gt;
This yields two requirements to the EiffelStudio runtime. It needs both to be able to execute the EiffelStudio byte code and to handle calls from frozen code into melted code and vice versa.&lt;br /&gt;
&lt;br /&gt;
====The interpreter and the byte code====&lt;br /&gt;
The EiffelStudio byte code interpreter is a stack machine. The byte code itself is not very different from .NET byte code or Java Byte Code. &lt;br /&gt;
&lt;br /&gt;
This article won't explain the byte codes. This is partially done in [[Byte Code]]. To give a general idea the Fibonacci feature and its EiffelStudio byte code are shown:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]fibonacci (n: INTEGER): INTEGER&lt;br /&gt;
   require&lt;br /&gt;
      n &amp;gt;= 0&lt;br /&gt;
   do&lt;br /&gt;
      if n = 0 then&lt;br /&gt;
         Result := 0&lt;br /&gt;
      elseif n = 1 then&lt;br /&gt;
         Result := 1&lt;br /&gt;
      else&lt;br /&gt;
         Result := &lt;br /&gt;
            fibonacci (n - 1) + &lt;br /&gt;
            fibonacci (n - 2)&lt;br /&gt;
      end&lt;br /&gt;
   end&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;  1: BC_START &lt;br /&gt;
Routine Id   : 186&lt;br /&gt;
Body Id      : 185&lt;br /&gt;
Result Type  : [INTEGER_32]&lt;br /&gt;
Nr. args     : 1&lt;br /&gt;
Nr. locals   : 0&lt;br /&gt;
  18: BC_NO_CLONE_ARG &lt;br /&gt;
Routine name : fibonacci&lt;br /&gt;
Written      : 9&lt;br /&gt;
 32: BC_PRECOND offset 23&lt;br /&gt;
 37: BC_HOOK 1&lt;br /&gt;
 42: BC_ASSERT &amp;lt;8, 16&amp;gt;&lt;br /&gt;
 45: BC_ARG 1 &lt;br /&gt;
 48: BC_INT32 0&lt;br /&gt;
 53: BC_GE &lt;br /&gt;
 54: BC_END_PRE offset 0&lt;br /&gt;
 59: BC_RAISE_PREC &lt;br /&gt;
 60: BC_HOOK 2&lt;br /&gt;
 65: BC_ARG 1 &lt;br /&gt;
 68: BC_INT32 0&lt;br /&gt;
 73: BC_EQ &lt;br /&gt;
 74: BC_JMP_F 16&lt;br /&gt;
 79: BC_HOOK 3&lt;br /&gt;
 84: BC_INT32 0&lt;br /&gt;
 89: BC_RASSIGN &lt;br /&gt;
 90: BC_JMP 80&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
 90: BC_JMP 80&lt;br /&gt;
 95: BC_HOOK 4&lt;br /&gt;
100: BC_ARG 1 &lt;br /&gt;
103: BC_INT32 1&lt;br /&gt;
108: BC_EQ &lt;br /&gt;
109: BC_JMP_F 16&lt;br /&gt;
114: BC_HOOK 5&lt;br /&gt;
119: BC_INT32 1&lt;br /&gt;
124: BC_RASSIGN &lt;br /&gt;
125: BC_JMP 45&lt;br /&gt;
130: BC_HOOK 6&lt;br /&gt;
135: BC_ARG 1 &lt;br /&gt;
138: BC_INT32 1&lt;br /&gt;
143: BC_MINUS &lt;br /&gt;
144: BC_CURRENT &lt;br /&gt;
145: BC_FEATURE fid 36 [9: HELLO_WORLD]&lt;br /&gt;
154: BC_ARG 1 &lt;br /&gt;
157: BC_INT32 2&lt;br /&gt;
162: BC_MINUS &lt;br /&gt;
163: BC_CURRENT &lt;br /&gt;
164: BC_FEATURE fid 36 [9: HELLO_WORLD]&lt;br /&gt;
173: BC_PLUS &lt;br /&gt;
174: BC_RASSIGN &lt;br /&gt;
175: BC_HOOK 7&lt;br /&gt;
180: BC_NULL &amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The byte code is not that difficult to understand. Most instructions have an effect on the interpreter stack. Instruction 124 for example pops one value from the stack and saves it to the result of the current feature.&lt;br /&gt;
&lt;br /&gt;
====Patterns to call the other side====&lt;br /&gt;
Every feature call in workbench mode is a possible transition out of or into interpreted code. This transitions are handled by so called patterns (term comes from the idea of calling patterns). &lt;br /&gt;
&lt;br /&gt;
Patterns that go out of interpreted code have the prefix ''toc'' (to C code) and the ones that go into interpreted code ''toi'' (to interpreted code).&lt;br /&gt;
&lt;br /&gt;
The following snippet shows the ''toi'' pattern that could be used for the Fibonacci feature (or any other feature that expects an INTEGER_32 as argument and returns an INTEGER_32):&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[c,N]static EIF_INTEGER_32 toi49 (EIF_REFERENCE Current, EIF_INTEGER_32 arg1) {&lt;br /&gt;
	GTCX&lt;br /&gt;
	struct item *it;&lt;br /&gt;
       	it = iget();                // Push arg1 on the interpreters stack &lt;br /&gt;
	it-&amp;gt;type = SK_INT32;           &lt;br /&gt;
	it-&amp;gt;it_int32 = arg1;          &lt;br /&gt;
	it = iget();                // Push Current on the interpreters stack &lt;br /&gt;
	it-&amp;gt;type = SK_REF;             &lt;br /&gt;
	it-&amp;gt;it_ref = Current;&lt;br /&gt;
	xinterp(IC);                // Call the interpreter&lt;br /&gt;
	it = opop();                // Pop the result from the interpreters stack&lt;br /&gt;
	return it-&amp;gt;it_int32;        // Return the result in the C way&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Arguments that were passed to the C function are pushed onto the interpreters stack. After that the interpreter is called and finally the result is popped from the interpreter stack and returned to the caller.&lt;br /&gt;
&lt;br /&gt;
What follows is the pattern that goes out of interpreted code:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[c,N]static void toc49 (fnptr ptr) {    //The patterns expects a pointer to the C function&lt;br /&gt;
	GTCX&lt;br /&gt;
	EIF_REFERENCE Current;&lt;br /&gt;
	EIF_INTEGER_32 result;&lt;br /&gt;
	struct item *it;&lt;br /&gt;
	EIF_INTEGER_32 arg1;&lt;br /&gt;
	Current = opop()-&amp;gt;it_ref;          //The current is popped from the interpreter stack&lt;br /&gt;
	arg1 = opop()-&amp;gt;it_int32;           //arg1 is popped from the interpreter stack&lt;br /&gt;
        //The function is called with the arguments that are popped from the stack.&lt;br /&gt;
	result = (FUNCTION_CAST(EIF_INTEGER_32, (EIF_REFERENCE, EIF_INTEGER_32)) ptr)(Current,arg1);&lt;br /&gt;
	it = iget();                       //The result of the function is pushed onto the interpreters stack&lt;br /&gt;
	it-&amp;gt;type = SK_INT32;&lt;br /&gt;
	it-&amp;gt;it_int32 = result;&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The arguments for the feature call are popped from the interpreters stack. Then the C function for the feature is called before the result is pushed back onto the interpreters stack.&lt;br /&gt;
&lt;br /&gt;
This two patterns need to be available not for every feature in the system but for every signature type. They are generated into the file epattern.c.&lt;br /&gt;
&lt;br /&gt;
====Locating the right pattern====&lt;br /&gt;
In workbench mode every piece of translated code is referenced by its real_body_id. In the runtime the array mpatidtab serves as a function between real_body_id and pattern_id. There is a second array called pattern that makes the mapping between pattern_id and the two function pointers to the ''toi'' and ''toc'' patterns. &lt;br /&gt;
&lt;br /&gt;
So the right pattern ''toi'' could be resolved like:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[c,N]&lt;br /&gt;
pattern [mpatidtab [real_body_id]].toi&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7281</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7281"/>
				<updated>2007-01-29T17:06:20Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Some shortcuts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7280</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7280"/>
				<updated>2007-01-29T17:06:03Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Some shortcuts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_m&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7279</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7279"/>
				<updated>2007-01-29T17:05:36Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The full example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7278</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7278"/>
				<updated>2007-01-29T16:58:27Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The full example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   S_m = \left\{ C_1 \ldots C_m \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7277</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7277"/>
				<updated>2007-01-29T16:57:29Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7276</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7276"/>
				<updated>2007-01-28T23:37:39Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* A model for an Eiffel System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7275</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7275"/>
				<updated>2007-01-28T23:17:41Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The direct inheritance function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7274</id>
		<title>DynBindModelHaskell</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7274"/>
				<updated>2007-01-28T19:45:17Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* An example system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
===Some set theory:===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
--Set theory&lt;br /&gt;
import Data.Set&lt;br /&gt;
&lt;br /&gt;
--domain of a relation&lt;br /&gt;
dom :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set a&lt;br /&gt;
dom s = Data.Set.map (\(d, r) -&amp;gt; d) s&lt;br /&gt;
&lt;br /&gt;
--range of a relation&lt;br /&gt;
ran :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set b&lt;br /&gt;
ran s = Data.Set.map (\(d, r) -&amp;gt; r) s&lt;br /&gt;
&lt;br /&gt;
--identity of a set&lt;br /&gt;
ids :: (Ord a) =&amp;gt; Set a -&amp;gt; Set (a, a)&lt;br /&gt;
ids s = Data.Set.map (\e -&amp;gt; (e, e)) s&lt;br /&gt;
&lt;br /&gt;
--domain substraction&lt;br /&gt;
domSub :: (Ord a, Ord b) =&amp;gt; Set a -&amp;gt; Set (a, b) -&amp;gt;  Set (a, b)&lt;br /&gt;
domSub s r = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (notMember e1 s)]&lt;br /&gt;
&lt;br /&gt;
--range restriction&lt;br /&gt;
ranRes :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b) -&amp;gt;  Set (a, b)&lt;br /&gt;
ranRes r s = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (member e2 s)]&lt;br /&gt;
&lt;br /&gt;
--override&lt;br /&gt;
(&amp;lt;&amp;lt;) :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a, b) -&amp;gt; Set (a, b)&lt;br /&gt;
(&amp;lt;&amp;lt;) s t = union t (domSub (dom t) s)&lt;br /&gt;
&lt;br /&gt;
--composition&lt;br /&gt;
comp :: (Ord a, Ord b, Ord c) =&amp;gt;  Set (a, b) -&amp;gt; Set (b, c) -&amp;gt; Set (a, c)&lt;br /&gt;
comp r v = fromList [(e1, e4) | (e1,e2) &amp;lt;- toList r, (e3,e4) &amp;lt;- toList v, e2 == e3 ]&lt;br /&gt;
&lt;br /&gt;
--inverse&lt;br /&gt;
inv :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b, a)&lt;br /&gt;
inv r = fromList [(e2,e1)|(e1,e2) &amp;lt;- toList r]&lt;br /&gt;
&lt;br /&gt;
--relation image&lt;br /&gt;
image :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a) -&amp;gt; Set (b)&lt;br /&gt;
image r w = fromList [e2 |(e1,e2) &amp;lt;-toList r, member e1 w]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
beta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
beta 0 0 0 = empty&lt;br /&gt;
beta m q p | q &amp;gt; p = empty&lt;br /&gt;
	   | p &amp;gt; m = empty&lt;br /&gt;
	   | p &amp;lt; m = beta(m-1) q p&lt;br /&gt;
  	   | q &amp;lt; p = unions [phi m q b | b &amp;lt;- toList (alpha m)] &amp;lt;&amp;lt; unions [phi m q b `ranRes` sigma m b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
	   | otherwise =  ids (dom (tau m) `union` &lt;br /&gt;
                             unions [ran (beta (m-1) b b &amp;lt;&amp;lt; eta m b) | b &amp;lt;- toList (alpha m)])&lt;br /&gt;
 &lt;br /&gt;
phi :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
phi m q b = beta (m-1) q b `comp` (beta (m-1) b b &amp;lt;&amp;lt; eta m b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
gamma :: Int -&amp;gt; String -&amp;gt; Set (Int, String)&lt;br /&gt;
gamma st fn = fromList [(dt, f)|dt &amp;lt;- [1..n], f &amp;lt;- toList (image (delta n st dt) (fromList [fn]))]&lt;br /&gt;
 &lt;br /&gt;
delta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
delta m q p | p &amp;gt; m = empty&lt;br /&gt;
	    | q &amp;gt; p = empty&lt;br /&gt;
	    | p &amp;lt; m = delta (m-1) q p&lt;br /&gt;
	    | otherwise = beta n q m `comp` (&lt;br /&gt;
		unions [(inv (beta n b b &amp;lt;&amp;lt; eta m b)) `comp` delta (m-1) b b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
		   &amp;lt;&amp;lt; tau m)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An example system===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
tau:: Int -&amp;gt; Set (String, String)&lt;br /&gt;
tau 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;A.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;A.g1&amp;quot;)]&lt;br /&gt;
tau 2 = fromList [(&amp;quot;f2&amp;quot;, &amp;quot;B.f2&amp;quot;), (&amp;quot;g2&amp;quot;, &amp;quot;B.g2&amp;quot;)]&lt;br /&gt;
tau 3 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;D.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;D.g1&amp;quot;)]&lt;br /&gt;
&lt;br /&gt;
eta:: Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
eta 2 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;f2&amp;quot;), (&amp;quot;g1&amp;quot;,&amp;quot;g2&amp;quot;)]&lt;br /&gt;
eta 3 1 = empty&lt;br /&gt;
eta 3 2 = empty&lt;br /&gt;
&lt;br /&gt;
alpha:: Int -&amp;gt; Set (Int)&lt;br /&gt;
alpha 1 = empty&lt;br /&gt;
alpha 2 = insert 1 empty&lt;br /&gt;
alpha 3 = fromList [1, 2]&lt;br /&gt;
&lt;br /&gt;
sigma:: Int -&amp;gt; Int -&amp;gt; Set (String)&lt;br /&gt;
sigma 2 1 = empty&lt;br /&gt;
sigma 3 1 = insert &amp;quot;g1&amp;quot; empty&lt;br /&gt;
sigma 3 2 = insert &amp;quot;f2&amp;quot; empty&lt;br /&gt;
&lt;br /&gt;
n :: Int&lt;br /&gt;
n = 3&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7273</id>
		<title>DynBindModelHaskell</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7273"/>
				<updated>2007-01-28T19:43:37Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
===Some set theory:===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
--Set theory&lt;br /&gt;
import Data.Set&lt;br /&gt;
&lt;br /&gt;
--domain of a relation&lt;br /&gt;
dom :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set a&lt;br /&gt;
dom s = Data.Set.map (\(d, r) -&amp;gt; d) s&lt;br /&gt;
&lt;br /&gt;
--range of a relation&lt;br /&gt;
ran :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set b&lt;br /&gt;
ran s = Data.Set.map (\(d, r) -&amp;gt; r) s&lt;br /&gt;
&lt;br /&gt;
--identity of a set&lt;br /&gt;
ids :: (Ord a) =&amp;gt; Set a -&amp;gt; Set (a, a)&lt;br /&gt;
ids s = Data.Set.map (\e -&amp;gt; (e, e)) s&lt;br /&gt;
&lt;br /&gt;
--domain substraction&lt;br /&gt;
domSub :: (Ord a, Ord b) =&amp;gt; Set a -&amp;gt; Set (a, b) -&amp;gt;  Set (a, b)&lt;br /&gt;
domSub s r = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (notMember e1 s)]&lt;br /&gt;
&lt;br /&gt;
--range restriction&lt;br /&gt;
ranRes :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b) -&amp;gt;  Set (a, b)&lt;br /&gt;
ranRes r s = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (member e2 s)]&lt;br /&gt;
&lt;br /&gt;
--override&lt;br /&gt;
(&amp;lt;&amp;lt;) :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a, b) -&amp;gt; Set (a, b)&lt;br /&gt;
(&amp;lt;&amp;lt;) s t = union t (domSub (dom t) s)&lt;br /&gt;
&lt;br /&gt;
--composition&lt;br /&gt;
comp :: (Ord a, Ord b, Ord c) =&amp;gt;  Set (a, b) -&amp;gt; Set (b, c) -&amp;gt; Set (a, c)&lt;br /&gt;
comp r v = fromList [(e1, e4) | (e1,e2) &amp;lt;- toList r, (e3,e4) &amp;lt;- toList v, e2 == e3 ]&lt;br /&gt;
&lt;br /&gt;
--inverse&lt;br /&gt;
inv :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b, a)&lt;br /&gt;
inv r = fromList [(e2,e1)|(e1,e2) &amp;lt;- toList r]&lt;br /&gt;
&lt;br /&gt;
--relation image&lt;br /&gt;
image :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a) -&amp;gt; Set (b)&lt;br /&gt;
image r w = fromList [e2 |(e1,e2) &amp;lt;-toList r, member e1 w]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
beta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
beta 0 0 0 = empty&lt;br /&gt;
beta m q p | q &amp;gt; p = empty&lt;br /&gt;
	   | p &amp;gt; m = empty&lt;br /&gt;
	   | p &amp;lt; m = beta(m-1) q p&lt;br /&gt;
  	   | q &amp;lt; p = unions [phi m q b | b &amp;lt;- toList (alpha m)] &amp;lt;&amp;lt; unions [phi m q b `ranRes` sigma m b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
	   | otherwise =  ids (dom (tau m) `union` &lt;br /&gt;
                             unions [ran (beta (m-1) b b &amp;lt;&amp;lt; eta m b) | b &amp;lt;- toList (alpha m)])&lt;br /&gt;
 &lt;br /&gt;
phi :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
phi m q b = beta (m-1) q b `comp` (beta (m-1) b b &amp;lt;&amp;lt; eta m b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
gamma :: Int -&amp;gt; String -&amp;gt; Set (Int, String)&lt;br /&gt;
gamma st fn = fromList [(dt, f)|dt &amp;lt;- [1..n], f &amp;lt;- toList (image (delta n st dt) (fromList [fn]))]&lt;br /&gt;
 &lt;br /&gt;
delta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
delta m q p | p &amp;gt; m = empty&lt;br /&gt;
	    | q &amp;gt; p = empty&lt;br /&gt;
	    | p &amp;lt; m = delta (m-1) q p&lt;br /&gt;
	    | otherwise = beta n q m `comp` (&lt;br /&gt;
		unions [(inv (beta n b b &amp;lt;&amp;lt; eta m b)) `comp` delta (m-1) b b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
		   &amp;lt;&amp;lt; tau m)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An example system===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
tau:: Int -&amp;gt; Set (String, String)&lt;br /&gt;
tau 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;C1.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;C1.g1&amp;quot;), (&amp;quot;s1&amp;quot;, &amp;quot;C1.s1&amp;quot;)]&lt;br /&gt;
tau 2 = fromList [(&amp;quot;f2&amp;quot;, &amp;quot;C2.f2&amp;quot;), (&amp;quot;g2&amp;quot;, &amp;quot;C2.g2&amp;quot;), (&amp;quot;s1&amp;quot;, &amp;quot;C2.s1&amp;quot;)]&lt;br /&gt;
tau 3 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;C3.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;C3.g1&amp;quot;), (&amp;quot;s1&amp;quot;, &amp;quot;C3.s1&amp;quot;)]&lt;br /&gt;
&lt;br /&gt;
eta:: Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
eta 2 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;f2&amp;quot;), (&amp;quot;g1&amp;quot;,&amp;quot;g2&amp;quot;)]&lt;br /&gt;
eta 3 1 = empty&lt;br /&gt;
eta 3 2 = empty&lt;br /&gt;
&lt;br /&gt;
alpha:: Int -&amp;gt; Set (Int)&lt;br /&gt;
alpha 1 = empty&lt;br /&gt;
alpha 2 = insert 1 empty&lt;br /&gt;
alpha 3 = fromList [1, 2]&lt;br /&gt;
&lt;br /&gt;
sigma:: Int -&amp;gt; Int -&amp;gt; Set (String)&lt;br /&gt;
sigma 2 1 = empty&lt;br /&gt;
sigma 3 1 = insert &amp;quot;g1&amp;quot; empty&lt;br /&gt;
sigma 3 2 = insert &amp;quot;f2&amp;quot; empty&lt;br /&gt;
&lt;br /&gt;
n :: Int&lt;br /&gt;
n = 3&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7272</id>
		<title>DynBindModelHaskell</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelHaskell&amp;diff=7272"/>
				<updated>2007-01-28T19:43:09Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
===Some set theory:===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
--Set theory&lt;br /&gt;
import Data.Set&lt;br /&gt;
&lt;br /&gt;
--domain of a relation&lt;br /&gt;
dom :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set a&lt;br /&gt;
dom s = Data.Set.map (\(d, r) -&amp;gt; d) s&lt;br /&gt;
&lt;br /&gt;
--range of a relation&lt;br /&gt;
ran :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set b&lt;br /&gt;
ran s = Data.Set.map (\(d, r) -&amp;gt; r) s&lt;br /&gt;
&lt;br /&gt;
--identity of a set&lt;br /&gt;
ids :: (Ord a) =&amp;gt; Set a -&amp;gt; Set (a, a)&lt;br /&gt;
ids s = Data.Set.map (\e -&amp;gt; (e, e)) s&lt;br /&gt;
&lt;br /&gt;
--domain substraction&lt;br /&gt;
domSub :: (Ord a, Ord b) =&amp;gt; Set a -&amp;gt; Set (a, b) -&amp;gt;  Set (a, b)&lt;br /&gt;
domSub s r = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (notMember e1 s)]&lt;br /&gt;
&lt;br /&gt;
--range restriction&lt;br /&gt;
ranRes :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b) -&amp;gt;  Set (a, b)&lt;br /&gt;
ranRes r s = fromList [(e1,e2) | (e1,e2) &amp;lt;- (toList r), (member e2 s)]&lt;br /&gt;
&lt;br /&gt;
--override&lt;br /&gt;
(&amp;lt;&amp;lt;) :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a, b) -&amp;gt; Set (a, b)&lt;br /&gt;
(&amp;lt;&amp;lt;) s t = union t (domSub (dom t) s)&lt;br /&gt;
&lt;br /&gt;
--composition&lt;br /&gt;
comp :: (Ord a, Ord b, Ord c) =&amp;gt;  Set (a, b) -&amp;gt; Set (b, c) -&amp;gt; Set (a, c)&lt;br /&gt;
comp r v = fromList [(e1, e4) | (e1,e2) &amp;lt;- toList r, (e3,e4) &amp;lt;- toList v, e2 == e3 ]&lt;br /&gt;
&lt;br /&gt;
--inverse&lt;br /&gt;
inv :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (b, a)&lt;br /&gt;
inv r = fromList [(e2,e1)|(e1,e2) &amp;lt;- toList r]&lt;br /&gt;
&lt;br /&gt;
--relation image&lt;br /&gt;
image :: (Ord a, Ord b) =&amp;gt; Set (a, b) -&amp;gt; Set (a) -&amp;gt; Set (b)&lt;br /&gt;
image r w = fromList [e2 |(e1,e2) &amp;lt;-toList r, member e1 w]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
beta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
beta 0 0 0 = empty&lt;br /&gt;
beta m q p | q &amp;gt; p = empty&lt;br /&gt;
	   | p &amp;gt; m = empty&lt;br /&gt;
	   | p &amp;lt; m = beta(m-1) q p&lt;br /&gt;
  	   | q &amp;lt; p = unions [phi m q b | b &amp;lt;- toList (alpha m)] &amp;lt;&amp;lt; unions [phi m q b `ranRes` sigma m b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
	   | otherwise =  ids (dom (tau m) `union` &lt;br /&gt;
                             unions [ran (beta (m-1) b b &amp;lt;&amp;lt; eta m b) | b &amp;lt;- toList (alpha m)])&lt;br /&gt;
 &lt;br /&gt;
phi :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
phi m q b = beta (m-1) q b `comp` (beta (m-1) b b &amp;lt;&amp;lt; eta m b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
&amp;lt;code&amp;gt;[n,Haskell]&lt;br /&gt;
gamma :: Int -&amp;gt; String -&amp;gt; Set (Int, String)&lt;br /&gt;
gamma st fn = fromList [(dt, f)|dt &amp;lt;- [1..n], f &amp;lt;- toList (image (delta n st dt) (fromList [fn]))]&lt;br /&gt;
&lt;br /&gt;
delta :: Int -&amp;gt; Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
delta m q p | p &amp;gt; m = empty&lt;br /&gt;
	    | q &amp;gt; p = empty&lt;br /&gt;
	    | p &amp;lt; m = delta (m-1) q p&lt;br /&gt;
	    | otherwise = beta n q m `comp` (&lt;br /&gt;
		unions [(inv (beta n b b &amp;lt;&amp;lt; eta m b)) `comp` delta (m-1) b b | b &amp;lt;- toList (alpha m)]&lt;br /&gt;
		   &amp;lt;&amp;lt; tau m)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An example system===&lt;br /&gt;
&amp;lt;code&amp;gt;[n, Haskell]&lt;br /&gt;
tau:: Int -&amp;gt; Set (String, String)&lt;br /&gt;
tau 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;C1.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;C1.g1&amp;quot;), (&amp;quot;s1&amp;quot;, &amp;quot;C1.s1&amp;quot;)]&lt;br /&gt;
tau 2 = fromList [(&amp;quot;f2&amp;quot;, &amp;quot;C2.f2&amp;quot;), (&amp;quot;g2&amp;quot;, &amp;quot;C2.g2&amp;quot;), (&amp;quot;s1&amp;quot;, &amp;quot;C2.s1&amp;quot;)]&lt;br /&gt;
tau 3 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;C3.f1&amp;quot;), (&amp;quot;g1&amp;quot;, &amp;quot;C3.g1&amp;quot;), (&amp;quot;s1&amp;quot;, &amp;quot;C3.s1&amp;quot;)]&lt;br /&gt;
&lt;br /&gt;
eta:: Int -&amp;gt; Int -&amp;gt; Set (String, String)&lt;br /&gt;
eta 2 1 = fromList [(&amp;quot;f1&amp;quot;, &amp;quot;f2&amp;quot;), (&amp;quot;g1&amp;quot;,&amp;quot;g2&amp;quot;)]&lt;br /&gt;
eta 3 1 = empty&lt;br /&gt;
eta 3 2 = empty&lt;br /&gt;
&lt;br /&gt;
alpha:: Int -&amp;gt; Set (Int)&lt;br /&gt;
alpha 1 = empty&lt;br /&gt;
alpha 2 = insert 1 empty&lt;br /&gt;
alpha 3 = fromList [1, 2]&lt;br /&gt;
&lt;br /&gt;
sigma:: Int -&amp;gt; Int -&amp;gt; Set (String)&lt;br /&gt;
sigma 2 1 = empty&lt;br /&gt;
sigma 3 1 = insert &amp;quot;g1&amp;quot; empty&lt;br /&gt;
sigma 3 2 = insert &amp;quot;f2&amp;quot; empty&lt;br /&gt;
&lt;br /&gt;
n :: Int&lt;br /&gt;
n = 3&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7271</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7271"/>
				<updated>2007-01-28T19:40:55Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7270</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7270"/>
				<updated>2007-01-28T19:40:23Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article will be deleted}}&lt;br /&gt;
Author: Matthias Konrad[[Category:ECMA]]&lt;br /&gt;
&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( A \mapsto A\right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7269</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7269"/>
				<updated>2007-01-28T19:37:36Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* No undefine or redefine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. The latter is generally not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
This article assumes that there is an unfolded form for undefines which is needed for the join semantics of precondition.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7268</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7268"/>
				<updated>2007-01-28T19:27:45Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* No undefine or redefine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
Undefine and redefine are not represented in this model. Redefine is not relevant for the semantics.&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7267</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7267"/>
				<updated>2007-01-28T19:17:26Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The order */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====No undefine or redefine====&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7266</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7266"/>
				<updated>2007-01-28T19:12:35Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7265</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7265"/>
				<updated>2007-01-28T19:11:35Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{B.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7264</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7264"/>
				<updated>2007-01-28T19:09:57Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, D \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, D \mapsto \underline{A.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.f_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ B \mapsto \underline{B.g_2}, D \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto f_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto g_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ D \mapsto \underline{D.g_2} \right\}\ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7263</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7263"/>
				<updated>2007-01-28T19:06:24Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, C \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, C \mapsto \underline{A.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7262</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7262"/>
				<updated>2007-01-28T19:05:55Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, C \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto g_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.g_1}, B \mapsto \underline{B.g_2}, C \mapsto \underline{B.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7261</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7261"/>
				<updated>2007-01-28T19:05:01Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, C \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7260</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7260"/>
				<updated>2007-01-28T19:04:45Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{\ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto \f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, C \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7259</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7259"/>
				<updated>2007-01-28T19:03:48Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto \f_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ A \mapsto \underline{A.f_1}, B \mapsto \underline{B.f_2}, C \mapsto \underline{B.f_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7258</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7258"/>
				<updated>2007-01-28T18:59:42Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The initial goal was the definition of the dynamic binding function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is defined as:&lt;br /&gt;
&lt;br /&gt;
====The definition====&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7257</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7257"/>
				<updated>2007-01-28T18:56:09Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
The &lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7256</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7256"/>
				<updated>2007-01-28T18:53:45Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function it is done recursively. &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; can be defined based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7255</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7255"/>
				<updated>2007-01-28T18:52:24Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = \underline{f} \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7254</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7254"/>
				<updated>2007-01-28T18:51:27Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto \underline{f}\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7253</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7253"/>
				<updated>2007-01-28T18:46:35Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( ST \mapsto f_n \right) = \left\{ DT \mapsto f\ |\ \delta \left( ST \mapsto DT \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7252</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7252"/>
				<updated>2007-01-28T18:45:51Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The dynamic binding function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is defined. From this function, &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; can be derived:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7251</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7251"/>
				<updated>2007-01-28T18:44:11Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( A \mapsto A\right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7250</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7250"/>
				<updated>2007-01-28T18:43:31Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7249</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7249"/>
				<updated>2007-01-28T18:43:19Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7248</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7248"/>
				<updated>2007-01-28T18:42:20Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
*&amp;lt;math&amp;gt;S = \left\{ A, B, D \right\} &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_1 = \left\{ A\right\}, S_2 = \left\{ A, B\right\}, S_3 = \left\{ A, B, D \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   C_2 \mapsto \left\{ C_1 \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ C_2, C_1 \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   C_3 \mapsto \left\{ C_2 \mapsto \left\{ f_2 \right\}, C_1 \mapsto \left\{ g_1 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7247</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7247"/>
				<updated>2007-01-28T18:41:36Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
*&amp;lt;math&amp;gt;S = \left\{ A, B, D \right\} &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_1 = \left\{ A\right\}, S_2 = \left\{ A, B\right\}, S_3 = \left\{ A, B, D \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f_1 \mapsto \underline{A.f_1}, g_1 \mapsto \underline{A.g_1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f_2 \mapsto \underline{B.f_2}, g_2 \mapsto \underline{B.g_2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f_1 \mapsto \underline{D.f_1}, g_1 \mapsto \underline{D.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_2 \mapsto \left\{ &lt;br /&gt;
      C_1 \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   C_2 \mapsto \left\{ C_1 \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ C_2, C_1 \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   C_3 \mapsto \left\{ C_2 \mapsto \left\{ f_2 \right\}, C_1 \mapsto \left\{ g_1 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7246</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7246"/>
				<updated>2007-01-28T18:40:25Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
*&amp;lt;math&amp;gt;S = \left\{ A, B, D \right\} &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_1 = \left\{ C_1\right\}, S_2 = \left\{ C_1, C_2\right\}, S_3 = \left\{ C_1, C_2, C_3 \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_1 \mapsto \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}, &lt;br /&gt;
   C_2 \mapsto \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_2 \mapsto \left\{ &lt;br /&gt;
      C_1 \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   C_2 \mapsto \left\{ C_1 \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ C_2, C_1 \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   C_3 \mapsto \left\{ C_2 \mapsto \left\{ f_2 \right\}, C_1 \mapsto \left\{ g_1 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7245</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7245"/>
				<updated>2007-01-28T18:39:48Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
*&amp;lt;math&amp;gt;S = \left\{ A, B, D \right\} &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_1 = \left\{ C_1\right\}, S_2 = \left\{ C_1, C_2\right\}, S_3 = \left\{ C_1, C_2, C_3 \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_1 \mapsto \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}, &lt;br /&gt;
   C_2 \mapsto \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_2 \mapsto \left\{ &lt;br /&gt;
      C_1 \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   C_2 \mapsto \left\{ C_1 \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ C_2, C_1 \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   C_3 \mapsto \left\{ C_2 \mapsto \left\{ f_2 \right\}, C_1 \mapsto \left\{ g_1 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7244</id>
		<title>DynBindModelExamples</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModelExamples&amp;diff=7244"/>
				<updated>2007-01-28T18:39:20Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
==The system==&lt;br /&gt;
In this example we are studying a simple system with three classes that contains both renaming and selects:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   A&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   B&lt;br /&gt;
inherit&lt;br /&gt;
   A&lt;br /&gt;
      rename f1 as f2, g1 as g2 &lt;br /&gt;
      redefine f2, g2 end&lt;br /&gt;
feature&lt;br /&gt;
   f2 do ... end&lt;br /&gt;
   g2 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel, N]&lt;br /&gt;
class&lt;br /&gt;
   D&lt;br /&gt;
inherit&lt;br /&gt;
   &lt;br /&gt;
   A&lt;br /&gt;
      redefine f1, g1 &lt;br /&gt;
      select g1 end&lt;br /&gt;
   B&lt;br /&gt;
      select f2 end&lt;br /&gt;
feature&lt;br /&gt;
   f1 do ... end&lt;br /&gt;
   g1 do ... end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This system is defined by:&lt;br /&gt;
*&amp;lt;math&amp;gt;S = \left\{ C_1, C_2, C_3 \right\} &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;S_1 = \left\{ C_1\right\}, S_2 = \left\{ C_1, C_2\right\}, S_3 = \left\{ C_1, C_2, C_3 \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_1 \mapsto \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}, &lt;br /&gt;
   C_2 \mapsto \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   C_2 \mapsto \left\{ &lt;br /&gt;
      C_1 \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   C_2 \mapsto \left\{ C_1 \right\},&lt;br /&gt;
   C_3 \mapsto \left\{ C_2, C_1 \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   C_3 \mapsto \left\{ C_2 \mapsto \left\{ f_2 \right\}, C_1 \mapsto \left\{ g_1 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The naming function==&lt;br /&gt;
We proceed by calculating the naming function. According to its definition we have to do that incrementally. Meaning that we first calculate &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; then  &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt; and finally &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\beta_{S_1}&amp;lt;/math&amp;gt; contains only one class it is sufficient to define &amp;lt;math&amp;gt;\beta_{S_1}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;. According to the definition:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( &lt;br /&gt;
      \mbox{dom} \left( \tau_1 \right)&lt;br /&gt;
         \, \cup \,&lt;br /&gt;
      \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_1&lt;br /&gt;
         \ |\ &lt;br /&gt;
      \mbox{ran} \left( \beta_{ S_0 } \left( b \mapsto b \right) \ll \eta_{1, b} \right) \right) \right)&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
We can forget about the right part of the union since &amp;lt;math&amp;gt;C_1\,&amp;lt;/math&amp;gt; has no base classes. So we need to calculate:&lt;br /&gt;
#&amp;lt;math&amp;gt;\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_1 = \tau (C_1) = \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_1 \right) = \left\{ f_1, g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{id} \left( \mbox{dom} \left( \tau_1 \right) \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) = \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} = \left\{ \left( C_1 \mapsto C_1 \right) \mapsto &lt;br /&gt;
      \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
We show the calculation of the different (four) parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \beta_{S_1}\left( C_1 \mapsto C_1 \right) =  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      = &lt;br /&gt;
   \mbox{id} \left( \mbox{dom} \left( \tau_2 \right)&lt;br /&gt;
      \, \cup \,&lt;br /&gt;
   \mbox {UNION} \ b \, \cdot \, \left(b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets calculate the left part first:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\tau_2 = \tau (C_2) = \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox{dom} \left( \tau_2 \right) = \left\{ f_2, g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the right part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
\mbox {UNION} \ b \, \cdot \, \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \mbox{ran}\left( \beta_{ S_{1} } \left( b \mapsto b \right) \ll \eta_{2, b} \right)\right)&lt;br /&gt;
= &lt;br /&gt;
\mbox{ran}\left( \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right) \ll \eta_{2, C_1} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{ S_{1} } \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \eta_{2,C_1} = \eta (C_2)(C_1) = \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1\right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left( \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2\right\} \right) &lt;br /&gt;
=  &lt;br /&gt;
   \left\{ f_2, g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_2 \mapsto C_2 \right)&lt;br /&gt;
  =  &lt;br /&gt;
\left\{ f_2 \mapsto f_2, g_2 \mapsto g_2\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_2} \left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_2&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the steps taken to compute the part:&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{1}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_{1}} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \ll \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
     =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} \,;\, \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_2}}^\prime \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{2,C_1}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{2,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
\sigma_{2,C_1} = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_1} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
    \ll&lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
  \emptyset &lt;br /&gt;
     = &lt;br /&gt;
  \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \theta_{S_2} \left( C_1 \mapsto C_2 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} \ll \emptyset &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
We will not show the complete construction of &amp;lt;math&amp;gt;\beta_{S_3}&amp;lt;/math&amp;gt; but restrict our self to the most interesting parts.&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\beta_{S_3} \left( C_1 \mapsto C_3 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_naming_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
{\beta_{S_3}}^\prime \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
  = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_3} \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_3&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{2}} \left( C_1 \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{3,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{3,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that we can omit &amp;lt;math&amp;gt;\eta_{3,b}\,&amp;lt;/math&amp;gt; from the formulas since it is always empty.&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_2 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_{2}} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox{id}\left(\mbox{ran}\left( \beta_{S_{2}} \left( C_1 \mapsto C_1 \right) \right)\right) &lt;br /&gt;
     = &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    ; &lt;br /&gt;
  \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
  \ \cup\ &lt;br /&gt;
  \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
   \ \cup \  &lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right) &lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_2} = \sigma \left(C_3 \right) \left(C_2\right) = \left\{ f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \sigma_{3,C_1} = \sigma \left(C_3 \right) \left(C_1\right) = \left\{ g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_2 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_2 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_2}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \beta_{S_2} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \mbox{id} \left( \mbox{ran} \left( \beta_{S_2} \left( C_1 \mapsto C_1 \right) \right) \right)&lt;br /&gt;
      \ \triangleright\  &lt;br /&gt;
   \sigma_{3,C_1}&lt;br /&gt;
      =&lt;br /&gt;
   \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
   \left\{ f_1 \mapsto f_2 \right\} \ \cup \ \left\{ g_1 \mapsto g_1 \right\}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_1 \mapsto f_1, f_1 \mapsto f_2, g_1 \mapsto g_1, g_1 \mapsto g_2 \right\} &lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_3} \left( C_1 \mapsto C_3 \right)&lt;br /&gt;
  =&lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complete naming function====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) \mapsto \left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_3 \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_3 \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{  f_1 \mapsto f_1, g_1 \mapsto g_1, f_2 \mapsto f_2, g_2 \mapsto g_2 \right\}, &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The dynamic binding function==&lt;br /&gt;
To calculate the dynamic binding function, we need to get &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;. We will again calculate it incrementally:&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_1}&amp;lt;/math&amp;gt;===&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_1&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{1,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_0}\left( b \mapsto b \right)\right)  \right) \ll \tau_1&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;\alpha_1\,&amp;lt;/math&amp;gt; is empty this simplifies to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1} \left( C_1 \mapsto C_1 \right)&lt;br /&gt;
  =&lt;br /&gt;
\beta_S \left( C_1 \mapsto C_1 \right) ; \tau_1&lt;br /&gt;
  =&lt;br /&gt;
\left\{ f_1 \mapsto f_1, g_1 \mapsto g_1 \right\} &lt;br /&gt;
  ;&lt;br /&gt;
\left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get: &lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\delta_{S_1}&lt;br /&gt;
  =&lt;br /&gt;
\left\{ \left( C_1 \mapsto C_1 \right) \mapsto&lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_2}&amp;lt;/math&amp;gt;===&lt;br /&gt;
Again we calculate the different parts of the function in separate sections:&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = &lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right) =  &lt;br /&gt;
      \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_1 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \delta_{S_2}\left( C_1 \mapsto C_1 \right) = \emptyset&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_2 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_2 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)  \right) \ll \tau_2&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \mbox {UNION} \, b \cdot \left(b \in \left\{ C_1 \right\}&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( b \mapsto b \right)\right)&lt;br /&gt;
    =&lt;br /&gt;
    \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
    =  &lt;br /&gt;
  \left\{ f_2 \mapsto f_1, g_2 \mapsto g_1 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
##&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( \beta_S \left( C_1 \mapsto C_1 \right) ; \eta_{2,C_1} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
   \delta_{S_1}\left( C_1 \mapsto C_1 \right)&lt;br /&gt;
    =  &lt;br /&gt;
 \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \tau_2 = \tau \left( C_2 \right) &lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}  &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
#&amp;lt;math&amp;gt;&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_1.f_1}, g_2 \mapsto \underline{C_1.g_1} \right\}&lt;br /&gt;
    \ll&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we get:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_2 \mapsto C_2 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Calculate &amp;lt;math&amp;gt;\delta_{S_2}\left( C_1 \mapsto C_2 \right)&amp;lt;/math&amp;gt;====&lt;br /&gt;
According to the [[DynBindModel#The_dynamic_binding_function|definition]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
\beta_S \left( C_1 \mapsto C_2 \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_2&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{2,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{2}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this stage it should be clear how to calculate this, so we just give the result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta_{S_2}\left( C_1 \mapsto C_2 \right) &lt;br /&gt;
    = &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Putting the parts together:====&lt;br /&gt;
We can know show the complete total function:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_2} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\} \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Calculating &amp;lt;math&amp;gt;\delta_{S_3}&amp;lt;/math&amp;gt;===&lt;br /&gt;
There is nothing new for this calculation so we just present the result:&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{S_3} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_1 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_1.f_1}, g_1 \mapsto \underline{C_1.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_1 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_2 \mapsto C_2 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
    \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_1 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_1 \mapsto \underline{C_2.f_2}, g_1 \mapsto \underline{C_3.g_1} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \left( C_2 \mapsto C_3 \right) &lt;br /&gt;
    \mapsto &lt;br /&gt;
  \left\{ f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_3 \right) &lt;br /&gt;
      \mapsto &lt;br /&gt;
   \left\{ f_1 \mapsto \underline{C_3.f_1}, g_1 \mapsto \underline{C_3.g_1},&lt;br /&gt;
           f_2 \mapsto \underline{C_2.f_2}, g_2 \mapsto \underline{C_2.g_2} \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_1 \right) \mapsto \emptyset,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( C_3 \mapsto C_2 \right) \mapsto \emptyset  \ \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Deriving the dynamic binding function===&lt;br /&gt;
The function is now given. We evaluate it at two interesting points:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_1 \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_1}, C_2 \mapsto \underline{C_2.f_2}, C_3 \mapsto \underline{C_2.f_2}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;&lt;br /&gt;
  \delta\left( C_1 \mapsto f_g \right)&lt;br /&gt;
    =&lt;br /&gt;
  \left\{&lt;br /&gt;
    C_1 \mapsto \underline{C_1.f_g}, C_2 \mapsto \underline{C_2.g_2}, C_3 \mapsto \underline{C_2.g_1}&lt;br /&gt;
  \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7243</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7243"/>
				<updated>2007-01-28T18:37:56Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The complex case */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7242</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7242"/>
				<updated>2007-01-28T18:04:36Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* The complex case */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathcal{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathcal{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7241</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7241"/>
				<updated>2007-01-28T18:04:14Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathcal{A} \ll \mathcal{B}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7240</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7240"/>
				<updated>2007-01-28T18:03:30Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\,\mathcal{H}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7239</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7239"/>
				<updated>2007-01-28T18:03:08Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\,\mathfrak{H}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7238</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7238"/>
				<updated>2007-01-28T18:02:47Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathfrak{H}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7237</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7237"/>
				<updated>2007-01-28T17:53:10Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7236</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7236"/>
				<updated>2007-01-28T17:52:49Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7235</id>
		<title>DynBindModel</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=DynBindModel&amp;diff=7235"/>
				<updated>2007-01-28T17:52:29Z</updated>
		
		<summary type="html">&lt;p&gt;Konradm: /* Definition of the naming function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Warning|'''Warning''': Article under development}}&lt;br /&gt;
Author: Matthias Konrad&lt;br /&gt;
&lt;br /&gt;
Related articles: &lt;br /&gt;
*Example for the model shown: [[DynBindModelExamples]]&lt;br /&gt;
*Haskel module that implements the model: [[DynBindModelHaskell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Eiffel's dynamic binding is somewhat more complex than that of other languages. Its structure is still very simple and is described by the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma : \left(\mbox{TYPE} \times \mbox{NAME}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; contains both the static and dynamic binding part of the language. In the following feature:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;eiffel&amp;gt;&lt;br /&gt;
f (a: ANY)&lt;br /&gt;
   do&lt;br /&gt;
      print (a.out)&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/eiffel&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The static binding part of call ''a.out'' can be described as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( \mbox{ANY} \mapsto \mbox{out}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Namely an evaluation of  &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; with a tuple containing the static type of the call and the name. The result of this is a function. This function evaluated at runtime will yield the right feature according to the dynamic type of ''a''. &lt;br /&gt;
&lt;br /&gt;
In the rest of this text, the construction of the function &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt; is shown, based on any given valid Eiffel system.&lt;br /&gt;
&lt;br /&gt;
There is a [[DynBindModelExamples|special wiki page]] that shows an example calculation of the dynamic binding function for a complete system:&lt;br /&gt;
[[DynBindModelExamples]]&lt;br /&gt;
&lt;br /&gt;
===Notation===&lt;br /&gt;
This wiki uses the notation introduced in these slides by Prof. Jean-Raymond Abrial (ETHZ):&lt;br /&gt;
[http://se.inf.ethz.ch/teaching/ws2004/0271/slides/sld.lect9.pdf#search=%22practical%20system%20modeling%20using%20discrete%20mathematics%20refresher%22 notation]&lt;br /&gt;
The only difference is the symbol for override which is &amp;lt;math&amp;gt;\ll\,&amp;lt;/math&amp;gt; (This will be changed as soon as possible).&lt;br /&gt;
The function operator &amp;lt;math&amp;gt;\rightarrow&amp;lt;/math&amp;gt; is used for partial functions.&lt;br /&gt;
&lt;br /&gt;
We will give some rather informal definitions for the set-theoretic operators used here.&lt;br /&gt;
====identity ====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{id}\left( \left\{ e_1, \ldots, e_n \right\} \right)\ = \left\{ e_1 \mapsto e_1, \ldots, e_n \mapsto e_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: inverse====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   {\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}}^{-1}&lt;br /&gt;
      = &lt;br /&gt;
   \left\{ r_1 \mapsto l_1, \ldots, r_n \mapsto l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: domain====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{dom}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ l_1, \ldots, l_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \mbox{ran}\left(\left\{ l_1 \mapsto r_1, \ldots, l_n \mapsto r_n \right\}\right) = \left\{ r_1, \ldots, r_n \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
====Operator: range restriction====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \triangleright T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
E \mapsto F \in r \,\land\, F \in T&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4 \right\} \,\triangleright\, \left\{ 3 \right\}&lt;br /&gt;
 = &lt;br /&gt;
\left\{ 2 \mapsto 3 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: override====&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in p \ll q&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;E \mapsto F \in q \,\lor\, \left( E \mapsto F \in p \,\land\, E \not\in \mbox{dom}\left( q \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\left\{ 1 \mapsto 2, 2 \mapsto 3 \right\} \,\ll\, \left\{ 1 \mapsto 4, 3 \mapsto 6 \right\}&lt;br /&gt;
   =&lt;br /&gt;
\left\{ 1 \mapsto 4, 2 \mapsto 3, 3 \mapsto 6 \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Operator: union====&lt;br /&gt;
&amp;lt;math&amp;gt;E \in \mbox{UNION} \ x \cdot \left(x \in S \ |\ T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\exists x \cdot \left(x \in S \ \land\ E \in T \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mbox{UNION} \ x \cdot \left(x \in \left\{ 1, 2, 3\right\} \ |\ \left\{ x, x^2 \right\} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
is equivalent to:&lt;br /&gt;
&amp;lt;math&amp;gt;\left\{ 1, 2, 3, 4, 9\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unfolded forms and replication===&lt;br /&gt;
The Eiffel ECMA standard defines semantics in two ways. A small core of the language (called CoreEiffel) is described explicitly. The rest is described by giving unfolded forms. These unfolded forms map the constructs that do not belong to CoreEiffel (but to Eiffel) to constructs that do belong to CoreEiffel.&lt;br /&gt;
&lt;br /&gt;
This is especially important for replication. There is an other article that gives an unfolded form for [[replication]]. This article shows (somewhat informal) how replication can be reduced away by a similar construct. As a result CoreEiffel does not need any replication anymore.&lt;br /&gt;
&lt;br /&gt;
If replication would be a valid construct of CoreEiffel this would change the very structure of the dynamic binding function &amp;lt;math&amp;gt;\,\gamma&amp;lt;/math&amp;gt; and make it considerably more complex. Its structure would become something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma^{\prime} : \left(\mbox{TYPE} \times \mbox{NAME} \times \mbox{CONTEXT}\right) \rightarrow \left(\mbox{TYPE} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A model for an Eiffel System===&lt;br /&gt;
First of all, the model used here does not cover generics. The concepts type and class are thus considered equal. &lt;br /&gt;
&lt;br /&gt;
For making things simpler the following example system is used:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingABD.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An Eiffel system is basically just a set &amp;lt;math&amp;gt;\,S&amp;lt;/math&amp;gt; of classes (or a set of types). For the example system, &amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
====The features declared in a class====&lt;br /&gt;
For all these classes there is a partial function that maps the name of the features declared in the class to the actual feature (maybe feature body would have been a better name):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau : \mbox{TYPE} \rightarrow \left( \mbox{NAME} \rightarrow \mbox{FEATURE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The direct inheritance function====&lt;br /&gt;
Eiffel classes can inherit from each other. This is described by the function &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha : \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{TYPE} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may surprise, that the functions range is a set of classes and not a list, since it is not reflected how may times a class inherits from a given base class. This is indeed a property of CoreEiffel assumed here but not stated in the standard. This property comes as a result of the unfolded form of replication.&lt;br /&gt;
&lt;br /&gt;
The base classes of class D are expressed as: &amp;lt;math&amp;gt;\alpha \left( D \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The renaming function====&lt;br /&gt;
The renaming function yields for every class of the system a second function that describes its renaming. This second function yields for every base class of the class a relation that describes the renaming for a given base class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \left( \mbox{NAME} \leftrightarrow \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\eta \left( D \right) \left( B \right) &amp;lt;/math&amp;gt; gives the renaming in class D for the inherited class B.&lt;br /&gt;
&lt;br /&gt;
Again, the fact that the final result is not a function but just a relation is surprising. Take it as a property of CoreEiffel, that for a given base class a feature can be renamed to many different names. This is also possible in Eiffel, since it allows several parent parts to refer to the same class.&lt;br /&gt;
&lt;br /&gt;
====The select function====&lt;br /&gt;
The select function yields for a given class the feature names of the features that are explicitly selected for a base class:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;\sigma : \mbox{TYPE} \rightarrow \left( \mbox{TYPE} \rightarrow \mathbb{P} \left( \mbox{NAME} \right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The order====&lt;br /&gt;
The operator &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt; is the &amp;quot;ancestor of&amp;quot; and &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt; the &amp;quot;descendant of&amp;quot; operator.&lt;br /&gt;
&lt;br /&gt;
For every system there is at least one topological order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C: \mathbb{N} \rightarrow \mbox{TYPE}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such that &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \forall x, y\ \cdot \left( x &amp;gt; y \Rightarrow \lnot \left( C \left(x\right) &amp;lt; C \left(y\right) \right) \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the example system there is only one such order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice class &amp;lt;math&amp;gt;C\left(1\right)&amp;lt;/math&amp;gt; is always class &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;. For simplification, in this article classes are not implicitly inherited by &amp;lt;eiffel&amp;gt;ANY&amp;lt;/eiffel&amp;gt;, this simplifies the examples.&lt;br /&gt;
&lt;br /&gt;
====Some shortcuts====&lt;br /&gt;
To simplify the discussion, some shortcuts are introduced:&lt;br /&gt;
*&amp;lt;math&amp;gt;C_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;C\left( n \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\tau_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\tau\left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\eta_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\eta \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\alpha_{n}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\alpha \left( C_n \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\sigma_{n, b}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;\sigma \left( C_n \right) \left( b \right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The full example====&lt;br /&gt;
The full model of the example is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S=\left\{ A, B, D\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tau = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \left\{ f1 \mapsto \underline{A.f1}, g1 \mapsto \underline{A.g1} \right\}, &lt;br /&gt;
   B \mapsto \left\{ f2 \mapsto \underline{B.f2}, g2 \mapsto \underline{B.g2} \right\},&lt;br /&gt;
   D \mapsto \left\{ f1 \mapsto \underline{D.f1}, g1 \mapsto \underline{D.g1} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\alpha = \left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ A \right\},&lt;br /&gt;
   D \mapsto \left\{ A, B \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\eta = &lt;br /&gt;
\left\{&lt;br /&gt;
   A \mapsto \emptyset,&lt;br /&gt;
   B \mapsto \left\{ &lt;br /&gt;
      A \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\} &lt;br /&gt;
   \right\},&lt;br /&gt;
   D \mapsto \left\{ &lt;br /&gt;
      A \mapsto \emptyset, B \mapsto \emptyset &lt;br /&gt;
   \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \left\{&lt;br /&gt;
   A \mapsto \emptyset, &lt;br /&gt;
   B \mapsto \left\{ A \mapsto \emptyset \right\}, &lt;br /&gt;
   D \mapsto \left\{ A \mapsto \left\{ g_1 \right\},&lt;br /&gt;
                     B \mapsto \left\{ f_2 \right\} \right\}&lt;br /&gt;
\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   C = \left\{ 1 \mapsto A, 2 \mapsto B, 3 \mapsto D \right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The naming function===&lt;br /&gt;
&lt;br /&gt;
The naming function shows for two classes how their feature names are related to each other: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When one looks at a feature with name n in a class X and is interested in the name of the selected version of this feature in descendant class Y the naming function tells the answer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta\left(X\right)\left(Y\right)\left(n\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function simplifies the construction of the dynamic binding function.&lt;br /&gt;
&lt;br /&gt;
For the example system:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{\left\{ A, B, D \right\}} = \{&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto A \right) \mapsto \left\{f_1 \mapsto f_1, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto B \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( A \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_2, g_1 \mapsto g_1 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto B \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( B \mapsto D \right) \mapsto \left\{ f_2 \mapsto f_2, g_2 \mapsto g_2 \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
   \left( D \mapsto D \right) \mapsto \left\{ f_1 \mapsto f_1, f_2 \mapsto f_2, g_1 \mapsto g_1, g_2 \mapsto g_2 \right\} \}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Definition of the naming function====&lt;br /&gt;
The shortcut &amp;lt;math&amp;gt;S_m\,&amp;lt;/math&amp;gt; denotes the system &amp;lt;math&amp;gt;\left\{ C_1 \ldots C_m \right\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt; is defined recursively. Meaning, that &amp;lt;math&amp;gt;\beta_{S_m }&amp;lt;/math&amp;gt; is defined based on &amp;lt;math&amp;gt;\beta_{ S_{m-1}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This is sound since:&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ \left\{ C_1 \right\} } \subseteq \beta_{ \left\{ C_1, C_2 \right\} } \subseteq \ldots  \subseteq \beta_S&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of the functions are covered in the succeeding sections, its definition is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q = p = m \\&lt;br /&gt;
&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   \ll &lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\mbox{otherwise }&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The trivial cases====&lt;br /&gt;
There are two trivial cases:&lt;br /&gt;
#When &amp;lt;math&amp;gt;q &amp;gt; p \,&amp;lt;/math&amp;gt; then according to the definition of the order &amp;lt;math&amp;gt;C\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; is not an ancestor of &amp;lt;math&amp;gt;C_p\,&amp;lt;/math&amp;gt;. And thus &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt; evaluates to the empty set in this case.&lt;br /&gt;
#When both &amp;lt;math&amp;gt;p\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q\,&amp;lt;/math&amp;gt; are smaller than &amp;lt;math&amp;gt;m\,&amp;lt;/math&amp;gt;, it is defined by  &amp;lt;math&amp;gt;\beta_{ S_{m-1} } \left( C_q \mapsto C_p \right)&amp;lt;/math&amp;gt;. Here the recursive structure of the definition can be seen.&lt;br /&gt;
====The identity function====&lt;br /&gt;
&amp;lt;math&amp;gt;\beta_{ S_m } \left( C_m \mapsto C_m \right)&amp;lt;/math&amp;gt; is the identity function over all the feature names of the class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;. It is an identity function since a given feature name in a class has no other name in that same class. &lt;br /&gt;
The set of feature names of a class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;consists of the names of:&lt;br /&gt;
#The features declared in &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;&lt;br /&gt;
#The inherited features (after renaming) of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first set is trivial, it is exactly the domain of &amp;lt;math&amp;gt;\tau_m\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every base class &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt; of class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; contributes the set &amp;lt;math&amp;gt;\mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&amp;lt;/math&amp;gt; to the set of inherited feature names.&lt;br /&gt;
&lt;br /&gt;
The whole identity function is thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_m \mapsto C_m \right)&lt;br /&gt;
   =&lt;br /&gt;
\mbox{id} \left( &lt;br /&gt;
   \mbox{dom} \left( \tau_m \right)&lt;br /&gt;
   \, \cup \,&lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \ |\ \mbox{ran}\left( \beta_{ S_{m-1} } \left( b \mapsto b \right) \ll \eta_{m, b} \right)&lt;br /&gt;
    \right)&lt;br /&gt;
    \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The helper function====&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is a little harder to construct. Helper function &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt; shown here should simplify things.&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;|\alpha_m|\,&amp;lt;/math&amp;gt; paths from class &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; to class &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt; that need to be considered. They are shown in the following picture:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot; -halign=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Image:DynBindingCqCm.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_m\left( C_q \mapsto b \right)&amp;lt;/math&amp;gt; describes the naming on the path that goes through &amp;lt;math&amp;gt;b\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_m\left( C_q \mapsto b \right)&lt;br /&gt;
 =&lt;br /&gt;
\beta_{S_{m-1}} &lt;br /&gt;
   \left(C_q\mapsto b\right)&lt;br /&gt;
;&lt;br /&gt;
\left(&lt;br /&gt;
   \beta_{S_{m-1}}\left(b \mapsto b\right)\ll\eta_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The complex case====&lt;br /&gt;
The union of the helper function over all the base classes &amp;lt;math&amp;gt;b \in \alpha_m&amp;lt;/math&amp;gt; for given &amp;lt;math&amp;gt;C_q\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_m\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{A}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
   \  | \ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yields a relation but not a function. The selected features names are not yet taken into account. The explicitly selected features names are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathfrak{B}&lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \cdot \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \phi_m \left( C_q \mapsto b \right) \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if &amp;lt;math&amp;gt;\mathfrak{A}\,&amp;lt;/math&amp;gt; is overridden with &amp;lt;math&amp;gt;\mathfrak{B}\,&amp;lt;/math&amp;gt; the result is again a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
=&lt;br /&gt;
\mathfrak{A} \ll \mathfrak{B}&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; depends on two helper functions. Function &amp;lt;math&amp;gt;\beta^\prime_S&amp;lt;/math&amp;gt; ignores whether a features is selected or not, apart from that it is similar to the naming function &amp;lt;math&amp;gt;\beta_S\,&amp;lt;/math&amp;gt;. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\beta^\prime_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \leftrightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image &amp;lt;math&amp;gt;\beta^\prime_{\left\{ B, C, D \right\}} \left( B \mapsto C \right) \left[ f \right]&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f1, f2, f3\right\}\,&amp;lt;/math&amp;gt;. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second helper function &amp;lt;math&amp;gt;\theta_S&amp;lt;/math&amp;gt; is again similar to the naming function but it only includes selected feature names. Its structure is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_S: \left( \mbox{TYPE} \times \mbox{TYPE} \right) \rightarrow\left( \mbox{NAME} \rightarrow\mbox{NAME} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( B \mapsto D \right)&amp;lt;/math&amp;gt; from the previous example is &amp;lt;math&amp;gt;\left\{f \mapsto f2\right\}\,&amp;lt;/math&amp;gt;, whereas &amp;lt;math&amp;gt;\theta_{\left\{ B, C, D \right\}}\left( C \mapsto D \right)&amp;lt;/math&amp;gt; is the empty set. Its definition is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   = &lt;br /&gt;
\mbox {UNION} \ b \ \cdot \ \left(&lt;br /&gt;
   b \in \alpha_m&lt;br /&gt;
      \ |\ &lt;br /&gt;
   \beta_{S_{m-1}} \left( C_q \mapsto b \right)&lt;br /&gt;
      ; &lt;br /&gt;
   \left( &lt;br /&gt;
      \mbox{id} \left( \mbox{ran} \left( \beta_{S_{m-1}} \left( C_q \mapsto b \right) \right) \right) &lt;br /&gt;
         \ll&lt;br /&gt;
      \eta_{m,b}&lt;br /&gt;
   \right)&lt;br /&gt;
   \triangleright \sigma_{m,b}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of &amp;lt;math&amp;gt;\beta_{ S_m } \left( C_q \mapsto C_m \right)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;q&amp;lt;m\,&amp;lt;/math&amp;gt; is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\beta_{ S_m } \left( C_q \mapsto C_m \right)&lt;br /&gt;
=&lt;br /&gt;
\beta^\prime_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
   \ll &lt;br /&gt;
\theta_{S_m} \left( C_q \mapsto C_m \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this we have defined the whole naming function. As a summary we present the whole definition:&lt;br /&gt;
&lt;br /&gt;
===The dynamic binding function===&lt;br /&gt;
With the naming function defined it is surprisingly simple to give the dynamic binding function. To make it even easier we define the function:&lt;br /&gt;
&amp;lt;math&amp;gt;\delta : \left(\mbox{TYPE} \times \mbox{TYPE}\right) \rightarrow \left(\mbox{NAME} \rightarrow \mbox{FEATURE}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this function defined we can derive &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\gamma \left( S \mapsto f_n \right) = \left\{ D \mapsto f\ |\ \delta \left( S \mapsto D \right) \left( f_n \right) = f \right\}  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What remains is to define &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;. As with the naming function we do it recursively. We define &amp;lt;math&amp;gt;\delta_{ S_m }&amp;lt;/math&amp;gt; based on &amp;lt;math&amp;gt;\delta_{ S_{m-1} }&amp;lt;/math&amp;gt; since the following holds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta_{ S_1 } \subseteq \delta_{ S_2 } \subseteq \ldots \delta_{ S }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &lt;br /&gt;
\delta_{ S_m } \left( C_q \mapsto C_p \right) =&lt;br /&gt;
&lt;br /&gt;
\begin{cases}&lt;br /&gt;
&lt;br /&gt;
\emptyset             &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;gt; p \\&lt;br /&gt;
&lt;br /&gt;
\delta_{ S_{m-1} } \left( C_q \mapsto C_p \right)            &lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{if } q &amp;lt;= p &amp;lt; m \\&lt;br /&gt;
&lt;br /&gt;
\beta_S \left( C_q \mapsto C_m \right) ;&lt;br /&gt;
\left(&lt;br /&gt;
\left( \mbox {UNION} \, b \cdot \left(&lt;br /&gt;
    b \in \alpha_m&lt;br /&gt;
      \, |\, &lt;br /&gt;
    \left( \beta_S \left( b \mapsto b \right) ; \eta_{m,b} \right)^{-1}&lt;br /&gt;
      ;&lt;br /&gt;
    \delta_{S_{m-1}}\left( b \mapsto b \right)\right)  \right) \ll \tau_{m}&lt;br /&gt;
\right)&lt;br /&gt;
&amp;amp; &lt;br /&gt;
\mbox{otherwise}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Konradm</name></author>	</entry>

	</feed>