-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72bf093
commit 6281499
Showing
5 changed files
with
66 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module C | ||
|
||
//========= | ||
syntax Bool ::= vars(List) | ||
//======== | ||
|
||
|
||
|
||
|
||
endmodule |
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 @@ | ||
@val(12,12,false) |
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,10 @@ | ||
|
||
module SPEC | ||
imports TEST | ||
|
||
rule <k> V:Val => I:Int </k> | ||
//requires #noUndef(V) | ||
|
||
//rule <k> V:NUVal => I:Int </k> | ||
|
||
endmodule |
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,30 @@ | ||
//require "c.k" | ||
|
||
module TEST | ||
//imports C | ||
|
||
syntax Val ::= "@undef" [smtlib(val_undef)] | ||
syntax Val ::= "@val" "("Int","Int","Bool")" [smtlib(smt_val)] //int,width,signed | ||
|
||
//syntax Val ::= NUVal | ||
//syntax NUVal ::= "@val" "("Int","Int","Bool")" | ||
|
||
|
||
//========= | ||
//syntax Bool ::= vars(List) | ||
//======== | ||
|
||
|
||
configuration | ||
<T> | ||
<k> $PGM:Val </k> | ||
</T> | ||
|
||
|
||
rule <k> @val(I:Int,_,_) => I </k> | ||
|
||
|
||
syntax Bool ::= "#noUndef" "(" Val ")" [function]//[function, smtlib(no_undef)] | ||
rule #noUndef(@val(_,_,_)) => true //[smt-lemma] | ||
rule #noUndef(@undef) => false //[smt-lemma] | ||
endmodule |
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,15 @@ | ||
|
||
module SPEC | ||
imports TEST | ||
|
||
|
||
rule <k> V:Val </k> | ||
//requires #noUndef(V) | ||
ensures vars(ListItem(V) ListItem(0)) | ||
|
||
|
||
rule <k> I:Int </k> | ||
ensures vars(ListItem(I) ListItem(0)) | ||
[trusted] | ||
|
||
endmodule |