source: CIVL/examples/mem/writeset/ws_push_pop_memcpy.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 393 bytes
RevLine 
[da65ee2]1#include <mem.cvh>
2#include <string.h>
3$input int N, n;
4$assume(N > n && n > 5);
5
6int main() {
7 double a[10], b[10][10];
8
9 $write_set_push();
10 a[3] = 0;
11 b[1][3] = 0;
12 memcpy(&a[1], &a[2], sizeof(double) * 3);
13 memcpy(&b[1][0], &a[0], sizeof(double) * 3);
14
15 $mem m = $write_set_pop();
16
17 $assert($mem_contains(m, &a[1 .. 3]));
18 $assert($mem_contains(m, &b[1][0 .. 2]));
19 return 0;
20}
Note: See TracBrowser for help on using the repository browser.