You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Example.BinaryGCD where
import Prelude hiding (even)
{-@
even ::
n : Integer ->
{m : Bool | m = (n mod 2 = 0)}
@-}
even :: Integer -> Bool
even n = mod n 2 == 0
{-@
divTwoPow ::
nn : {n : Integer | n>0} ->
{m : Integer | m>0 && m mod 2 = 1 && m <= nn && nn mod m = 0}
@-}
divTwoPow :: Integer -> Integer
divTwoPow n =
if even n then divTwoPow (div n 2) else n
The nn mod m = 0 part sends Z3 (version 4.8.12) to an infinite loop.
Here is the SMT code that Liquid Haskell extracts from the code above:
I have the following Liquid Haskell code:
The
nn mod m = 0
part sends Z3 (version 4.8.12) to an infinite loop.Here is the SMT code that Liquid Haskell extracts from the code above:
The text was updated successfully, but these errors were encountered: