-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | LTS: Labelled Transition System -- -- This is an implementation of labelled transition system and follow the -- README for information on importing and getting started. @package LTS @version 0.1.0.0 -- | This module implements a labelled transition system module Data.LTS -- | LTSState is a record type which may hold id, output, etc. data LTSState a LTSState :: Int -> a -> LTSState a [stateId] :: LTSState a -> Int [out] :: LTSState a -> a -- | Transition models that on a LTSState, given input symbol from an -- alphabet [b], | takes to the next LTSState data Transition a b Transition :: LTSState a -> b -> LTSState a -> Transition a b [transitionFrom] :: Transition a b -> LTSState a [transitionGuard] :: Transition a b -> b [transitionTo] :: Transition a b -> LTSState a -- | LTS is a list of Transition type LTS a b = [Transition a b] -- | Check if the set of transitions has same origin checkTrans :: (Eq a, Eq b) => LTSState a -> LTS a b -> Bool -- | Sorting related functions | Get origin LTSState ids getFromIds :: (Eq a, Eq b) => LTS a b -> [Int] -- | Get final LTSState ids getToIds :: (Eq a, Eq b) => LTS a b -> [Int] -- | Sort LTSStates by Id sortById :: Eq a => [LTSState a] -> [LTSState a] -- | Sort transitions by to LTSState sortByToSt :: (Eq a, Eq b) => LTS a b -> LTS a b -- | Sort transitions by from LTSState sortByFromSt :: (Eq a, Eq b) => LTS a b -> LTS a b -- | Compute set of transitions (that can be ordered using a flag b) from a -- given LTSState collectTrans :: (Eq a, Eq b) => LTSState a -> LTS a b -> Bool -> LTS a b -- | Get the start LTSState getStartSt :: (Eq a, Eq b) => LTS a b -> LTSState a -- | Get the final LTSState getFinalSt :: (Eq a, Eq b) => LTS a b -> LTSState a -- | Compute depth of a transition system which is the longest simple path -- | from the start state to a final state depth :: (Eq a, Eq b) => LTS a b -> LTSState a -> Nat -- | Alphabet is a generic list type Alphabet b = [b] -- | Return the index of the Transition that current state can take -- on input symbol findTransIndex :: (Eq a, Eq b) => LTSState a -> b -> LTS a b -> Int -- | Check if transition exists from a given symbol from Alphabet -- and LTSState transExists :: (Eq a, Eq b) => LTSState a -> b -> LTS a b -> Bool instance GHC.Generics.Generic (Data.LTS.Transition a b) instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (Data.LTS.Transition a b) instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Data.LTS.Transition a b) instance (GHC.Read.Read a, GHC.Read.Read b) => GHC.Read.Read (Data.LTS.Transition a b) instance GHC.Generics.Generic (Data.LTS.LTSState a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.LTS.LTSState a) instance GHC.Show.Show a => GHC.Show.Show (Data.LTS.LTSState a) instance GHC.Read.Read a => GHC.Read.Read (Data.LTS.LTSState a) instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Ord (Data.LTS.Transition a b) instance GHC.Classes.Eq a => GHC.Classes.Ord (Data.LTS.LTSState a)