-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Civl] Fixed bug in refinement check for actions (#853)
The refinement check for actions was handling the frame condition correctly. Now the frame condition is handled in the same manner as the refinement check for procedures. Co-authored-by: Shaz Qadeer <[email protected]>
- Loading branch information
1 parent
9ae690e
commit d7b1041
Showing
8 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// RUN: %parallel-boogie "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
var {:layer 0,2} x: int; | ||
var {:layer 0,2} y: int; | ||
|
||
atomic action {:layer 1} A() | ||
modifies x, y; | ||
refines B; | ||
{ | ||
x := x + 1; | ||
call X(); | ||
} | ||
|
||
action {:layer 1} X() | ||
modifies y; | ||
{ | ||
y := y + 1; | ||
} | ||
|
||
atomic action {:layer 2} B() | ||
modifies x; | ||
{ | ||
havoc x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
simple-fail.bpl(13,1): Error: a postcondition could not be proved on this return path | ||
(0,0): Related location: Refinement check of A failed | ||
Execution trace: | ||
simple-fail.bpl(11,7): anon0 | ||
|
||
Boogie program verifier finished with 0 verified, 1 error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// RUN: %parallel-boogie "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
var {:layer 0,2} x: int; | ||
var {:layer 0,1} y: int; | ||
|
||
atomic action {:layer 1} A() | ||
modifies x, y; | ||
refines B; | ||
{ | ||
x := x + 1; | ||
call X(); | ||
} | ||
|
||
action {:layer 1} X() | ||
modifies y; | ||
{ | ||
y := y + 1; | ||
} | ||
|
||
atomic action {:layer 2} B() | ||
modifies x; | ||
{ | ||
havoc x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
Boogie program verifier finished with 1 verified, 0 errors |