modelling-tasks-0.0.0.1
Safe HaskellNone
LanguageHaskell2010

Modelling.PetriNet.Reach.Deadlock

Description

originally from Autotool (https:/gitlab.imn.htwk-leipzig.deautotool/all0) based on revision: ad25a990816a162fdd13941ff889653f22d6ea0a based on file: collectionsrcPetri/Deadlock.hs

Synopsis

Types

data DeadlockInstance s t Source #

Constructors

DeadlockInstance 

Fields

Instances

Instances details
(Ord s, Ord t, Reader s, Reader t) => Reader (DeadlockInstance s t) Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

(ToDoc s, ToDoc t) => ToDoc (DeadlockInstance s t) Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

Methods

toDocPrec :: Int -> DeadlockInstance s t -> Doc

toDocList :: [DeadlockInstance s t] -> Doc

Generic (DeadlockInstance s t) Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

Associated Types

type Rep (DeadlockInstance s t) 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

type Rep (DeadlockInstance s t) = D1 ('MetaData "DeadlockInstance" "Modelling.PetriNet.Reach.Deadlock" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "DeadlockInstance" 'PrefixI 'True) (((S1 ('MetaSel ('Just "drawUsing") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphvizCommand) :*: S1 ('MetaSel ('Just "minLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "noLongerThan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "petriNet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Net s t)) :*: S1 ('MetaSel ('Just "showPlaceNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "maxDisplayedSolutions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "shortestSolutions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (NonEmpty [t]) (NonEmpty [t])))) :*: (S1 ('MetaSel ('Just "withLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "withMinLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "rejectSpaceballsLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))))
(Read s, Read t, Ord s, Ord t) => Read (DeadlockInstance s t) Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

(Show s, Show t) => Show (DeadlockInstance s t) Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

type Rep (DeadlockInstance s t) Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

type Rep (DeadlockInstance s t) = D1 ('MetaData "DeadlockInstance" "Modelling.PetriNet.Reach.Deadlock" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "DeadlockInstance" 'PrefixI 'True) (((S1 ('MetaSel ('Just "drawUsing") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GraphvizCommand) :*: S1 ('MetaSel ('Just "minLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "noLongerThan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "petriNet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Net s t)) :*: S1 ('MetaSel ('Just "showPlaceNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "maxDisplayedSolutions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "shortestSolutions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (NonEmpty [t]) (NonEmpty [t])))) :*: (S1 ('MetaSel ('Just "withLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "withMinLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "rejectSpaceballsLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))))

data DeadlockConfig Source #

Configuration for deadlock task generation. Note: The two kinds of fusable transition/place situations (consuming-fusable and producing-fusable) are guaranteed to be non-overlapping. No transition will be both consuming-fusable and producing-fusable and no such transitions will share a fusing-relevant place.

Constructors

DeadlockConfig 

Fields

Instances

Instances details
Generic DeadlockConfig Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

Associated Types

type Rep DeadlockConfig 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

type Rep DeadlockConfig = D1 ('MetaData "DeadlockConfig" "Modelling.PetriNet.Reach.Deadlock" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "DeadlockConfig" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "numPlaces") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "numTransitions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "capacity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Capacity Place)) :*: S1 ('MetaSel ('Just "graphLayouts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GraphvizCommand]))) :*: ((S1 ('MetaSel ('Just "maxTransitionLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "minTransitionLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "transitionBehaviorConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TransitionBehaviorConstraints) :*: S1 ('MetaSel ('Just "arrowDensityConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ArrowDensityConstraints)))) :*: (((S1 ('MetaSel ('Just "maxPrintedSolutions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "rejectLongerThan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "showLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "showMinLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "showPlaceNamesInNet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "fusableTransitionsConsumingAreExactly") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "fusableTransitionsProducingAreExactly") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "filterConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilterConfig))))))
Read DeadlockConfig Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

Show DeadlockConfig Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

type Rep DeadlockConfig Source # 
Instance details

Defined in Modelling.PetriNet.Reach.Deadlock

type Rep DeadlockConfig = D1 ('MetaData "DeadlockConfig" "Modelling.PetriNet.Reach.Deadlock" "modelling-tasks-0.0.0.1-2KiclaEArwR4yz1IHg8eKf" 'False) (C1 ('MetaCons "DeadlockConfig" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "numPlaces") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "numTransitions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "capacity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Capacity Place)) :*: S1 ('MetaSel ('Just "graphLayouts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GraphvizCommand]))) :*: ((S1 ('MetaSel ('Just "maxTransitionLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "minTransitionLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "transitionBehaviorConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TransitionBehaviorConstraints) :*: S1 ('MetaSel ('Just "arrowDensityConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ArrowDensityConstraints)))) :*: (((S1 ('MetaSel ('Just "maxPrintedSolutions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "rejectLongerThan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "showLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "showMinLengthHint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "showPlaceNamesInNet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "fusableTransitionsConsumingAreExactly") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "fusableTransitionsProducingAreExactly") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "filterConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilterConfig))))))

Generation

generateDeadlock :: (MonadCatch m, MonadDiagrams m, MonadGraphviz m) => DeadlockConfig -> Int -> m (DeadlockInstance Place Transition) Source #

Task creation

deadlockTask :: forall (m :: Type -> Type) s t. (MonadCache m, MonadDiagrams m, MonadGraphviz m, MonadThrow m, Ord s, Ord t, OutputCapable m, Show s, Show t) => Bool -> FilePath -> DeadlockInstance s t -> LangM m Source #

verifyDeadlock :: forall (m :: Type -> Type) a t. (OutputCapable m, Show a, Show t, Ord t, Ord a) => DeadlockInstance a t -> LangM m Source #

Evaluation

deadlockEvaluation :: forall (m :: Type -> Type). (Alternative m, MonadCache m, MonadDiagrams m, MonadGraphviz m, MonadThrow m, OutputCapable m) => FilePath -> DeadlockInstance Place Transition -> [Transition] -> Rated m Source #

deadlockSyntax :: forall (m :: Type -> Type). OutputCapable m => DeadlockInstance Place Transition -> [Transition] -> LangM m Source #

Configuration

Utilities

bimapDeadlockInstance :: (Ord a, Ord b) => (s -> a) -> (t -> b) -> DeadlockInstance s t -> DeadlockInstance a b Source #