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
8af8ae65
Commit
8af8ae65
authored
Jan 07, 2015
by
Philipp Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to choose refinement type
parent
35991dce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
src/Main.hs
src/Main.hs
+10
-6
src/Options.hs
src/Options.hs
+13
-4
No files found.
src/Main.hs
View file @
8af8ae65
...
...
@@ -304,12 +304,16 @@ checkLivenessProperty' net f cuts = do
findLivenessRefinement
::
PetriNet
->
FiringVector
->
OptIO
(
Maybe
Cut
)
findLivenessRefinement
net
x
=
do
--r1 <- findLivenessRefinementByEmptyTraps net (initialMarking net) x []
r1
<-
findLivenessRefinementBySComponent
net
x
case
r1
of
Nothing
->
findLivenessRefinementByEmptyTraps
net
(
initialMarking
net
)
x
[]
Just
_
->
return
r1
refinementType
<-
opt
optRefinementType
case
refinementType
of
TrapRefinement
->
findLivenessRefinementByEmptyTraps
net
(
initialMarking
net
)
x
[]
SComponentRefinement
->
do
r1
<-
findLivenessRefinementBySComponent
net
x
case
r1
of
Nothing
->
findLivenessRefinementByEmptyTraps
net
(
initialMarking
net
)
x
[]
Just
_
->
return
r1
findLivenessRefinementBySComponent
::
PetriNet
->
FiringVector
->
OptIO
(
Maybe
Cut
)
...
...
src/Options.hs
View file @
8af8ae65
{-# LANGUAGE TupleSections #-}
module
Options
(
InputFormat
(
..
),
OutputFormat
(
..
),
NetTransformation
(
..
),
(
InputFormat
(
..
),
OutputFormat
(
..
),
NetTransformation
(
..
),
RefinementType
(
..
),
ImplicitProperty
(
..
),
Options
(
..
),
startOptions
,
options
,
parseArgs
,
usageInformation
)
where
...
...
@@ -33,6 +33,9 @@ data ImplicitProperty = Termination
|
StructCommunicationFree
deriving
(
Show
,
Read
)
data
RefinementType
=
TrapRefinement
|
SComponentRefinement
deriving
(
Show
,
Read
)
data
Options
=
Options
{
inputFormat
::
InputFormat
,
optVerbosity
::
Int
,
optShowHelp
::
Bool
...
...
@@ -40,6 +43,7 @@ data Options = Options { inputFormat :: InputFormat
,
optProperties
::
[
ImplicitProperty
]
,
optTransformations
::
[
NetTransformation
]
,
optRefine
::
Bool
,
optRefinementType
::
RefinementType
,
optInvariant
::
Bool
,
optOutput
::
Maybe
String
,
outputFormat
::
OutputFormat
...
...
@@ -55,6 +59,7 @@ startOptions = Options { inputFormat = PNET
,
optProperties
=
[]
,
optTransformations
=
[]
,
optRefine
=
True
,
optRefinementType
=
TrapRefinement
,
optInvariant
=
False
,
optOutput
=
Nothing
,
outputFormat
=
OutLOLA
...
...
@@ -170,9 +175,13 @@ options =
(
NoArg
(
\
opt
->
Right
opt
{
optRefine
=
False
}))
"Don't use refinement"
,
Option
"i"
[
"invariant"
]
(
NoArg
(
\
opt
->
Right
opt
{
optInvariant
=
True
}))
"Try to generate an invariant"
,
Option
""
[
"trap-refinement"
]
(
NoArg
(
\
opt
->
Right
opt
{
optRefinementType
=
TrapRefinement
}))
"Only use empty trap refinement for liveness properties"
,
Option
""
[
"scomponent-refinement"
]
(
NoArg
(
\
opt
->
Right
opt
{
optRefinementType
=
SComponentRefinement
}))
"Use S-component refinement before trap refinement"
,
Option
"o"
[
"output"
]
(
ReqArg
(
\
arg
opt
->
Right
opt
{
...
...
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