-
Notifications
You must be signed in to change notification settings - Fork 124
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 #819 from GaloisInc/test-updates
Test updates
- Loading branch information
Showing
5 changed files
with
71 additions
and
3 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,26 @@ | ||
:set prover-stats = off | ||
:set show-examples = off | ||
|
||
:set ignore-safety = off | ||
|
||
:prove (\ (x:Integer) -> 0 < x ==> x < 4 ==> [3,2,1]@x == 3-x) | ||
:prove (\ (x:[8]) -> x < 4 ==> [3,2,1]@x == 3-x) | ||
|
||
:prove (\ (x:Integer) y -> (y == 0) || (y*(x/y) + x%y == x)) | ||
:prove (\ (x:[8]) y -> (y == 0) || (y*(x/y) + x%y == x)) | ||
|
||
:prove (\ (x:Integer) -> [0,0,0]@x == 0 ) | ||
:prove (\ (x:Integer) -> []@x == 0 ) | ||
:prove (\ (x:[8]) -> [0,0,0]@x == 0 ) | ||
|
||
:set ignore-safety = on | ||
|
||
:prove (\ (x:Integer) -> 0 < x ==> x < 4 ==> [3,2,1]@x == 3-x) | ||
:prove (\ (x:[8]) -> x < 4 ==> [3,2,1]@x == 3-x) | ||
|
||
:prove (\ (x:Integer) y -> (y == 0) || (y*(x/y) + x%y == x)) | ||
:prove (\ (x:[8]) y -> (y == 0) || (y*(x/y) + x%y == x)) | ||
|
||
:prove (\ (x:Integer) -> [0,0,0]@x == 0 ) | ||
:prove (\ (x:Integer) -> []@x == 0 ) | ||
:prove (\ (x:[8]) -> [0,0,0]@x == 0 ) |
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 @@ | ||
Loading module Cryptol | ||
Counterexample | ||
Counterexample | ||
Counterexample | ||
Counterexample | ||
Counterexample | ||
Counterexample | ||
Counterexample | ||
Q.E.D. | ||
Q.E.D. | ||
Q.E.D. | ||
Q.E.D. | ||
Q.E.D. | ||
Q.E.D. | ||
Q.E.D. |
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,8 +1,11 @@ | ||
:l superclass.cry | ||
:m superclass | ||
|
||
:browse superclass | ||
|
||
:t (fromInteger 42 + zero) | ||
:t (trunc (recip (fromInteger 5))) | ||
:t (\x -> x < fromInteger (floor (recip x))) | ||
:t (\x -> x == zero /. x) | ||
:t (zero == ~zero) | ||
:t (\x -> toInteger (x + zero)) | ||
:t (\x -> toInteger (x + zero)) | ||
:t (\x y -> x < y \/ x == y) |
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,10 +1,29 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading module Main | ||
Loading module superclass | ||
Symbols | ||
======= | ||
|
||
Public | ||
------ | ||
|
||
compareRound : {a} (Round a) => a -> a -> Bit | ||
eqCmp : {a} (Cmp a) => a -> a -> Bit | ||
fromIntField : {a} (Field a) => a | ||
fromIntIntegral : {a} (Integral a) => a | ||
fromIntRound : {a} (Round a) => a | ||
recipRound : {a} (Round a) => a -> Integer | ||
zeroField : {a} (Field a) => a | ||
zeroIntegral : {a} (Integral a) => a | ||
zeroLogic : {a} (Logic a) => a | ||
zeroRing : {a} (Ring a) => a | ||
zeroRound : {a} (Round a) => a | ||
|
||
(fromInteger 42 + zero) : {a} (Ring a) => a | ||
(trunc (recip (fromInteger 5))) : {a} (Round a) => Integer | ||
(\x -> x < fromInteger (floor (recip x))) : {a} (Round a) => | ||
a -> Bit | ||
(\x -> x == zero /. x) : {a} (Eq a, Field a) => a -> Bit | ||
(zero == ~zero) : {a} (Eq a, Logic a) => Bit | ||
(\x -> toInteger (x + zero)) : {a} (Integral a) => a -> Integer | ||
(\x y -> x < y \/ x == y) : {a} (Cmp a) => a -> a -> Bit |