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