Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kheradmand committed Apr 4, 2018
1 parent 72bf093 commit 6281499
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tranlation-validation/simple/c.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module C

//=========
syntax Bool ::= vars(List)
//========




endmodule
1 change: 1 addition & 0 deletions tranlation-validation/simple/empty
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@val(12,12,false)
10 changes: 10 additions & 0 deletions tranlation-validation/simple/test-spec.k
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
30 changes: 30 additions & 0 deletions tranlation-validation/simple/test.k
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
15 changes: 15 additions & 0 deletions tranlation-validation/simple/test2-spec.k
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

0 comments on commit 6281499

Please sign in to comment.