Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shazqadeer committed Oct 26, 2024
1 parent 4881964 commit f4fa1a7
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
67 changes: 67 additions & 0 deletions Test/civl/regression-tests/mover-proc-in-parcall.bpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// RUN: %parallel-boogie "%s" > "%t"
// RUN: %diff "%s.expect" "%t"

var {:layer 0,1} x: int;

yield procedure {:layer 0} Incr();
refines both action {:layer 1} _ {
x := x + 1;
}

yield right procedure {:layer 1} A()
modifies x;
ensures {:layer 1} x == old(x) + 2;
{
par Incr() | Incr();
}

yield right procedure {:layer 1} B()
modifies x;
ensures {:layer 1} x == old(x) + 4;
{
par A() | A();
}

yield right procedure {:layer 1} R1(i: int)
modifies x;
requires {:layer 1} 0 <= i;
ensures {:layer 1} x == old(x) + i;
{
if (i == 0) {
return;
}
par Incr() | R1(i-1);
}

yield right procedure {:layer 1} R2(i: int)
modifies x;
requires {:layer 1} 0 <= i;
ensures {:layer 1} x == old(x) + i;
{
if (i == 0) {
return;
}
par R2(i-1) | Incr();
}

yield right procedure {:layer 1} M1(i: int)
modifies x;
requires {:layer 1} 0 <= i;
ensures {:layer 1} x == old(x) + i;
{
if (i == 0) {
return;
}
par Incr() | M2(i-1);
}

yield right procedure {:layer 1} M2(i: int)
modifies x;
requires {:layer 1} 0 <= i;
ensures {:layer 1} x == old(x) + i;
{
if (i == 0) {
return;
}
par M1(i-1) | Incr();
}
2 changes: 2 additions & 0 deletions Test/civl/regression-tests/mover-proc-in-parcall.bpl.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Boogie program verifier finished with 6 verified, 0 errors

0 comments on commit f4fa1a7

Please sign in to comment.