LARA

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
sav08:semantics_of_array_manipulations [2008/04/08 17:25]
vkuncak created
sav08:semantics_of_array_manipulations [2008/04/08 20:51]
vkuncak
Line 1: Line 1:
 ====== Semantics of Array Manipulations ====== ====== Semantics of Array Manipulations ======
  
-Array semantics.+Suggest an attempt to model Java arrays. 
 + 
 +Example: 
 + 
 +  a = new T[10]; 
 +  b = new T[10]; 
 +++++| 
 +  a = b; 
 +  i = j; 
 +++++ 
 +  a[i] = 1; 
 +  b[j] = 2; 
 +  assert a[i]==1; 
 + 
 +One possible model: ++| arrays :: Obj \times Int \to Obj++