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
c06c711e
Commit
c06c711e
authored
Jul 09, 2014
by
Philipp Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted to no-deadlock-out-of option
parent
87fc04dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
src/Main.hs
src/Main.hs
+12
-16
No files found.
src/Main.hs
View file @
c06c711e
...
...
@@ -23,8 +23,9 @@ import Solver.SComponent
data
InputFormat
=
PNET
|
LOLA
|
TPN
deriving
(
Show
,
Read
)
-- TODO: Change NoDeadlockOutOf to NoDeadlockUnless=FILE
data
ImplicitProperty
=
Termination
|
NoDeadlock
|
NoDeadlock
UnlessFinal
|
NoDeadlock
|
NoDeadlock
OutOf
String
|
Safe
|
Bounded
Integer
deriving
(
Show
,
Read
)
...
...
@@ -71,11 +72,12 @@ options =
}))
"Prove that there is no deadlock"
,
Option
""
[
"no-deadlock-unless-final"
]
(
NoArg
(
\
opt
->
Right
opt
{
optProperties
=
NoDeadlockUnlessFinal
:
optProperties
opt
}))
"Prove that there is no deadlock unless a final place is marked"
,
Option
""
[
"no-deadlock-out-of"
]
(
ReqArg
(
\
arg
opt
->
Right
opt
{
optProperties
=
NoDeadlockOutOf
arg
:
optProperties
opt
})
"PLACE"
)
"Prove that there is no deadlock unless PLACE is marked"
,
Option
""
[
"safe"
]
(
NoArg
(
\
opt
->
Right
opt
{
...
...
@@ -135,7 +137,6 @@ checkFile parser verbosity refine implicitProperties file = do
"Places: "
++
show
(
length
$
places
net
)
++
"
\n
"
++
"Transitions: "
++
show
(
length
$
transitions
net
)
let
addedProperties
=
map
(
makeImplicitProperty
net
)
implicitProperties
print
addedProperties
rs
<-
mapM
(
checkProperty
verbosity
net
refine
)
(
addedProperties
++
properties
)
verbosePut
verbosity
0
""
...
...
@@ -151,14 +152,9 @@ makeImplicitProperty net NoDeadlock =
foldl
(
:&:
)
FTrue
(
map
(
foldl
(
:|:
)
FFalse
.
map
(
placeOp
Lt
)
.
lpre
net
)
(
transitions
net
))
makeImplicitProperty
net
NoDeadlockUnlessFinal
=
let
finals
=
[
p
|
p
<-
places
net
,
null
(
lpost
net
p
)
]
in
if
null
finals
then
error
"no final place!"
else
if
length
finals
>
1
then
error
(
"more than one final place: "
++
show
finals
)
else
Property
"no deadlock unless final"
Safety
$
foldl
(
:&:
)
FTrue
(
map
(
\
p
->
placeOp
Lt
(
p
,
1
))
finals
)
:&:
pformula
(
makeImplicitProperty
net
NoDeadlock
)
makeImplicitProperty
net
(
NoDeadlockOutOf
pl
)
=
Property
(
"no deadlock out of "
++
pl
)
Safety
$
placeOp
Lt
(
pl
,
1
)
:&:
pformula
(
makeImplicitProperty
net
NoDeadlock
)
makeImplicitProperty
net
(
Bounded
k
)
=
Property
(
show
k
++
"-bounded"
)
Safety
$
foldl
(
:|:
)
FFalse
...
...
@@ -266,4 +262,4 @@ exitFailureWith msg = do
exitErrorWith
::
String
->
IO
()
exitErrorWith
msg
=
do
hPutStrLn
stderr
msg
exitWith
$
ExitFailure
r
exitWith
$
ExitFailure
3
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