source:
CIVL/mods/dev.civl.com/examples/mem/readset/structComplex2.cvl@
8553be8
| Last change on this file since 8553be8 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 357 bytes | |
| Line | |
|---|---|
| 1 | #include<mem.cvh> |
| 2 | struct S { |
| 3 | int a[10][10]; |
| 4 | }; |
| 5 | |
| 6 | int main() { |
| 7 | struct T { |
| 8 | struct S s[10][10]; |
| 9 | } t[10][10]; |
| 10 | int x = 1; |
| 11 | |
| 12 | $read_set_push(); |
| 13 | t[0][x].s[2][3].a[4][5] = t[1][2].s[3][4].a[5][6]; |
| 14 | $mem m = $read_set_pop(); |
| 15 | $mem oracle = ($mem)&t[1][2].s[3][4].a[5][6]; |
| 16 | |
| 17 | oracle = $mem_union(oracle, ($mem)&x); |
| 18 | $assert($mem_equals(m, oracle)); |
| 19 | } |
Note:
See TracBrowser
for help on using the repository browser.
