| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Modelling.PetriNet.Types
Description
This module provides types to represent Petri nets.
A Petri net is a mathematical modelling language. It is used to describe distributed systems. Another name for Petri net is place / transition (PT) net.
The Types module defines basic type class instances and
functions to work on and transform Petri net representations.
Synopsis
- data AdvConfig = AdvConfig {}
- data AlloyConfig = AlloyConfig {}
- data BasicConfig = BasicConfig {
- places :: Int
- transitions :: Int
- atLeastActive :: Int
- flowOverall :: (Int, Int)
- maxTokensPerPlace :: Int
- maxFlowPerEdge :: Int
- tokensOverall :: (Int, Int)
- isConnected :: Maybe Bool
- type Change = PetriChange String
- data ChangeConfig = ChangeConfig {}
- newtype Concurrent a = Concurrent (a, a)
- type Conflict = PetriConflict Place Transition
- data ConflictConfig = ConflictConfig {}
- type Drawable n = (n, DrawSettings)
- data DrawSettings = DrawSettings {
- withPlaceNames :: Bool
- withSvgHighlighting :: Bool
- withTransitionNames :: Bool
- with1Weights :: Bool
- withGraphvizCommand :: GraphvizCommand
- data FindConcurrencyConfig = FindConcurrencyConfig {
- basicConfig :: BasicConfig
- advConfig :: AdvConfig
- changeConfig :: ChangeConfig
- graphConfig :: GraphConfig
- printSolution :: Bool
- alloyConfig :: AlloyConfig
- extraText :: ExtraText
- data FindConflictConfig = FindConflictConfig {}
- data GraphConfig = GraphConfig {
- graphLayouts :: [GraphvizCommand]
- hidePlaceNames :: Bool
- hideTransitionNames :: Bool
- hideWeight1 :: Bool
- data InvalidPetriNetException
- class (PetriNode n, Show (p n String)) => Net (p :: (Type -> Type) -> Type -> Type) (n :: Type -> Type) where
- emptyNet :: p n a
- alterFlow :: Ord a => a -> Int -> a -> p n a -> p n a
- alterNode :: Ord a => a -> Maybe Int -> p n a -> p n a
- deleteFlow :: Ord a => a -> a -> p n a -> p n a
- deleteNode :: Ord a => a -> p n a -> p n a
- flow :: Ord a => a -> a -> p n a -> Maybe Int
- nodes :: Ord a => p n a -> Map a (n a)
- outFlow :: Ord a => a -> p n a -> Map a Int
- mapNet :: Ord b => (a -> b) -> p n a -> p n b
- traverseNet :: (Applicative f, Ord b) => (a -> f b) -> p n a -> f (p n b)
- data Node a
- data Petri = Petri {
- initialMarking :: Marking
- trans :: [Transition]
- data PetriChange a = Change {
- tokenChange :: Map a Int
- flowChange :: Map a (Map a Int)
- data PetriConflict p t = Conflict {
- conflictTrans :: (t, t)
- conflictPlaces :: [p]
- newtype PetriConflict' x = PetriConflict' {
- toPetriConflict :: PetriConflict x x
- newtype PetriLike (n :: Type -> Type) a = PetriLike {}
- data PetriMath a = PetriMath {
- netMath :: a
- placesMath :: a
- transitionsMath :: a
- tokenChangeMath :: [(a, a)]
- initialMarkingMath :: a
- placeOrderMath :: Maybe a
- class Show (n String) => PetriNode (n :: Type -> Type) where
- initialTokens :: n a -> Int
- isPlaceNode :: n a -> Bool
- isTransitionNode :: n a -> Bool
- mapNode :: Ord b => (a -> b) -> n a -> n b
- traverseNode :: (Applicative f, Ord b) => (a -> f b) -> n a -> f (n b)
- data PickConcurrencyConfig = PickConcurrencyConfig {}
- data PickConflictConfig = PickConflictConfig {}
- data SimpleNode a
- = SimplePlace { }
- | SimpleTransition { }
- type SimplePetriLike = PetriLike SimpleNode
- type SimplePetriNet = SimplePetriLike String
- allDrawSettings :: GraphConfig -> [DrawSettings]
- checkBasicConfig :: BasicConfig -> Maybe String
- checkChangeConfig :: BasicConfig -> ChangeConfig -> Maybe String
- checkGraphLayouts :: Bool -> Int -> GraphConfig -> Maybe String
- checkPetriNodeCount :: forall p (n :: Type -> Type) a. (Net p n, Ord a) => (Int, Maybe Int) -> p n a -> Bool
- defaultAdvConfig :: AdvConfig
- defaultAlloyConfig :: AlloyConfig
- defaultBasicConfig :: BasicConfig
- defaultChangeConfig :: ChangeConfig
- defaultFindConcurrencyConfig :: FindConcurrencyConfig
- defaultFindConflictConfig :: FindConflictConfig
- defaultGraphConfig :: GraphConfig
- defaultPickConcurrencyConfig :: PickConcurrencyConfig
- defaultPickConflictConfig :: PickConflictConfig
- drawSettingsWithCommand :: GraphConfig -> GraphvizCommand -> DrawSettings
- lAdvConfig :: Lens' FindConflictConfig AdvConfig
- lAlloyConfig :: Lens' FindConflictConfig AlloyConfig
- lAtLeastActive :: Lens' BasicConfig Int
- lBasicConfig :: Lens' FindConflictConfig BasicConfig
- lChangeConfig :: Lens' FindConflictConfig ChangeConfig
- lConflictConfig :: Lens' FindConflictConfig ConflictConfig
- lConflictPlaces :: forall p1 t p2 f. Functor f => ([p1] -> f [p2]) -> PetriConflict p1 t -> f (PetriConflict p2 t)
- lConflictTrans :: forall p t1 t2 f. Functor f => ((t1, t1) -> f (t2, t2)) -> PetriConflict p t1 -> f (PetriConflict p t2)
- lExtraText :: Lens' FindConflictConfig ExtraText
- lFlowOverall :: Lens' BasicConfig (Int, Int)
- lGraphConfig :: Lens' FindConflictConfig GraphConfig
- lGraphLayouts :: Lens' GraphConfig [GraphvizCommand]
- lHidePlaceNames :: Lens' GraphConfig Bool
- lHideTransitionNames :: Lens' GraphConfig Bool
- lHideWeight1 :: Lens' GraphConfig Bool
- lIsConnected :: Lens' BasicConfig (Maybe Bool)
- lMaxFlowPerEdge :: Lens' BasicConfig Int
- lMaxTokensPerPlace :: Lens' BasicConfig Int
- lPlaces :: Lens' BasicConfig Int
- lPrintSolution :: Lens' FindConflictConfig Bool
- lTokensOverall :: Lens' BasicConfig (Int, Int)
- lTransitions :: Lens' BasicConfig Int
- lUniqueConflictPlace :: Lens' FindConflictConfig (Maybe Bool)
- mapChange :: Ord b => (a -> b) -> PetriChange a -> PetriChange b
- maybeInitial :: PetriNode n => n a -> Maybe Int
- petriLikeToPetri :: (MonadThrow m, Ord a) => PetriLike Node a -> m Petri
- placeNames :: forall p (n :: Type -> Type) k. (Net p n, Ord k) => p n k -> [k]
- shuffleNames :: forall (m :: Type -> Type) p (n :: Type -> Type) a g. (MonadThrow m, Net p n, Ord a, RandomGen g) => p n a -> RandT g m (p n a, Bimap a a)
- transformNet :: forall p (n :: Type -> Type) p' (n' :: Type -> Type) a. (Net p n, Net p' n', Ord a) => p n a -> p' n' a
- transitionNames :: forall p (n :: Type -> Type) k. (Net p n, Ord k) => p n k -> [k]
- transitionPairShow :: (Transition, Transition) -> (ShowTransition, ShowTransition)
Documentation
Constructors
| AdvConfig | |
Instances
data AlloyConfig Source #
Constructors
| AlloyConfig | |
Instances
| Reader AlloyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser AlloyConfig atomic_readerPrec :: Int -> Parser AlloyConfig readerPrec :: Int -> Parser AlloyConfig readerList :: Parser [AlloyConfig] | |||||
| ToDoc AlloyConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic AlloyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read AlloyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS AlloyConfig # readList :: ReadS [AlloyConfig] # readPrec :: ReadPrec AlloyConfig # readListPrec :: ReadPrec [AlloyConfig] # | |||||
| Show AlloyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> AlloyConfig -> ShowS # show :: AlloyConfig -> String # showList :: [AlloyConfig] -> ShowS # | |||||
| type Rep AlloyConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep AlloyConfig = D1 ('MetaData "AlloyConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "AlloyConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxInstances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "timeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))) | |||||
data BasicConfig Source #
Constructors
| BasicConfig | |
Fields
| |
Instances
| Reader BasicConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser BasicConfig atomic_readerPrec :: Int -> Parser BasicConfig readerPrec :: Int -> Parser BasicConfig readerList :: Parser [BasicConfig] | |||||
| ToDoc BasicConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic BasicConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read BasicConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS BasicConfig # readList :: ReadS [BasicConfig] # readPrec :: ReadPrec BasicConfig # readListPrec :: ReadPrec [BasicConfig] # | |||||
| Show BasicConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> BasicConfig -> ShowS # show :: BasicConfig -> String # showList :: [BasicConfig] -> ShowS # | |||||
| type Rep BasicConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep BasicConfig = D1 ('MetaData "BasicConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "BasicConfig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "places") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "transitions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "atLeastActive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "flowOverall") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, Int)))) :*: ((S1 ('MetaSel ('Just "maxTokensPerPlace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "maxFlowPerEdge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "tokensOverall") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, Int)) :*: S1 ('MetaSel ('Just "isConnected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))) | |||||
type Change = PetriChange String Source #
A PetriChange where nodes are labelled by strings.
data ChangeConfig Source #
Constructors
| ChangeConfig | |
Fields | |
Instances
| Reader ChangeConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser ChangeConfig atomic_readerPrec :: Int -> Parser ChangeConfig readerPrec :: Int -> Parser ChangeConfig readerList :: Parser [ChangeConfig] | |||||
| ToDoc ChangeConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic ChangeConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read ChangeConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS ChangeConfig # readList :: ReadS [ChangeConfig] # | |||||
| Show ChangeConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> ChangeConfig -> ShowS # show :: ChangeConfig -> String # showList :: [ChangeConfig] -> ShowS # | |||||
| type Rep ChangeConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep ChangeConfig = D1 ('MetaData "ChangeConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "ChangeConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenChangeOverall") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "maxTokenChangePerPlace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "flowChangeOverall") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "maxFlowChangePerEdge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) | |||||
newtype Concurrent a Source #
Constructors
| Concurrent (a, a) |
Instances
| Foldable Concurrent Source # | |||||
Defined in Modelling.PetriNet.Types Methods fold :: Monoid m => Concurrent m -> m # foldMap :: Monoid m => (a -> m) -> Concurrent a -> m # foldMap' :: Monoid m => (a -> m) -> Concurrent a -> m # foldr :: (a -> b -> b) -> b -> Concurrent a -> b # foldr' :: (a -> b -> b) -> b -> Concurrent a -> b # foldl :: (b -> a -> b) -> b -> Concurrent a -> b # foldl' :: (b -> a -> b) -> b -> Concurrent a -> b # foldr1 :: (a -> a -> a) -> Concurrent a -> a # foldl1 :: (a -> a -> a) -> Concurrent a -> a # toList :: Concurrent a -> [a] # null :: Concurrent a -> Bool # length :: Concurrent a -> Int # elem :: Eq a => a -> Concurrent a -> Bool # maximum :: Ord a => Concurrent a -> a # minimum :: Ord a => Concurrent a -> a # sum :: Num a => Concurrent a -> a # product :: Num a => Concurrent a -> a # | |||||
| Traversable Concurrent Source # | |||||
Defined in Modelling.PetriNet.Types Methods traverse :: Applicative f => (a -> f b) -> Concurrent a -> f (Concurrent b) # sequenceA :: Applicative f => Concurrent (f a) -> f (Concurrent a) # mapM :: Monad m => (a -> m b) -> Concurrent a -> m (Concurrent b) # sequence :: Monad m => Concurrent (m a) -> m (Concurrent a) # | |||||
| Functor Concurrent Source # | |||||
Defined in Modelling.PetriNet.Types Methods fmap :: (a -> b) -> Concurrent a -> Concurrent b # (<$) :: a -> Concurrent b -> Concurrent a # | |||||
| Reader a => Reader (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (Concurrent a) atomic_readerPrec :: Int -> Parser (Concurrent a) reader :: Parser (Concurrent a) readerPrec :: Int -> Parser (Concurrent a) readerList :: Parser [Concurrent a] | |||||
| ToDoc a => ToDoc (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read a => Read (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS (Concurrent a) # readList :: ReadS [Concurrent a] # readPrec :: ReadPrec (Concurrent a) # readListPrec :: ReadPrec [Concurrent a] # | |||||
| Show a => Show (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> Concurrent a -> ShowS # show :: Concurrent a -> String # showList :: [Concurrent a] -> ShowS # | |||||
| Eq a => Eq (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Hashable a => Hashable (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep (Concurrent a) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (Concurrent a) = D1 ('MetaData "Concurrent" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'True) (C1 ('MetaCons "Concurrent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a, a)))) | |||||
type Conflict = PetriConflict Place Transition Source #
A PetriConflict where nodes are labelled by strings.
data ConflictConfig Source #
Constructors
| ConflictConfig | |
Fields
| |
Instances
| Reader ConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser ConflictConfig atomic_readerPrec :: Int -> Parser ConflictConfig reader :: Parser ConflictConfig readerPrec :: Int -> Parser ConflictConfig | |||||
| ToDoc ConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic ConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: ConflictConfig -> Rep ConflictConfig x # to :: Rep ConflictConfig x -> ConflictConfig # | |||||
| Read ConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS ConflictConfig # readList :: ReadS [ConflictConfig] # | |||||
| Show ConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> ConflictConfig -> ShowS # show :: ConflictConfig -> String # showList :: [ConflictConfig] -> ShowS # | |||||
| type Rep ConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep ConflictConfig = D1 ('MetaData "ConflictConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "ConflictConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "addConflictCommonPreconditions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "withConflictDistractors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "conflictDistractorAddExtraPreconditions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "conflictDistractorOnlyConflictLike") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "conflictDistractorOnlyConcurrentLike") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))) | |||||
type Drawable n = (n, DrawSettings) Source #
data DrawSettings Source #
Constructors
| DrawSettings | |
Fields
| |
Instances
| Reader DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser DrawSettings atomic_readerPrec :: Int -> Parser DrawSettings readerPrec :: Int -> Parser DrawSettings readerList :: Parser [DrawSettings] | |||||
| ToDoc DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS DrawSettings # readList :: ReadS [DrawSettings] # | |||||
| Show DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> DrawSettings -> ShowS # show :: DrawSettings -> String # showList :: [DrawSettings] -> ShowS # | |||||
| Eq DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Hashable DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep DrawSettings Source # | |||||
Defined in Modelling.PetriNet.Types type Rep DrawSettings = D1 ('MetaData "DrawSettings" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "DrawSettings" 'PrefixI 'True) ((S1 ('MetaSel ('Just "withPlaceNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "withSvgHighlighting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "withTransitionNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "with1Weights") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "withGraphvizCommand") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphvizCommand))))) | |||||
data FindConcurrencyConfig Source #
Constructors
| FindConcurrencyConfig | |
Fields
| |
Instances
| Reader FindConcurrencyConfig Source # | |||||
| ToDoc FindConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic FindConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: FindConcurrencyConfig -> Rep FindConcurrencyConfig x # to :: Rep FindConcurrencyConfig x -> FindConcurrencyConfig # | |||||
| Read FindConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS FindConcurrencyConfig # readList :: ReadS [FindConcurrencyConfig] # | |||||
| Show FindConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> FindConcurrencyConfig -> ShowS # show :: FindConcurrencyConfig -> String # showList :: [FindConcurrencyConfig] -> ShowS # | |||||
| type Rep FindConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep FindConcurrencyConfig = D1 ('MetaData "FindConcurrencyConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "FindConcurrencyConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "basicConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BasicConfig) :*: (S1 ('MetaSel ('Just "advConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AdvConfig) :*: S1 ('MetaSel ('Just "changeConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChangeConfig))) :*: ((S1 ('MetaSel ('Just "graphConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphConfig) :*: S1 ('MetaSel ('Just "printSolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "alloyConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlloyConfig) :*: S1 ('MetaSel ('Just "extraText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExtraText))))) | |||||
data FindConflictConfig Source #
Constructors
| FindConflictConfig | |
Fields
| |
Instances
| Reader FindConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| ToDoc FindConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic FindConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: FindConflictConfig -> Rep FindConflictConfig x # to :: Rep FindConflictConfig x -> FindConflictConfig # | |||||
| Read FindConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS FindConflictConfig # readList :: ReadS [FindConflictConfig] # | |||||
| Show FindConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> FindConflictConfig -> ShowS # show :: FindConflictConfig -> String # showList :: [FindConflictConfig] -> ShowS # | |||||
| type Rep FindConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep FindConflictConfig = D1 ('MetaData "FindConflictConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "FindConflictConfig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "basicConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BasicConfig) :*: S1 ('MetaSel ('Just "advConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AdvConfig)) :*: (S1 ('MetaSel ('Just "changeConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChangeConfig) :*: S1 ('MetaSel ('Just "conflictConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ConflictConfig))) :*: ((S1 ('MetaSel ('Just "graphConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphConfig) :*: S1 ('MetaSel ('Just "printSolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "uniqueConflictPlace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "alloyConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlloyConfig) :*: S1 ('MetaSel ('Just "extraText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExtraText)))))) | |||||
data GraphConfig Source #
Constructors
| GraphConfig | |
Fields
| |
Instances
| Reader GraphConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser GraphConfig atomic_readerPrec :: Int -> Parser GraphConfig readerPrec :: Int -> Parser GraphConfig readerList :: Parser [GraphConfig] | |||||
| ToDoc GraphConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic GraphConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read GraphConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS GraphConfig # readList :: ReadS [GraphConfig] # readPrec :: ReadPrec GraphConfig # readListPrec :: ReadPrec [GraphConfig] # | |||||
| Show GraphConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> GraphConfig -> ShowS # show :: GraphConfig -> String # showList :: [GraphConfig] -> ShowS # | |||||
| type Rep GraphConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep GraphConfig = D1 ('MetaData "GraphConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "GraphConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "graphLayouts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GraphvizCommand]) :*: S1 ('MetaSel ('Just "hidePlaceNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "hideTransitionNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "hideWeight1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) | |||||
data InvalidPetriNetException Source #
Constructors
| FlowFromATransitionIsZeroOrLess | |
| FlowToATransitionIsZeroOrLess | |
| PlaceWithNegativeTokenNumber | |
| RelatedNodesOfPlacesContainPlaces | |
| RelatedNodesOfTransitionsContainTransitions |
Instances
| Exception InvalidPetriNetException Source # | |
Defined in Modelling.PetriNet.Types | |
| Show InvalidPetriNetException Source # | |
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> InvalidPetriNetException -> ShowS # show :: InvalidPetriNetException -> String # showList :: [InvalidPetriNetException] -> ShowS # | |
class (PetriNode n, Show (p n String)) => Net (p :: (Type -> Type) -> Type -> Type) (n :: Type -> Type) where Source #
Methods
Inserts flow into the Net by connecting the provided source and target
by the given flow.
If no PetriNode for the given source or target exists within the Net
no flow is added to the Net
If flow between source and target exists already it is replaced.
Inserts a PetriNode into the Net given the desired key,
- a place node with the desired initial tokes if Just such are provided,
- a transition node otherwise.
If the desired key already exists, the targeted PetriNode is replaced
without affecting preexisting flow.
(use deleteNode first if you desire to clear related flow)
deleteFlow :: Ord a => a -> a -> p n a -> p n a Source #
Removes the flow going from the first given key to the second one..
deleteNode :: Ord a => a -> p n a -> p n a Source #
Removes the PetriNode associated with the key and all connections going
from or to the removed node.
flow :: Ord a => a -> a -> p n a -> Maybe Int Source #
nodes :: Ord a => p n a -> Map a (n a) Source #
outFlow :: Ord a => a -> p n a -> Map a Int Source #
mapNet :: Ord b => (a -> b) -> p n a -> p n b Source #
traverseNet :: (Applicative f, Ord b) => (a -> f b) -> p n a -> f (p n b) Source #
Instances
| Net PetriLike Node Source # | |
Defined in Modelling.PetriNet.Types Methods emptyNet :: PetriLike Node a Source # alterFlow :: Ord a => a -> Int -> a -> PetriLike Node a -> PetriLike Node a Source # alterNode :: Ord a => a -> Maybe Int -> PetriLike Node a -> PetriLike Node a Source # deleteFlow :: Ord a => a -> a -> PetriLike Node a -> PetriLike Node a Source # deleteNode :: Ord a => a -> PetriLike Node a -> PetriLike Node a Source # flow :: Ord a => a -> a -> PetriLike Node a -> Maybe Int Source # nodes :: Ord a => PetriLike Node a -> Map a (Node a) Source # outFlow :: Ord a => a -> PetriLike Node a -> Map a Int Source # mapNet :: Ord b => (a -> b) -> PetriLike Node a -> PetriLike Node b Source # traverseNet :: (Applicative f, Ord b) => (a -> f b) -> PetriLike Node a -> f (PetriLike Node b) Source # | |
| Net PetriLike SimpleNode Source # | |
Defined in Modelling.PetriNet.Types Methods emptyNet :: PetriLike SimpleNode a Source # alterFlow :: Ord a => a -> Int -> a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # alterNode :: Ord a => a -> Maybe Int -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # deleteFlow :: Ord a => a -> a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # deleteNode :: Ord a => a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # flow :: Ord a => a -> a -> PetriLike SimpleNode a -> Maybe Int Source # nodes :: Ord a => PetriLike SimpleNode a -> Map a (SimpleNode a) Source # outFlow :: Ord a => a -> PetriLike SimpleNode a -> Map a Int Source # mapNet :: Ord b => (a -> b) -> PetriLike SimpleNode a -> PetriLike SimpleNode b Source # traverseNet :: (Applicative f, Ord b) => (a -> f b) -> PetriLike SimpleNode a -> f (PetriLike SimpleNode b) Source # | |
A node is part of a Petri like graph (see PetriLike).
Each node stores its predecessor and successor nodes together with their weight
in the fields flowIn and flowOut respectively.
Additionally PlaceNodes have a value of initial tokens.
Constructors
| PlaceNode | |
| TransitionNode | |
Instances
| PetriNode Node Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Net PetriLike Node Source # | |||||
Defined in Modelling.PetriNet.Types Methods emptyNet :: PetriLike Node a Source # alterFlow :: Ord a => a -> Int -> a -> PetriLike Node a -> PetriLike Node a Source # alterNode :: Ord a => a -> Maybe Int -> PetriLike Node a -> PetriLike Node a Source # deleteFlow :: Ord a => a -> a -> PetriLike Node a -> PetriLike Node a Source # deleteNode :: Ord a => a -> PetriLike Node a -> PetriLike Node a Source # flow :: Ord a => a -> a -> PetriLike Node a -> Maybe Int Source # nodes :: Ord a => PetriLike Node a -> Map a (Node a) Source # outFlow :: Ord a => a -> PetriLike Node a -> Map a Int Source # mapNet :: Ord b => (a -> b) -> PetriLike Node a -> PetriLike Node b Source # traverseNet :: (Applicative f, Ord b) => (a -> f b) -> PetriLike Node a -> f (PetriLike Node b) Source # | |||||
| (Ord a, Reader a) => Reader (Node a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (Node a) atomic_readerPrec :: Int -> Parser (Node a) readerPrec :: Int -> Parser (Node a) readerList :: Parser [Node a] | |||||
| ToDoc a => ToDoc (Node a) Source # | |||||
| (Data a, Ord a) => Data (Node a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Node a -> c (Node a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Node a) # toConstr :: Node a -> Constr # dataTypeOf :: Node a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Node a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Node a)) # gmapT :: (forall b. Data b => b -> b) -> Node a -> Node a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Node a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Node a -> r # gmapQ :: (forall d. Data d => d -> u) -> Node a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Node a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Node a -> m (Node a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Node a -> m (Node a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Node a -> m (Node a) # | |||||
| Generic (Node a) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| (Ord a, Read a) => Read (Node a) Source # | |||||
| Show a => Show (Node a) Source # | |||||
| Eq a => Eq (Node a) Source # | |||||
| Hashable a => Hashable (Node a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep (Node a) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (Node a) = D1 ('MetaData "Node" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "PlaceNode" 'PrefixI 'True) (S1 ('MetaSel ('Just "initial") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "flowIn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int)) :*: S1 ('MetaSel ('Just "flowOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int)))) :+: C1 ('MetaCons "TransitionNode" 'PrefixI 'True) (S1 ('MetaSel ('Just "flowIn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int)) :*: S1 ('MetaSel ('Just "flowOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int)))) | |||||
Constructors
| Petri | |
Fields
| |
data PetriChange a Source #
A PetriChange describes the changes on a PetriLike graph by mapping PlaceNodes
to token changes and origins of an edge to a mapping from their targets to flow
changes.
Constructors
| Change | |
Fields
| |
Instances
| (Ord a, Reader a) => Reader (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (PetriChange a) atomic_readerPrec :: Int -> Parser (PetriChange a) reader :: Parser (PetriChange a) readerPrec :: Int -> Parser (PetriChange a) readerList :: Parser [PetriChange a] | |||||
| ToDoc a => ToDoc (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: PetriChange a -> Rep (PetriChange a) x # to :: Rep (PetriChange a) x -> PetriChange a # | |||||
| (Ord a, Read a) => Read (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS (PetriChange a) # readList :: ReadS [PetriChange a] # readPrec :: ReadPrec (PetriChange a) # readListPrec :: ReadPrec [PetriChange a] # | |||||
| Show a => Show (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> PetriChange a -> ShowS # show :: PetriChange a -> String # showList :: [PetriChange a] -> ShowS # | |||||
| Eq a => Eq (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods (==) :: PetriChange a -> PetriChange a -> Bool # (/=) :: PetriChange a -> PetriChange a -> Bool # | |||||
| Hashable a => Hashable (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep (PetriChange a) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (PetriChange a) = D1 ('MetaData "PetriChange" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "Change" 'PrefixI 'True) (S1 ('MetaSel ('Just "tokenChange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int)) :*: S1 ('MetaSel ('Just "flowChange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a (Map a Int))))) | |||||
data PetriConflict p t Source #
A PetriConflict describes a conflict between two transitions.
It occurs when the number of tokens at the source place are not enough to fire
both transitions (both are having the same source place).
Constructors
| Conflict | |
Fields
| |
Instances
| Bifoldable PetriConflict Source # | |||||
Defined in Modelling.PetriNet.Types Methods bifold :: Monoid m => PetriConflict m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> PetriConflict a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> PetriConflict a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> PetriConflict a b -> c # | |||||
| Bifunctor PetriConflict Source # | |||||
Defined in Modelling.PetriNet.Types Methods bimap :: (a -> b) -> (c -> d) -> PetriConflict a c -> PetriConflict b d # first :: (a -> b) -> PetriConflict a c -> PetriConflict b c # second :: (b -> c) -> PetriConflict a b -> PetriConflict a c # | |||||
| Bitraversable PetriConflict Source # | |||||
Defined in Modelling.PetriNet.Types Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> PetriConflict a b -> f (PetriConflict c d) # | |||||
| Functor (PetriConflict p) Source # | |||||
Defined in Modelling.PetriNet.Types Methods fmap :: (a -> b) -> PetriConflict p a -> PetriConflict p b # (<$) :: a -> PetriConflict p b -> PetriConflict p a # | |||||
| (Reader t, Reader p) => Reader (PetriConflict p t) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (PetriConflict p t) atomic_readerPrec :: Int -> Parser (PetriConflict p t) reader :: Parser (PetriConflict p t) readerPrec :: Int -> Parser (PetriConflict p t) readerList :: Parser [PetriConflict p t] | |||||
| (ToDoc t, ToDoc p) => ToDoc (PetriConflict p t) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic (PetriConflict p t) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: PetriConflict p t -> Rep (PetriConflict p t) x # to :: Rep (PetriConflict p t) x -> PetriConflict p t # | |||||
| (Read t, Read p) => Read (PetriConflict p t) Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS (PetriConflict p t) # readList :: ReadS [PetriConflict p t] # readPrec :: ReadPrec (PetriConflict p t) # readListPrec :: ReadPrec [PetriConflict p t] # | |||||
| (Show t, Show p) => Show (PetriConflict p t) Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> PetriConflict p t -> ShowS # show :: PetriConflict p t -> String # showList :: [PetriConflict p t] -> ShowS # | |||||
| type Rep (PetriConflict p t) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (PetriConflict p t) = D1 ('MetaData "PetriConflict" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "Conflict" 'PrefixI 'True) (S1 ('MetaSel ('Just "conflictTrans") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t, t)) :*: S1 ('MetaSel ('Just "conflictPlaces") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [p]))) | |||||
newtype PetriConflict' x Source #
Constructors
| PetriConflict' | |
Fields
| |
Instances
| Foldable PetriConflict' Source # | |||||
Defined in Modelling.PetriNet.Types Methods fold :: Monoid m => PetriConflict' m -> m # foldMap :: Monoid m => (a -> m) -> PetriConflict' a -> m # foldMap' :: Monoid m => (a -> m) -> PetriConflict' a -> m # foldr :: (a -> b -> b) -> b -> PetriConflict' a -> b # foldr' :: (a -> b -> b) -> b -> PetriConflict' a -> b # foldl :: (b -> a -> b) -> b -> PetriConflict' a -> b # foldl' :: (b -> a -> b) -> b -> PetriConflict' a -> b # foldr1 :: (a -> a -> a) -> PetriConflict' a -> a # foldl1 :: (a -> a -> a) -> PetriConflict' a -> a # toList :: PetriConflict' a -> [a] # null :: PetriConflict' a -> Bool # length :: PetriConflict' a -> Int # elem :: Eq a => a -> PetriConflict' a -> Bool # maximum :: Ord a => PetriConflict' a -> a # minimum :: Ord a => PetriConflict' a -> a # sum :: Num a => PetriConflict' a -> a # product :: Num a => PetriConflict' a -> a # | |||||
| Traversable PetriConflict' Source # | |||||
Defined in Modelling.PetriNet.Types Methods traverse :: Applicative f => (a -> f b) -> PetriConflict' a -> f (PetriConflict' b) # sequenceA :: Applicative f => PetriConflict' (f a) -> f (PetriConflict' a) # mapM :: Monad m => (a -> m b) -> PetriConflict' a -> m (PetriConflict' b) # sequence :: Monad m => PetriConflict' (m a) -> m (PetriConflict' a) # | |||||
| Functor PetriConflict' Source # | |||||
Defined in Modelling.PetriNet.Types Methods fmap :: (a -> b) -> PetriConflict' a -> PetriConflict' b # (<$) :: a -> PetriConflict' b -> PetriConflict' a # | |||||
| Generic (PetriConflict' x) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: PetriConflict' x -> Rep (PetriConflict' x) x0 # to :: Rep (PetriConflict' x) x0 -> PetriConflict' x # | |||||
| Read x => Read (PetriConflict' x) Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS (PetriConflict' x) # readList :: ReadS [PetriConflict' x] # readPrec :: ReadPrec (PetriConflict' x) # readListPrec :: ReadPrec [PetriConflict' x] # | |||||
| Show x => Show (PetriConflict' x) Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> PetriConflict' x -> ShowS # show :: PetriConflict' x -> String # showList :: [PetriConflict' x] -> ShowS # | |||||
| type Rep (PetriConflict' x) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (PetriConflict' x) = D1 ('MetaData "PetriConflict'" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'True) (C1 ('MetaCons "PetriConflict'" 'PrefixI 'True) (S1 ('MetaSel ('Just "toPetriConflict") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PetriConflict x x)))) | |||||
newtype PetriLike (n :: Type -> Type) a Source #
A Petri like graph consists of nodes which might have connections between each other.
The PetriLike graph is a valid Petri net only if
PlaceNodes are only successors ofTransitionNodesTransitionNodes are only successors ofPlaceNodes- the initial marking is valid (i.e., all initial tokens are nonnegative)
- every weight is greater than zero
Constructors
| PetriLike | |
Instances
| Net PetriLike Node Source # | |||||
Defined in Modelling.PetriNet.Types Methods emptyNet :: PetriLike Node a Source # alterFlow :: Ord a => a -> Int -> a -> PetriLike Node a -> PetriLike Node a Source # alterNode :: Ord a => a -> Maybe Int -> PetriLike Node a -> PetriLike Node a Source # deleteFlow :: Ord a => a -> a -> PetriLike Node a -> PetriLike Node a Source # deleteNode :: Ord a => a -> PetriLike Node a -> PetriLike Node a Source # flow :: Ord a => a -> a -> PetriLike Node a -> Maybe Int Source # nodes :: Ord a => PetriLike Node a -> Map a (Node a) Source # outFlow :: Ord a => a -> PetriLike Node a -> Map a Int Source # mapNet :: Ord b => (a -> b) -> PetriLike Node a -> PetriLike Node b Source # traverseNet :: (Applicative f, Ord b) => (a -> f b) -> PetriLike Node a -> f (PetriLike Node b) Source # | |||||
| Net PetriLike SimpleNode Source # | |||||
Defined in Modelling.PetriNet.Types Methods emptyNet :: PetriLike SimpleNode a Source # alterFlow :: Ord a => a -> Int -> a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # alterNode :: Ord a => a -> Maybe Int -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # deleteFlow :: Ord a => a -> a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # deleteNode :: Ord a => a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # flow :: Ord a => a -> a -> PetriLike SimpleNode a -> Maybe Int Source # nodes :: Ord a => PetriLike SimpleNode a -> Map a (SimpleNode a) Source # outFlow :: Ord a => a -> PetriLike SimpleNode a -> Map a Int Source # mapNet :: Ord b => (a -> b) -> PetriLike SimpleNode a -> PetriLike SimpleNode b Source # traverseNet :: (Applicative f, Ord b) => (a -> f b) -> PetriLike SimpleNode a -> f (PetriLike SimpleNode b) Source # | |||||
| (Ord a, Reader a, Reader (n a)) => Reader (PetriLike n a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (PetriLike n a) atomic_readerPrec :: Int -> Parser (PetriLike n a) reader :: Parser (PetriLike n a) readerPrec :: Int -> Parser (PetriLike n a) readerList :: Parser [PetriLike n a] | |||||
| (ToDoc a, ToDoc (n a)) => ToDoc (PetriLike n a) Source # | |||||
| (Typeable n, Data a, Data (n a), Ord a) => Data (PetriLike n a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PetriLike n a -> c (PetriLike n a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PetriLike n a) # toConstr :: PetriLike n a -> Constr # dataTypeOf :: PetriLike n a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (PetriLike n a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PetriLike n a)) # gmapT :: (forall b. Data b => b -> b) -> PetriLike n a -> PetriLike n a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PetriLike n a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PetriLike n a -> r # gmapQ :: (forall d. Data d => d -> u) -> PetriLike n a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PetriLike n a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PetriLike n a -> m (PetriLike n a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PetriLike n a -> m (PetriLike n a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PetriLike n a -> m (PetriLike n a) # | |||||
| Generic (PetriLike n a) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| (Ord a, Read a, Read (n a)) => Read (PetriLike n a) Source # | |||||
| (Show a, Show (n a)) => Show (PetriLike n a) Source # | |||||
| (Eq a, Eq (n a)) => Eq (PetriLike n a) Source # | |||||
| (Hashable a, Hashable (n a)) => Hashable (PetriLike n a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep (PetriLike n a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
Stores a mathematical representation of a Petri net based on a five tuple.
Constructors
| PetriMath | |
Fields
| |
Instances
| Foldable PetriMath Source # | |||||
Defined in Modelling.PetriNet.Types Methods fold :: Monoid m => PetriMath m -> m # foldMap :: Monoid m => (a -> m) -> PetriMath a -> m # foldMap' :: Monoid m => (a -> m) -> PetriMath a -> m # foldr :: (a -> b -> b) -> b -> PetriMath a -> b # foldr' :: (a -> b -> b) -> b -> PetriMath a -> b # foldl :: (b -> a -> b) -> b -> PetriMath a -> b # foldl' :: (b -> a -> b) -> b -> PetriMath a -> b # foldr1 :: (a -> a -> a) -> PetriMath a -> a # foldl1 :: (a -> a -> a) -> PetriMath a -> a # toList :: PetriMath a -> [a] # length :: PetriMath a -> Int # elem :: Eq a => a -> PetriMath a -> Bool # maximum :: Ord a => PetriMath a -> a # minimum :: Ord a => PetriMath a -> a # | |||||
| Traversable PetriMath Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Functor PetriMath Source # | |||||
| Reader a => Reader (PetriMath a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (PetriMath a) atomic_readerPrec :: Int -> Parser (PetriMath a) reader :: Parser (PetriMath a) readerPrec :: Int -> Parser (PetriMath a) readerList :: Parser [PetriMath a] | |||||
| ToDoc a => ToDoc (PetriMath a) Source # | |||||
| Data a => Data (PetriMath a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PetriMath a -> c (PetriMath a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PetriMath a) # toConstr :: PetriMath a -> Constr # dataTypeOf :: PetriMath a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (PetriMath a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PetriMath a)) # gmapT :: (forall b. Data b => b -> b) -> PetriMath a -> PetriMath a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PetriMath a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PetriMath a -> r # gmapQ :: (forall d. Data d => d -> u) -> PetriMath a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PetriMath a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PetriMath a -> m (PetriMath a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PetriMath a -> m (PetriMath a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PetriMath a -> m (PetriMath a) # | |||||
| Generic (PetriMath a) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| Read a => Read (PetriMath a) Source # | |||||
| Show a => Show (PetriMath a) Source # | |||||
| Eq a => Eq (PetriMath a) Source # | |||||
| Hashable a => Hashable (PetriMath a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep (PetriMath a) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (PetriMath a) = D1 ('MetaData "PetriMath" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "PetriMath" 'PrefixI 'True) ((S1 ('MetaSel ('Just "netMath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "placesMath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "transitionsMath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :*: (S1 ('MetaSel ('Just "tokenChangeMath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(a, a)]) :*: (S1 ('MetaSel ('Just "initialMarkingMath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "placeOrderMath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a)))))) | |||||
class Show (n String) => PetriNode (n :: Type -> Type) where Source #
Methods
initialTokens :: n a -> Int Source #
isPlaceNode :: n a -> Bool Source #
isTransitionNode :: n a -> Bool Source #
Whether the PetriNode is a TransitionNode.
mapNode :: Ord b => (a -> b) -> n a -> n b Source #
This function acts like fmap on other Functors.
Note that PetriNode is not necessarily a true Functor and thus mapNode
is not a true fmap because an Ord instance is required for Nodes
first type parameter for mapNode to work,
furthermore (and that is the original reason), mapNode usually
uses mapKeys internally in order to apply the mapping. Thus, the user of
mapNode is responsible to ensure that the transformation preserves uniqueness
on all used keys.
traverseNode :: (Applicative f, Ord b) => (a -> f b) -> n a -> f (n b) Source #
This function acts like traverse on Traversable.
Not that PetriNode is not necessarily Traversable itself as it requires
an Ord instance for the result type within the Applicative
of its first argument, the applicative lifting transformation function.
This behaviour occurs, because the traversal changes the keys of the underlying
Map.
Transformations on this map require a specific traversal traverseKeyMap.
The user is responsible to ensure uniqueness of the keys after the traversal. Note, that the order of values could also change if the transformation is not order-preserving.
Instances
| PetriNode Node Source # | |
Defined in Modelling.PetriNet.Types | |
| PetriNode SimpleNode Source # | |
Defined in Modelling.PetriNet.Types Methods initialTokens :: SimpleNode a -> Int Source # isPlaceNode :: SimpleNode a -> Bool Source # isTransitionNode :: SimpleNode a -> Bool Source # mapNode :: Ord b => (a -> b) -> SimpleNode a -> SimpleNode b Source # traverseNode :: (Applicative f, Ord b) => (a -> f b) -> SimpleNode a -> f (SimpleNode b) Source # | |
data PickConcurrencyConfig Source #
Constructors
| PickConcurrencyConfig | |
Fields
| |
Instances
| Reader PickConcurrencyConfig Source # | |||||
| ToDoc PickConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic PickConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: PickConcurrencyConfig -> Rep PickConcurrencyConfig x # to :: Rep PickConcurrencyConfig x -> PickConcurrencyConfig # | |||||
| Read PickConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS PickConcurrencyConfig # readList :: ReadS [PickConcurrencyConfig] # | |||||
| Show PickConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> PickConcurrencyConfig -> ShowS # show :: PickConcurrencyConfig -> String # showList :: [PickConcurrencyConfig] -> ShowS # | |||||
| type Rep PickConcurrencyConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep PickConcurrencyConfig = D1 ('MetaData "PickConcurrencyConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "PickConcurrencyConfig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "basicConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BasicConfig) :*: S1 ('MetaSel ('Just "changeConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChangeConfig)) :*: (S1 ('MetaSel ('Just "graphConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphConfig) :*: S1 ('MetaSel ('Just "printSolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "prohibitSourceTransitions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "useDifferentGraphLayouts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "alloyConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlloyConfig) :*: S1 ('MetaSel ('Just "extraText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExtraText))))) | |||||
data PickConflictConfig Source #
Constructors
| PickConflictConfig | |
Fields
| |
Instances
| Reader PickConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| ToDoc PickConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Generic PickConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
Methods from :: PickConflictConfig -> Rep PickConflictConfig x # to :: Rep PickConflictConfig x -> PickConflictConfig # | |||||
| Read PickConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS PickConflictConfig # readList :: ReadS [PickConflictConfig] # | |||||
| Show PickConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> PickConflictConfig -> ShowS # show :: PickConflictConfig -> String # showList :: [PickConflictConfig] -> ShowS # | |||||
| type Rep PickConflictConfig Source # | |||||
Defined in Modelling.PetriNet.Types type Rep PickConflictConfig = D1 ('MetaData "PickConflictConfig" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "PickConflictConfig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "basicConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BasicConfig) :*: S1 ('MetaSel ('Just "changeConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChangeConfig)) :*: (S1 ('MetaSel ('Just "conflictConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ConflictConfig) :*: (S1 ('MetaSel ('Just "graphConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphConfig) :*: S1 ('MetaSel ('Just "printSolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "prohibitSourceTransitions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "uniqueConflictPlace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "useDifferentGraphLayouts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "alloyConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlloyConfig) :*: S1 ('MetaSel ('Just "extraText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExtraText)))))) | |||||
data SimpleNode a Source #
Constructors
| SimplePlace | |
| SimpleTransition | |
Instances
| PetriNode SimpleNode Source # | |||||
Defined in Modelling.PetriNet.Types Methods initialTokens :: SimpleNode a -> Int Source # isPlaceNode :: SimpleNode a -> Bool Source # isTransitionNode :: SimpleNode a -> Bool Source # mapNode :: Ord b => (a -> b) -> SimpleNode a -> SimpleNode b Source # traverseNode :: (Applicative f, Ord b) => (a -> f b) -> SimpleNode a -> f (SimpleNode b) Source # | |||||
| Net PetriLike SimpleNode Source # | |||||
Defined in Modelling.PetriNet.Types Methods emptyNet :: PetriLike SimpleNode a Source # alterFlow :: Ord a => a -> Int -> a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # alterNode :: Ord a => a -> Maybe Int -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # deleteFlow :: Ord a => a -> a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # deleteNode :: Ord a => a -> PetriLike SimpleNode a -> PetriLike SimpleNode a Source # flow :: Ord a => a -> a -> PetriLike SimpleNode a -> Maybe Int Source # nodes :: Ord a => PetriLike SimpleNode a -> Map a (SimpleNode a) Source # outFlow :: Ord a => a -> PetriLike SimpleNode a -> Map a Int Source # mapNet :: Ord b => (a -> b) -> PetriLike SimpleNode a -> PetriLike SimpleNode b Source # traverseNet :: (Applicative f, Ord b) => (a -> f b) -> PetriLike SimpleNode a -> f (PetriLike SimpleNode b) Source # | |||||
| (Ord a, Reader a) => Reader (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods atomic_reader :: Parser (SimpleNode a) atomic_readerPrec :: Int -> Parser (SimpleNode a) reader :: Parser (SimpleNode a) readerPrec :: Int -> Parser (SimpleNode a) readerList :: Parser [SimpleNode a] | |||||
| ToDoc a => ToDoc (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| (Data a, Ord a) => Data (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SimpleNode a -> c (SimpleNode a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SimpleNode a) # toConstr :: SimpleNode a -> Constr # dataTypeOf :: SimpleNode a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SimpleNode a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SimpleNode a)) # gmapT :: (forall b. Data b => b -> b) -> SimpleNode a -> SimpleNode a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SimpleNode a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SimpleNode a -> r # gmapQ :: (forall d. Data d => d -> u) -> SimpleNode a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SimpleNode a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SimpleNode a -> m (SimpleNode a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SimpleNode a -> m (SimpleNode a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SimpleNode a -> m (SimpleNode a) # | |||||
| Generic (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types Associated Types
| |||||
| (Ord a, Read a) => Read (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods readsPrec :: Int -> ReadS (SimpleNode a) # readList :: ReadS [SimpleNode a] # readPrec :: ReadPrec (SimpleNode a) # readListPrec :: ReadPrec [SimpleNode a] # | |||||
| Show a => Show (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types Methods showsPrec :: Int -> SimpleNode a -> ShowS # show :: SimpleNode a -> String # showList :: [SimpleNode a] -> ShowS # | |||||
| Eq a => Eq (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| Hashable a => Hashable (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types | |||||
| type Rep (SimpleNode a) Source # | |||||
Defined in Modelling.PetriNet.Types type Rep (SimpleNode a) = D1 ('MetaData "SimpleNode" "Modelling.PetriNet.Types" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "SimplePlace" 'PrefixI 'True) (S1 ('MetaSel ('Just "initial") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "flowOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int))) :+: C1 ('MetaCons "SimpleTransition" 'PrefixI 'True) (S1 ('MetaSel ('Just "flowOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a Int)))) | |||||
type SimplePetriLike = PetriLike SimpleNode Source #
type SimplePetriNet = SimplePetriLike String Source #
allDrawSettings :: GraphConfig -> [DrawSettings] Source #
Provides a list of all DrawSetting that can be obtained by using
drawSettingsWithCommand and all possible graphLayouts of the given config.
checkChangeConfig :: BasicConfig -> ChangeConfig -> Maybe String Source #
checkGraphLayouts :: Bool -> Int -> GraphConfig -> Maybe String Source #
checkPetriNodeCount :: forall p (n :: Type -> Type) a. (Net p n, Ord a) => (Int, Maybe Int) -> p n a -> Bool Source #
Check if the count of nodes in a Petri net falls within the given bounds
drawSettingsWithCommand :: GraphConfig -> GraphvizCommand -> DrawSettings Source #
Converts a GraphConfig into DrawSettings by choosing
the provided GraphvizCommand.
Raises a runtime error if the provided GraphvizCommand is not in the
graphLayouts list of the GraphConfig.
lAdvConfig :: Lens' FindConflictConfig AdvConfig Source #
lAlloyConfig :: Lens' FindConflictConfig AlloyConfig Source #
lAtLeastActive :: Lens' BasicConfig Int Source #
lBasicConfig :: Lens' FindConflictConfig BasicConfig Source #
lChangeConfig :: Lens' FindConflictConfig ChangeConfig Source #
lConflictPlaces :: forall p1 t p2 f. Functor f => ([p1] -> f [p2]) -> PetriConflict p1 t -> f (PetriConflict p2 t) Source #
lConflictTrans :: forall p t1 t2 f. Functor f => ((t1, t1) -> f (t2, t2)) -> PetriConflict p t1 -> f (PetriConflict p t2) Source #
lExtraText :: Lens' FindConflictConfig ExtraText Source #
lFlowOverall :: Lens' BasicConfig (Int, Int) Source #
lGraphConfig :: Lens' FindConflictConfig GraphConfig Source #
lGraphLayouts :: Lens' GraphConfig [GraphvizCommand] Source #
lHidePlaceNames :: Lens' GraphConfig Bool Source #
lHideTransitionNames :: Lens' GraphConfig Bool Source #
lHideWeight1 :: Lens' GraphConfig Bool Source #
lIsConnected :: Lens' BasicConfig (Maybe Bool) Source #
lMaxFlowPerEdge :: Lens' BasicConfig Int Source #
lMaxTokensPerPlace :: Lens' BasicConfig Int Source #
lPlaces :: Lens' BasicConfig Int Source #
lPrintSolution :: Lens' FindConflictConfig Bool Source #
lTokensOverall :: Lens' BasicConfig (Int, Int) Source #
lTransitions :: Lens' BasicConfig Int Source #
lUniqueConflictPlace :: Lens' FindConflictConfig (Maybe Bool) Source #
mapChange :: Ord b => (a -> b) -> PetriChange a -> PetriChange b Source #
This function acts like fmap on other Functors.
Note that Change is not a true Functor and thus mapChange is not a true
fmap because an Ord instance is required for Changes first type parameter
for mapChange to work, furthermore (and that is the original reason),
mapChange uses mapKeys internally in order to apply the mapping.
Thus, the user of mapChange is responsible to ensure that the transformation
preserves uniqueness on all used keys.
petriLikeToPetri :: (MonadThrow m, Ord a) => PetriLike Node a -> m Petri Source #
Transform a PetriLike graph into a Petri net.
It first checks if the given Petri net like graph is indeed a valid Petri net
(see also PetriLike),
- if it is, the Petri net like graph is transformed into a Petri net by
eliminating references to names of places and transitions at all.
Instead
initialMarkingis given by a list (where each position represents different places) and transitions (trans) are given by a lists of token change (where, again, each position represents a different place, but the same index withininitialMarkingandtransrepresents the same place). - if it is not, an exception is thrown indicating the reason why the given Petri net like graph is not a valid Petri net.
shuffleNames :: forall (m :: Type -> Type) p (n :: Type -> Type) a g. (MonadThrow m, Net p n, Ord a, RandomGen g) => p n a -> RandT g m (p n a, Bimap a a) Source #