I have a 2D array unsigned int a[10][10], and would like to represent it in the SEP clause.
I get the first part as data_at sh2 (tarray (tarray tuint 10) 10) but am confused about the second part. For a 1D array, we represent as (map Vint (map Int.repr contents_a1)) a_1 where a_1 : val and contents_a1 : list Z.
In this case I have taken two lists (contents_a11 :Z, contents_a22 : Z), but am however having problems to structure them up int the second clause of SEP with map Vint..
I'll give here an example in which the "contents" is an array of int instead of an array of Z. You can adapt as necessary with an extra "map Int.repr" in the right places.
Consider this C program:
You could prove it correct with the following specification and proof: