-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Civl] bug fix for noninterference checking for pending asyncs (#773)
For a particular layer number, those pending asyncs must be collected for which noninterference checking against yield invariants must be performed. The collection of pending asyncs was not sound earlier. This PR makes a fix to make it sound.
- Loading branch information
1 parent
82b9a4f
commit 1d3f399
Showing
4 changed files
with
46 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
Boogie program verifier finished with 4 verified, 0 errors | ||
Boogie program verifier finished with 5 verified, 0 errors |
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,32 @@ | ||
// RUN: %parallel-boogie "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
atomic action {:layer 3} A_Foo() | ||
creates A_Incr; | ||
{ | ||
call create_async(A_Incr()); | ||
} | ||
|
||
yield procedure {:layer 2} Foo() | ||
refines A_Foo; | ||
{ | ||
async call Incr(); | ||
} | ||
|
||
async atomic action {:layer 1,3} A_Incr() | ||
modifies x; | ||
{ | ||
x := x + 1; | ||
} | ||
|
||
yield procedure {:layer 0} Incr(); | ||
refines A_Incr; | ||
|
||
yield invariant {:layer 1} Inv(); | ||
invariant x == 0; | ||
|
||
var {:layer 0,3} x: int; | ||
|
||
yield procedure {:layer 1} Bar() | ||
preserves call Inv(); | ||
{ } |
7 changes: 7 additions & 0 deletions
7
Test/civl/regression-tests/pa-noninterference-check.bpl.expect
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,7 @@ | ||
pa-noninterference-check.bpl(26,1): Error: Non-interference check failed | ||
Execution trace: | ||
pa-noninterference-check.bpl(16,34): inline$A_Incr$0$Entry | ||
pa-noninterference-check.bpl(19,7): inline$A_Incr$0$anon0 | ||
pa-noninterference-check.bpl(16,34): inline$A_Incr$0$Return | ||
|
||
Boogie program verifier finished with 4 verified, 1 error |