Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
peregrine
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
i7
peregrine
Commits
2c4fc15f
Commit
2c4fc15f
authored
Feb 07, 2017
by
Philipp J. Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added option to disable auto config of smt solver
parent
2fc3ba4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
src/Main.hs
src/Main.hs
+6
-6
src/Options.hs
src/Options.hs
+6
-0
src/Solver.hs
src/Solver.hs
+7
-1
No files found.
src/Main.hs
View file @
2c4fc15f
...
...
@@ -478,17 +478,17 @@ refineTerminalMarkingsUniqueConsensusProperty net traps siphons inequalities c@(
r1
<-
checkSatMin
$
Solver
.
TerminalMarkingsUniqueConsensus
.
checkUnmarkedTrapSat
net
m0
m1
m2
x1
x2
case
r1
of
Nothing
->
do
r
eturn
(
Just
c
,
traps
,
siphons
,
inequalities
)
-- r2 <- checkSatMin $ Solver.TerminalMarkingsUniqueConsensus.checkGeneralizedSiphonConstraintsSat net m0 m1 m2 x1 x2
-- case r2 of
-- Nothing -> do
r
2
<-
checkSatMin
$
Solver
.
TerminalMarkingsUniqueConsensus
.
checkGeneralizedSiphonConstraintsSat
net
m0
m1
m2
x1
x2
case
r2
of
Nothing
->
do
return
(
Just
c
,
traps
,
siphons
,
inequalities
)
-- r3 <- checkSat $ Solver.TerminalMarkingsUniqueConsensus.checkGeneralizedCoTrapSat net m0 m1 m2 x1 x2
-- case r3 of
-- Nothing -> return (Just c, traps, siphons, inequalities)
-- Just inequality ->
-- checkTerminalMarkingsUniqueConsensusProperty' net traps siphons (inequality:inequalities)
--
Just siphon ->
--
checkTerminalMarkingsUniqueConsensusProperty' net traps (siphon:siphons) inequalities
Just
siphon
->
checkTerminalMarkingsUniqueConsensusProperty'
net
traps
(
siphon
:
siphons
)
inequalities
Just
trap
->
checkTerminalMarkingsUniqueConsensusProperty'
net
(
trap
:
traps
)
siphons
inequalities
...
...
src/Options.hs
View file @
2c4fc15f
...
...
@@ -48,6 +48,7 @@ data Options = Options { inputFormat :: InputFormat
,
optRefinementType
::
Maybe
RefinementType
,
optMinimizeRefinement
::
Int
,
optAuto
::
Bool
,
optSMTAuto
::
Bool
,
optInvariant
::
Bool
,
optBoolConst
::
Bool
,
optOutput
::
Maybe
String
...
...
@@ -67,6 +68,7 @@ startOptions = Options { inputFormat = PNET
,
optRefinementType
=
Just
SComponentWithCutRefinement
,
optMinimizeRefinement
=
0
,
optAuto
=
False
,
optSMTAuto
=
True
,
optInvariant
=
False
,
optBoolConst
=
False
,
optOutput
=
Nothing
...
...
@@ -273,6 +275,10 @@ options =
(
NoArg
(
\
opt
->
Right
opt
{
optAuto
=
True
}))
"Automatically find best refinement, minimization and simplification method"
,
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 @
2c4fc15f
...
...
@@ -30,12 +30,18 @@ symConstraints vars constraint = do
syms
<-
mapM
exists
vars
return
$
constraint
$
val
$
M
.
fromList
$
vars
`
zip
`
syms
getSolverConfig
::
Bool
->
Bool
->
SMTConfig
getSolverConfig
verbose
auto
=
let
tweaks
=
if
auto
then
[]
else
[
"(set-option :auto_config false)"
]
in
z3
{
verbose
=
verbose
,
solverTweaks
=
tweaks
}
checkSat
::
(
SatModel
a
,
SymWord
a
,
Show
a
,
Show
b
)
=>
ConstraintProblem
a
b
->
OptIO
(
Maybe
b
)
checkSat
(
problemName
,
resultName
,
vars
,
constraint
,
interpretation
)
=
do
verbosePut
2
$
"Checking SAT of "
++
problemName
verbosity
<-
opt
optVerbosity
result
<-
liftIO
(
satWith
z3
{
verbose
=
verbosity
>=
4
}
autoConf
<-
opt
optSMTAuto
result
<-
liftIO
(
satWith
(
getSolverConfig
(
verbosity
>=
4
)
autoConf
)
(
symConstraints
vars
constraint
))
case
rebuildModel
vars
(
getModel
result
)
of
Nothing
->
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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