Skip to content

Commit b492d15

Browse files
committed
Check prelude using default SMT timeout
1 parent 005e42a commit b492d15

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

booster/library/Booster/SMT/Interface.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,17 @@ defaultSMTOptions =
8787
initSolver :: Log.LoggerMIO io => KoreDefinition -> SMTOptions -> io SMT.SMTContext
8888
initSolver def smtOptions = Log.withContext "smt" $ do
8989
ctxt <- mkContext smtOptions.transcript
90-
-- set timeout value before doing anything with the solver
91-
runSMT ctxt $ runCmd_ $ SetTimeout smtOptions.timeout
90+
-- set timeout to be used when checking prelude, use the default (not use supplied) timeout value
91+
runSMT ctxt $ runCmd_ $ SetTimeout defaultSMTOptions.timeout
9292
Log.logMessage ("Checking definition prelude" :: Text)
9393
check <-
9494
runSMT ctxt $
9595
runPrelude def >> runCmd CheckSat
9696
case check of
97-
Sat -> pure ctxt
97+
Sat -> do
98+
-- set timeout value for the general queries
99+
runSMT ctxt $ runCmd_ $ SetTimeout smtOptions.timeout
100+
pure ctxt
98101
other -> do
99102
Log.logMessage $ "Initial SMT definition check returned " <> pack (show other)
100103
closeContext ctxt

0 commit comments

Comments
 (0)