Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
i7
peregrine
Commits
1c8f5fe1
Commit
1c8f5fe1
authored
May 12, 2014
by
Philipp Meyer
Browse files
Small refactoring in the solver sat function
parent
dd79a707
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Main.hs
View file @
1c8f5fe1
...
...
@@ -11,9 +11,6 @@ import Solver.StateEquation
import
Solver.TransitionInvariant
import
Solver.TrapConstraints
-- TODO: check type of property and only do trap refinement for safety
-- properties
checkSafetyProperty
::
PetriNet
->
Formula
->
[[
String
]]
->
IO
Bool
checkSafetyProperty
net
f
traps
=
do
r
<-
checkSat
$
checkStateEquationSat
net
f
traps
...
...
src/Solver.hs
View file @
1c8f5fe1
...
...
@@ -26,5 +26,5 @@ checkSat :: (SatModel a, SymWord a) =>
([
String
],
M
.
Map
String
(
SBV
a
)
->
SBool
)
->
IO
(
Maybe
(
M
.
Map
String
a
))
checkSat
(
vars
,
constraint
)
=
do
result
<-
sat
$
symConstraints
vars
constraint
result
<-
sat
With
z3
{
verbose
=
False
}
$
symConstraints
vars
constraint
return
$
rebuildModel
vars
$
getModel
result
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