Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
i7
peregrine
Commits
e76ce855
Commit
e76ce855
authored
Jan 20, 2015
by
Philipp Meyer
Browse files
Generated smaller cuts by removing outputs of other traps
parent
23c15ac1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/PetriNet.hs
View file @
e76ce855
...
...
@@ -100,12 +100,11 @@ instance Show PetriNet where
-- TODO: better cuts, scc, min cut?
constructCut
::
PetriNet
->
FiringVector
->
[
Trap
]
->
Cut
constructCut
net
_
traps
=
uniqueCut
(
map
trapComponent
traps
,
concatMap
trapOutput
traps
)
where
trapComponent
trap
=
(
trap
,
mpre
net
trap
)
constructCut
net
_
traps
=
(
trapComponents
,
trapOutputs
)
where
trapComponent
trap
=
(
sort
trap
,
sort
(
mpre
net
trap
)
\\
trapOutputs
)
trapComponents
=
listSet
$
map
trapComponent
traps
trapOutput
trap
=
mpost
net
trap
\\
mpre
net
trap
uniqueCut
(
ts
,
u
)
=
(
listSet
(
map
(
sort
***
sort
)
ts
),
listSet
u
)
trapOutputs
=
listSet
$
concatMap
trapOutput
traps
renamePlace
::
(
String
->
String
)
->
Place
->
Place
renamePlace
f
(
Place
p
)
=
Place
(
f
p
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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