diff --git a/src/test/resources/synthesis/abduct/list-copy-len-ptr.syn b/src/test/resources/synthesis/abduct/list-copy-len-ptr.syn index 6925ba9f2..a323ed76d 100644 --- a/src/test/resources/synthesis/abduct/list-copy-len-ptr.syn +++ b/src/test/resources/synthesis/abduct/list-copy-len-ptr.syn @@ -17,8 +17,8 @@ void list_copy (loc r) { list_copy(r); let y12 = *r; let y2 = malloc(2); - *(y2 + 1) = nxt2; - *r = y2; *(x2 + 1) = y12; + *r = y2; + *(y2 + 1) = nxt2; } } \ No newline at end of file diff --git a/src/test/resources/synthesis/account/alloc-struct.syn b/src/test/resources/synthesis/account/alloc-struct.syn index 9f02c9a0a..08777936d 100644 --- a/src/test/resources/synthesis/account/alloc-struct.syn +++ b/src/test/resources/synthesis/account/alloc-struct.syn @@ -6,7 +6,7 @@ should be able to allocate structures ### void createAccount (loc x, int bal, int lim) { let y2 = malloc(2); - *(y2 + 1) = bal; - *y2 = lim; *x = y2; + *y2 = lim; + *(y2 + 1) = bal; } \ No newline at end of file diff --git a/src/test/resources/synthesis/entail/duplicator.syn b/src/test/resources/synthesis/entail/duplicator.syn index 469f10511..0a5b8f93c 100644 --- a/src/test/resources/synthesis/entail/duplicator.syn +++ b/src/test/resources/synthesis/entail/duplicator.syn @@ -11,8 +11,8 @@ void duplicate(loc x, loc r) void duplicate (loc x, loc r) { let a2 = *x; let z2 = malloc(2); - free(x); - *(z2 + 1) = a2; - *z2 = a2; *r = z2; + *z2 = a2; + *(z2 + 1) = a2; + free(x); } \ No newline at end of file diff --git a/src/test/resources/synthesis/simple/alloc.syn b/src/test/resources/synthesis/simple/alloc.syn index f24e9fb5d..86e506161 100644 --- a/src/test/resources/synthesis/simple/alloc.syn +++ b/src/test/resources/synthesis/simple/alloc.syn @@ -9,6 +9,6 @@ void create(loc x) void create (loc x) { let y2 = malloc(1); - *y2 = 42; *x = y2; + *y2 = 42; } diff --git a/src/test/resources/synthesis/simple/blocks.syn b/src/test/resources/synthesis/simple/blocks.syn index 1cf47aa54..9372c1521 100644 --- a/src/test/resources/synthesis/simple/blocks.syn +++ b/src/test/resources/synthesis/simple/blocks.syn @@ -10,8 +10,8 @@ void create(loc x) void create (loc x) { let y2 = malloc(3); - *(y2 + 2) = x; - *(y2 + 1) = 2; - *y2 = 1; *x = y2; + *y2 = 1; + *(y2 + 1) = 2; + *(y2 + 2) = x; } \ No newline at end of file diff --git a/src/test/resources/synthesis/simple/kareem.syn b/src/test/resources/synthesis/simple/kareem.syn index f524c5b53..aa11175eb 100644 --- a/src/test/resources/synthesis/simple/kareem.syn +++ b/src/test/resources/synthesis/simple/kareem.syn @@ -6,8 +6,8 @@ void kareem1(loc x, loc y, loc z) ### void kareem1 (loc x, loc y, loc z) { let v2 = *x; - *v2 = x; + *x = y; *z = x; *y = z; - *x = y; + *v2 = x; } \ No newline at end of file diff --git a/src/test/resources/synthesis/simple/kareem2.syn b/src/test/resources/synthesis/simple/kareem2.syn index 835191f66..cdb135a8a 100644 --- a/src/test/resources/synthesis/simple/kareem2.syn +++ b/src/test/resources/synthesis/simple/kareem2.syn @@ -12,8 +12,8 @@ void kareem3 (loc x) { let a2 = *x; let b2 = *a2; let c2 = *b2; - *c2 = b2; + *x = 42; *a2 = c2; + *c2 = b2; *b2 = a2; - *x = 42; } \ No newline at end of file