Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
i7
peregrine
Commits
4bbf02aa
Commit
4bbf02aa
authored
Aug 01, 2018
by
Philipp Meyer
Browse files
Remove auto option
parent
20b227e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Options.hs
View file @
4bbf02aa
...
...
@@ -40,7 +40,6 @@ data Options = Options { inputFormat :: InputFormat
,
optProperties
::
PropertyOption
,
optRefinementType
::
RefinementOption
,
optMinimizeRefinement
::
Int
,
optSMTAuto
::
Bool
,
optInvariant
::
Bool
,
optOutput
::
Maybe
String
,
outputFormat
::
OutputFormat
...
...
@@ -56,7 +55,6 @@ startOptions = Options { inputFormat = InPP
,
optProperties
=
PropDefault
,
optRefinementType
=
RefDefault
,
optMinimizeRefinement
=
0
,
optSMTAuto
=
True
,
optInvariant
=
False
,
optOutput
=
Nothing
,
outputFormat
=
OutDOT
...
...
@@ -143,10 +141,6 @@ options =
"METHOD"
)
"Minimize size of refinement structure by method METHOD (1-4)"
,
Option
""
[
"smt-disable-auto-config"
]
(
NoArg
(
\
opt
->
Right
opt
{
optSMTAuto
=
False
}))
"Disable automatic configuration of the SMT solver"
,
Option
"v"
[
"verbose"
]
(
NoArg
(
\
opt
->
Right
opt
{
optVerbosity
=
optVerbosity
opt
+
1
}))
"Increase verbosity (may be specified more than once)"
...
...
src/Solver.hs
View file @
4bbf02aa
...
...
@@ -32,20 +32,17 @@ symConstraints vars exVars allVars constraint = do
allSyms
<-
mapM
forall
allVars
return
$
constraint
$
val
$
M
.
fromList
$
(
vars
`
zip
`
syms
)
++
(
exVars
`
zip
`
exSyms
)
++
(
allVars
`
zip
`
allSyms
)
getSolverConfig
::
Bool
->
Bool
->
SMTConfig
getSolverConfig
verbose
auto
=
let
tweaks
=
if
auto
then
[]
else
[
"(set-option :auto_config false)"
]
in
z3
{
verbose
=
verbose
,
solverTweaks
=
tweaks
}
getSolverConfig
::
Bool
->
SMTConfig
getSolverConfig
verbose
=
z3
{
verbose
=
verbose
}
checkSat
::
(
SatModel
a
,
SymWord
a
,
Show
a
,
Show
b
)
=>
ConstraintProblem
a
b
->
OptIO
(
Maybe
b
)
checkSat
(
problemName
,
resultName
,
vars
,
exVars
,
allVars
,
constraint
,
interpretation
)
=
do
verbosePut
2
$
"Checking SAT of "
++
problemName
verbosity
<-
opt
optVerbosity
autoConf
<-
opt
optSMTAuto
result
<-
liftIO
(
satWith
(
getSolverConfig
(
verbosity
>=
4
)
autoConf
)
result
<-
liftIO
(
satWith
(
getSolverConfig
(
verbosity
>=
4
))
(
symConstraints
vars
exVars
allVars
constraint
))
case
rebuildModel
vars
(
getModel
result
)
of
case
rebuildModel
vars
(
getModel
Assignment
result
)
of
Nothing
->
do
verbosePut
2
"- unsat"
return
Nothing
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment