Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions copilot-theorem/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2026-03-31
* Fix examples so they compile with latest copilot-theorem. (#692)

2026-03-07
* Version bump (4.7). (#714)

Expand Down
4 changes: 2 additions & 2 deletions copilot-theorem/examples/BoyerMoore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module BoyerMoore where

import Copilot.Language hiding (length)
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Copilot.Theorem.Prover.SMT (induction, def, debug, z3)

import Copilot.Core.Type

Expand Down Expand Up @@ -71,7 +71,7 @@ spec = do
maj = majorityVote ss

induct :: Proof Universal
induct = induction def { nraNLSat = False, debug = False }
induct = induction def { debug = False } z3

-- | Initial value for a given type.
--
Expand Down
6 changes: 3 additions & 3 deletions copilot-theorem/examples/Grey.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Grey where

import Copilot.Language
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Copilot.Theorem.Prover.SMT (def, Options (..), z3, kInduction, induction)

import Prelude ()
import Data.String (fromString)
Expand Down Expand Up @@ -32,7 +32,7 @@ spec = do
r = extern "reset" Nothing

induct :: Proof Universal
induct = induction def { nraNLSat = False, debug = False }
induct = induction def { debug = False } z3

kinduct :: Word32 -> Proof Universal
kinduct k = kInduction def { nraNLSat = False, startK = k, maxK = k, debug = False }
kinduct k = kInduction def { startK = k, maxK = k, debug = False } z3
4 changes: 2 additions & 2 deletions copilot-theorem/examples/Incr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Prelude ()
import Copilot.Language

import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Copilot.Theorem.Prover.SMT (def, induction, debug, z3)

spec = do
bounds <- prop "bounds" (forAll $ x < 255)
Expand All @@ -16,4 +16,4 @@ spec = do
x = [2] ++ (1 + x)

induct :: Proof Universal
induct = induction def { nraNLSat = False, debug = True }
induct = induction def { debug = True } z3
6 changes: 3 additions & 3 deletions copilot-theorem/examples/SerialBoyerMoore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SerialBoyerMoore where

import Copilot.Language
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Copilot.Theorem.Prover.SMT (def, Options (..), induction, kInduction, z3)

import Prelude ()
import Data.String (fromString)
Expand Down Expand Up @@ -56,7 +56,7 @@ spec = do
(p, s, j) = majority input

induct :: Proof Universal
induct = induction def { nraNLSat = False, debug = False }
induct = induction def { debug = False } z3

kinduct :: Word32 -> Proof Universal
kinduct k = kInduction def { nraNLSat = False, startK = k, maxK = k, debug = False }
kinduct k = kInduction def { startK = k, maxK = k, debug = False } z3
6 changes: 3 additions & 3 deletions copilot-theorem/examples/SphericalWCV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Prelude ()
import Copilot.Language
import Copilot.Language.Reify
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Copilot.Theorem.Prover.SMT (def, debug, onlySat, onlyValidity, z3)

import qualified Copilot.Language.Operators.Propositional as P

Expand Down Expand Up @@ -241,7 +241,7 @@ localConvexity = do
theorem "6" (P.not (forAll $ locallyConvex tau)) arithSat

arith :: Proof Universal
arith = onlyValidity def { nraNLSat = True, debug = False }
arith = onlyValidity def { debug = False } z3

arithSat :: Proof Existential
arithSat = onlySat def { nraNLSat = True, debug = False }
arithSat = onlySat def { debug = False } z3
6 changes: 3 additions & 3 deletions copilot-theorem/examples/WCV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Prelude ()
import Copilot.Language
import Copilot.Language.Reify
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Copilot.Theorem.Prover.SMT (def, debug, onlySat, onlyValidity, z3)

import qualified Copilot.Language.Operators.Propositional as P

Expand Down Expand Up @@ -165,7 +165,7 @@ localConvexity = do
theorem "6" (P.not (forAll $ locallyConvex tau)) arithSat

arith :: Proof Universal
arith = onlyValidity def { nraNLSat = True, debug = False }
arith = onlyValidity def { debug = False } z3

arithSat :: Proof Existential
arithSat = onlySat def { nraNLSat = True, debug = False }
arithSat = onlySat def { debug = False } z3