Skip to content

Commit

Permalink
fix compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
LeventErkok committed Sep 23, 2024
1 parent bf76737 commit f78f98d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Documentation/SBV/Examples/KnuckleDragger/InsertionSort.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ nonDecreasing = smtFunction "nonDecreasing" $ \l -> null l .|| null (tail l)

-- | The default settings for z3 have trouble running this proof out-of-the-box.
-- We have to pass auto_config=false to z3!
z3NoAutoConfig :: KDConfig
z3NoAutoConfig = z3KD{kdExtraSolverArgs = ["auto_config=false"]}
z3NoAutoConfig :: SMTConfig
z3NoAutoConfig = z3{extraArgs = ["auto_config=false"]}

-- | Correctness of insertion-sort.
--
-- We have:
--
-- >>> correctness
correctness :: IO Proof
correctness = runKDWith cvc5KD $ do
correctness = runKDWith cvc5 $ do

insertIntoNonDecreasing1 <- lemma "insertIntoNonDecreasing1"
(\(Forall @"e" e) (Forall @"x" x) (Forall @"xs" xs) -> e .<= x .=> nonDecreasing (x .: xs) .== nonDecreasing (insert e (x .: xs)))
Expand All @@ -64,7 +64,7 @@ correctness = runKDWith cvc5KD $ do
(\(Forall @"e" e) (Forall @"x" x) (Forall @"xs" xs) -> e .> x .=> nonDecreasing (x .: xs) .== nonDecreasing (insert e (x .: xs)))
-- []

insertIntoNonDecreasing3 <- lemmaWith z3KD "insertIntoNonDecreasing3"
insertIntoNonDecreasing3 <- lemmaWith z3 "insertIntoNonDecreasing3"
(\(Forall @"e" e) (Forall @"xs" xs) -> nonDecreasing xs .== nonDecreasing (insert e xs))
[induct (\e -> nonDecreasing . insert e), insertIntoNonDecreasing1, insertIntoNonDecreasing2]

Expand Down

0 comments on commit f78f98d

Please sign in to comment.