Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 ( If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit e76ce855 authored by Philipp Meyer's avatar Philipp Meyer
Browse files

Generated smaller cuts by removing outputs of other traps

parent 23c15ac1
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment