Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). 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 7a3e1c37 authored by Philipp J. Meyer's avatar Philipp J. Meyer
Browse files

using mval instead of map val

parent a17f6534
......@@ -50,8 +50,8 @@ checkTrap net m0 m1 m2 x1 x2 trap =
(markedByMarking m0 ==> (markedByMarking m1 &&& markedByMarking m2)) &&&
(markedBySequence x1 ==> markedByMarking m1) &&&
(markedBySequence x2 ==> markedByMarking m2)
where markedByMarking m = sum (map (val m) trap) .> 0
markedBySequence x = sum (map (val x) (mpre net trap)) .> 0
where markedByMarking m = sum (mval m trap) .> 0
markedBySequence x = sum (mval x (mpre net trap)) .> 0
checkTrapConstraints :: PetriNet -> SRMap Place -> SRMap Place -> SRMap Place -> SRMap Transition -> SRMap Transition -> [Trap] -> SBool
checkTrapConstraints net m0 m1 m2 x1 x2 traps =
......@@ -60,8 +60,8 @@ checkTrapConstraints net m0 m1 m2 x1 x2 traps =
checkSiphon :: PetriNet -> SRMap Place -> SRMap Place -> SRMap Place -> SRMap Transition -> SRMap Transition -> Siphon -> SBool
checkSiphon net m0 m1 m2 x1 x2 siphon =
unmarkedByMarking m0 ==> (unmarkedByMarking m1 &&& unmarkedByMarking m2 &&& notPresetOfSequence x1 &&& notPresetOfSequence x2)
where unmarkedByMarking m = sum (map (val m) siphon) .== 0
notPresetOfSequence x = sum (map (val x) (mpost net siphon)) .== 0
where unmarkedByMarking m = sum (mval m siphon) .== 0
notPresetOfSequence x = sum (mval x (mpost net siphon)) .== 0
checkSiphonConstraints :: PetriNet -> SRMap Place -> SRMap Place -> SRMap Place -> SRMap Transition -> SRMap Transition -> [Siphon] -> SBool
checkSiphonConstraints net m0 m1 m2 x1 x2 siphons =
......
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