Skip to content

Fix bug report: --smt-reset-interval #2263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 16, 2020
Merged
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
16 changes: 9 additions & 7 deletions kore/app/exec/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ parserInfoModifiers =
unparseKoreSearchOptions :: KoreSearchOptions -> [String]
unparseKoreSearchOptions (KoreSearchOptions _ bound searchType) =
[ "--search searchFile.kore"
, maybeLimit "" (\limit -> "--bound " <> show limit) bound
, "--searchType " <> show searchType
, maybeLimit "" (\limit -> unwords ["--bound", show limit]) bound
, unwords ["--searchType", show searchType]
]

unparseKoreMergeOptions :: KoreMergeOptions -> [String]
Expand All @@ -416,9 +416,11 @@ unparseKoreProveOptions
)
=
[ "--prove spec.kore"
, "--spec-module " <> unpack moduleName
, "--graph-search "
<> if graphSearch == DepthFirst then "depth-first" else "breadth-first"
, unwords ["--spec-module", unpack moduleName]
, unwords
[ "--graph-search"
, if graphSearch == DepthFirst then "depth-first" else "breadth-first"
]
, if bmc then "--bmc" else ""
, maybe "" ("--save-proofs " <>) saveProofs
]
Expand Down Expand Up @@ -455,12 +457,12 @@ koreExecSh
[ pure $ defaultDefinitionFilePath koreExecOptions
, patternFileName $> "--pattern pgm.kore"
, outputFileName $> "--output result.kore"
, pure $ "--module " <> unpack (getModuleName mainModuleName)
, pure $ unwords ["--module", unpack (getModuleName mainModuleName)]
, (\limit -> unwords ["--breadth", show limit])
<$> maybeLimit Nothing Just breadthLimit
, (\limit -> unwords ["--depth", show limit])
<$> maybeLimit Nothing Just depthLimit
, pure $ "--strategy " <> fst strategy
, pure $ unwords ["--strategy", fst strategy]
, rtsStatistics $>
unwords ["--rts-statistics", defaultRtsStatisticsFilePath]
]
Expand Down
12 changes: 10 additions & 2 deletions kore/src/Options/SMT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,14 @@ unparseKoreSolverOptions
catMaybes
[ (\limit -> unwords ["--smt-timeout", show limit])
<$> maybeLimit Nothing Just unwrappedTimeOut
, pure $ unwords ["--smt-reset-interval", show resetInterval]
, pure
$ unwords
[ "--smt-reset-interval"
, show . getResetInterval $ resetInterval
]
, unwrappedPrelude
$> unwords ["--smt-prelude", defaultSmtPreludeFilePath]
, pure $ "--smt " <> fmap Char.toLower (show solver)
, pure $ unwords ["--smt", unparseSolver solver]
]

-- | Available SMT solvers.
Expand All @@ -144,6 +148,10 @@ parseSolver =
knownOptions = intercalate ", " (map fst options)
options = [ (map Char.toLower $ show s, s) | s <- [minBound .. maxBound] ]

unparseSolver :: Solver -> String
unparseSolver Z3 = "z3"
unparseSolver None = "none"

readSum :: String -> [(String, value)] -> Options.ReadM (String, value)
readSum longName options = do
opt <- str
Expand Down