Skip to content

Commit 14e6cfb

Browse files
Reset SMT solver (#2096)
1 parent a45859f commit 14e6cfb

File tree

23 files changed

+171
-458
lines changed

23 files changed

+171
-458
lines changed

kore/app/exec/Main.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,12 @@ execute options mainModule worker =
851851
None -> withoutSMT
852852
where
853853
withZ3 =
854-
SMT.runSMT config $ do
855-
give (MetadataTools.build mainModule) (declareSMTLemmas mainModule)
854+
SMT.runSMT
855+
config
856+
( give
857+
(MetadataTools.build mainModule)
858+
(declareSMTLemmas mainModule)
859+
)
856860
worker
857861
withoutSMT = SMT.runNoSMT worker
858862
KoreExecOptions { smtTimeOut, smtPrelude, smtSolver } = options

kore/app/repl/Main.hs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,13 @@ mainWithOptions
253253
\ when running the repl in run-script mode."
254254
exitFailure
255255

256-
SMT.runSMT smtConfig $ do
257-
give (MetadataTools.build indexedModule)
258-
$ declareSMTLemmas indexedModule
259-
proveWithRepl
256+
SMT.runSMT
257+
smtConfig
258+
( give
259+
(MetadataTools.build indexedModule)
260+
(declareSMTLemmas indexedModule)
261+
)
262+
$ proveWithRepl
260263
indexedModule
261264
specDefIndexedModule
262265
Nothing

kore/bench/exec/Main.hs

Lines changed: 0 additions & 198 deletions
This file was deleted.

kore/bench/parser/Main.hs

Lines changed: 0 additions & 85 deletions
This file was deleted.

kore/package.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -229,31 +229,3 @@ tests:
229229
- template-haskell >=2.14
230230
- temporary >=1.3
231231
<<: *common-exe
232-
233-
benchmarks:
234-
kore-parser-benchmark:
235-
main: Main.hs
236-
other-modules:
237-
- Paths
238-
source-dirs:
239-
- bench/parser
240-
- test
241-
dependencies:
242-
- kore
243-
- criterion >=1.5
244-
- template-haskell >=2.14
245-
<<: *common-exe
246-
247-
kore-exec-benchmark:
248-
main: Main.hs
249-
other-modules:
250-
- Paths
251-
source-dirs:
252-
- bench/exec
253-
- test
254-
dependencies:
255-
- kore
256-
- criterion >=1.5
257-
- template-haskell >=2.14
258-
- temporary >=1.3
259-
<<: *common-exe

kore/src/Kore/Strategies/Goal.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ import Logic
175175
)
176176
import qualified Logic
177177
import qualified Pretty
178+
import qualified SMT
178179

179180
{- | The final nodes of an execution graph which were not proven.
180181
@@ -527,8 +528,10 @@ transitionRule claims axiomGroups = transitionRuleWorker
527528

528529
transitionRuleWorker Begin Proven = empty
529530
transitionRuleWorker Begin (GoalStuck _) = empty
530-
transitionRuleWorker Begin (GoalRewritten goal) = pure (Goal goal)
531-
transitionRuleWorker Begin proofState = pure proofState
531+
transitionRuleWorker Begin (GoalRewritten goal) =
532+
SMT.reinit >> pure (Goal goal)
533+
transitionRuleWorker Begin proofState =
534+
SMT.reinit >> pure proofState
532535

533536
transitionRuleWorker Simplify proofState
534537
| Just goal <- retractSimplifiable proofState =

0 commit comments

Comments
 (0)