forked from kind2-mc/kind2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix check: no calls to nodes subject to refinement in contracts
- Loading branch information
1 parent
5e2753d
commit 0c3f493
Showing
5 changed files
with
107 additions
and
50 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
20 changes: 20 additions & 0 deletions
20
tests/ounit/lustre/lustreAstDependencies/circular_contracts_3.lus
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,20 @@ | ||
contract C1(x: int) returns (z:int); | ||
let | ||
import C1(x) returns (z); | ||
tel | ||
|
||
node N(x: int) returns (z:int); | ||
(*@contract | ||
import C1(x) returns (z); | ||
*) | ||
let | ||
z = x + 1; | ||
tel | ||
|
||
node M(x: int) returns (z:int); | ||
(*@contract | ||
guarantee z = N(x); | ||
*) | ||
let | ||
z = x + 1; | ||
tel |
1 change: 0 additions & 1 deletion
1
tests/ounit/lustre/lustreAstDependencies/test_circular_contracts.lus
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,6 +1,5 @@ | ||
contract topSpec(x: int) returns (y: int); | ||
let | ||
guarantee x=y; | ||
assume n(x) = y; | ||
tel | ||
|
||
|
20 changes: 20 additions & 0 deletions
20
tests/ounit/lustre/lustreSyntaxChecks/no_node_subject_to_refinement_in_contract_3.lus
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,20 @@ | ||
contract C1(x: int) returns (z:int); | ||
let | ||
guarantee z > x; | ||
tel | ||
|
||
node N(x: int) returns (z:int); | ||
(*@contract | ||
import C1(x) returns (z); | ||
*) | ||
let | ||
z = x + 1; | ||
tel | ||
|
||
node M(x: int) returns (z:int); | ||
(*@contract | ||
guarantee z = N(x); | ||
*) | ||
let | ||
z = x + 1; | ||
tel |
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