Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sav07_lecture_4 [2007/03/27 16:33] leander.eyer |
sav07_lecture_4 [2007/03/27 16:38] leander.eyer |
||
---|---|---|---|
Line 193: | Line 193: | ||
The value of K is known for //global arrays// (statically defined). The case of dynamically allocated arrays (like the one in Java) will be dealt in a further section. | The value of K is known for //global arrays// (statically defined). The case of dynamically allocated arrays (like the one in Java) will be dealt in a further section. | ||
+ | |||
Line 217: | Line 218: | ||
Possible mathematical model: fields as functions from objects to objects. | Possible mathematical model: fields as functions from objects to objects. | ||
- | left : Node => Node | + | left : Node -> Node |
- | right : Node => Node | + | right : Node -> Node |
What is the meaning of assignment? | What is the meaning of assignment? | ||
Line 269: | Line 270: | ||
assume(x ∉ alloc); | assume(x ∉ alloc); | ||
alloc = alloc ∪ {x} | alloc = alloc ∪ {x} | ||
+ | |||
Line 274: | Line 276: | ||
==== Dynamically allocated arrays ==== | ==== Dynamically allocated arrays ==== | ||
- | When we allow dynamically allocated arrays, we introduce an additional parameter to the array function which identifies the array in question. | + | When we allow dynamically allocated arrays, we introduce a new global function **array** which maps a pair (arrayID, index) to values. |
x[i] = v; | x[i] = v; |