Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
i7
peregrine
Commits
f822e68f
Commit
f822e68f
authored
Dec 17, 2014
by
Philipp Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-added structural check
parent
ac5befda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/Main.hs
src/Main.hs
+7
-7
No files found.
src/Main.hs
View file @
f822e68f
...
...
@@ -422,7 +422,7 @@ checkProperty verbosity net refine invariant p = do
r
<-
case
pcont
p
of
(
Safety
pf
)
->
checkSafetyProperty
verbosity
net
refine
invariant
pf
(
Liveness
pf
)
->
checkLivenessProperty
verbosity
net
refine
invariant
pf
--
(Structural ps) -> checkStructuralProperty verbosity net ps
(
Structural
ps
)
->
checkStructuralProperty
verbosity
net
ps
verbosePut
verbosity
0
$
showPropertyName
p
++
" "
++
case
r
of
Satisfied
->
"is satisfied."
...
...
@@ -461,9 +461,9 @@ refineSafetyProperty :: Int -> PetriNet ->
refineSafetyProperty
verbosity
net
f
traps
m
=
do
r
<-
checkSat
verbosity
$
checkTrapSat
net
m
case
r
of
Nothing
->
do
return
$
(
Just
m
,
traps
)
Just
trap
->
do
Nothing
->
return
(
Just
m
,
traps
)
Just
trap
->
checkSafetyProperty'
verbosity
net
True
f
(
trap
:
traps
)
checkLivenessProperty
::
Int
->
PetriNet
->
Bool
->
Bool
->
...
...
@@ -499,14 +499,14 @@ checkLivenessProperty' verbosity net refine f cuts = do
r
<-
checkSat
verbosity
$
checkTransitionInvariantSat
net
f
cuts
case
r
of
Nothing
->
return
(
Nothing
,
cuts
)
Just
x
->
do
Just
x
->
if
refine
then
do
rt
<-
findLivenessRefinement
verbosity
net
(
initialMarking
net
)
x
[]
case
rt
of
Nothing
->
do
Nothing
->
return
(
Just
x
,
cuts
)
Just
cut
->
do
Just
cut
->
checkLivenessProperty'
verbosity
net
refine
f
(
cut
:
cuts
)
else
...
...
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