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

Added flexible constraints for new ghc version

parent bfc1cbaa
......@@ -105,14 +105,17 @@ instance Show PetriNet where
-- TODO: better cuts, scc, min cut?
constructCut:: PetriNet -> FiringVector -> [Trap] -> Cut
--trapComponent :: PetriNet -> [Place] -> ([Place], [Transition])
--trapComponent net trap = (sort trap, sort (mpre net trap))
constructCut :: PetriNet -> FiringVector -> [Trap] -> Cut
constructCut net _ traps = (trapComponents, trapOutputs)
where trapComponent trap = (sort trap, sort (mpre net trap) \\ trapOutputs)
where trapComponent trap = (sort trap, sort (mpre net trap) \\ trapOutputs) :: ([Place], [Transition])
trapComponents = listSet $ map trapComponent traps
trapOutput trap = mpost net trap \\ mpre net trap
trapOutputs = listSet $ concatMap trapOutput traps
{-
constructCut:: PetriNet -> FiringVector -> [Trap] -> Cut
constructCut :: PetriNet -> FiringVector -> [Trap] -> Cut
constructCut net x _ = (map (\t -> ([],[t])) tPositive, tNegative)
where tPositive = elems x
tNegative = transitions net \\ tPositive
......
{-# LANGUAGE FlexibleContexts #-}
module Solver.BooleanTransitionInvariant
(checkBooleanTransitionInvariantSat
,checkBooleanTransitionInvariantWithSimpleCutSat)
......
{-# LANGUAGE FlexibleContexts #-}
module Solver.SComponentWithCut
(checkSComponentWithCutSat)
where
......
{-# LANGUAGE FlexibleContexts #-}
module Solver.SafetyInvariant (
checkSafetyInvariantSat
, SafetyInvariant
......
{-# LANGUAGE FlexibleContexts #-}
module Solver.SubnetEmptyTrap
(checkSubnetEmptyTrapSat)
where
......
{-# LANGUAGE FlexibleContexts #-}
module Solver.TransitionInvariant
(checkTransitionInvariantSat
,checkTransitionInvariantWithSimpleCutSat
......
{-# LANGUAGE FlexibleContexts #-}
module Solver.TrapConstraints
(checkTrapSat)
where
......
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