mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-02 23:25:03 +03:00
commit
bf2258b5d8
26
tests/regression/ignore-safe.icry
Normal file
26
tests/regression/ignore-safe.icry
Normal file
@ -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 )
|
15
tests/regression/ignore-safe.icry.stdout
Normal file
15
tests/regression/ignore-safe.icry.stdout
Normal file
@ -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.
|
@ -1,3 +1,5 @@
|
|||||||
|
module superclass where
|
||||||
|
|
||||||
zeroRing : {a} (Ring a) => a
|
zeroRing : {a} (Ring a) => a
|
||||||
zeroRing = zero
|
zeroRing = zero
|
||||||
|
|
||||||
@ -27,3 +29,6 @@ recipRound x = trunc (recip x)
|
|||||||
|
|
||||||
compareRound : {a} (Round a) => a -> a -> Bit
|
compareRound : {a} (Round a) => a -> a -> Bit
|
||||||
compareRound x y = x < y
|
compareRound x y = x < y
|
||||||
|
|
||||||
|
eqCmp : {a} (Cmp a) => a -> a -> Bit
|
||||||
|
eqCmp x y = x == y
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
:l superclass.cry
|
:m superclass
|
||||||
|
|
||||||
|
:browse superclass
|
||||||
|
|
||||||
:t (fromInteger 42 + zero)
|
:t (fromInteger 42 + zero)
|
||||||
:t (trunc (recip (fromInteger 5)))
|
:t (trunc (recip (fromInteger 5)))
|
||||||
@ -6,3 +8,4 @@
|
|||||||
:t (\x -> x == zero /. x)
|
:t (\x -> x == zero /. x)
|
||||||
:t (zero == ~zero)
|
:t (zero == ~zero)
|
||||||
:t (\x -> toInteger (x + zero))
|
:t (\x -> toInteger (x + zero))
|
||||||
|
:t (\x y -> x < y \/ x == y)
|
||||||
|
@ -1,6 +1,24 @@
|
|||||||
Loading module Cryptol
|
Loading module Cryptol
|
||||||
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
|
(fromInteger 42 + zero) : {a} (Ring a) => a
|
||||||
(trunc (recip (fromInteger 5))) : {a} (Round a) => Integer
|
(trunc (recip (fromInteger 5))) : {a} (Round a) => Integer
|
||||||
(\x -> x < fromInteger (floor (recip x))) : {a} (Round a) =>
|
(\x -> x < fromInteger (floor (recip x))) : {a} (Round a) =>
|
||||||
@ -8,3 +26,4 @@ Loading module Main
|
|||||||
(\x -> x == zero /. x) : {a} (Eq a, Field a) => a -> Bit
|
(\x -> x == zero /. x) : {a} (Eq a, Field a) => a -> Bit
|
||||||
(zero == ~zero) : {a} (Eq a, Logic a) => Bit
|
(zero == ~zero) : {a} (Eq a, Logic a) => Bit
|
||||||
(\x -> toInteger (x + zero)) : {a} (Integral a) => a -> Integer
|
(\x -> toInteger (x + zero)) : {a} (Integral a) => a -> Integer
|
||||||
|
(\x y -> x < y \/ x == y) : {a} (Cmp a) => a -> a -> Bit
|
||||||
|
Loading…
Reference in New Issue
Block a user