-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1378 from GaloisInc/issue316
Add test case for unfinished proofs
- Loading branch information
Showing
2 changed files
with
17 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,14 @@ | ||
enable_experimental; | ||
|
||
let andI = core_axiom "(a b : Bool) -> EqTrue a -> EqTrue b -> EqTrue (and a b)"; | ||
let script = do { simplify (cryptol_ss()); goal_apply andI; trivial; }; | ||
|
||
b <- fresh_symbolic "b" {| Bit |}; | ||
|
||
print "The following proof should fail because the proof is incomplete."; | ||
fails (prove_print script {{ True && b }}); | ||
|
||
print "Now we check that the 'prove' command also does the correct thing."; | ||
r <- prove script {{ True && b }}; | ||
caseProofResult r (\_ -> fails (print "We should not get a theorem!")) | ||
(\x -> do { prove_print z3 {{ x == () }}; return ();} ); |
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,3 @@ | ||
set -e | ||
|
||
$SAW test.saw |