Skip to content

Commit

Permalink
Fixing remaining toy tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasergey committed Jul 12, 2018
1 parent 5ea07fb commit 585e27f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/test/resources/synthesis/abduct/list-copy-len-ptr.syn
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions src/test/resources/synthesis/account/alloc-struct.syn
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 3 additions & 3 deletions src/test/resources/synthesis/entail/duplicator.syn
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion src/test/resources/synthesis/simple/alloc.syn
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ void create(loc x)

void create (loc x) {
let y2 = malloc(1);
*y2 = 42;
*x = y2;
*y2 = 42;
}
6 changes: 3 additions & 3 deletions src/test/resources/synthesis/simple/blocks.syn
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/test/resources/synthesis/simple/kareem.syn
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/test/resources/synthesis/simple/kareem2.syn
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 585e27f

Please sign in to comment.