Safe Haskell | Safe-Inferred |
---|
FST.AutomatonTypes
Contents
Description
Types for Automaton
- type StateTy = Int
- type FirstState = Int
- type LastState = Int
- type InitialStates = [StateTy]
- type FinalStates = [StateTy]
- type Transitions a = [(a, StateTy)]
- type TransitionTable a = [(StateTy, Transitions a)]
- type Sigma a = [a]
- class AutomatonFunctions f where
- states :: f a -> [StateTy]
- isFinal :: f a -> StateTy -> Bool
- finals :: f a -> FinalStates
- initials :: f a -> InitialStates
- transitionList :: f a -> StateTy -> Transitions a
- transitionTable :: f a -> TransitionTable a
- transitions :: Eq a => f a -> (StateTy, a) -> [StateTy]
- firstState :: Eq a => f a -> StateTy
- lastState :: Eq a => f a -> StateTy
- alphabet :: f a -> Sigma a
Types
type FirstState = IntSource
First state
type InitialStates = [StateTy]Source
Initial states
type FinalStates = [StateTy]Source
Final states
type Transitions a = [(a, StateTy)]Source
Transitions
type TransitionTable a = [(StateTy, Transitions a)]Source
Table of transitions
Type class
class AutomatonFunctions f whereSource
Class of AutomatonFunctions
Methods
states :: f a -> [StateTy]Source
Get the states of an automaton
isFinal :: f a -> StateTy -> BoolSource
Is the given state a final state?
finals :: f a -> FinalStatesSource
Get the final states of an automaton
initials :: f a -> InitialStatesSource
Get the initial states of an automaton
transitionList :: f a -> StateTy -> Transitions aSource
Get the transitions w.r.t. a state
transitionTable :: f a -> TransitionTable aSource
Get the transitionTable
transitions :: Eq a => f a -> (StateTy, a) -> [StateTy]Source
Get the transitions w.r.t. a state and a symbol
firstState :: Eq a => f a -> StateTySource
Get the first state of a automaton
lastState :: Eq a => f a -> StateTySource
Get the last state of a automaton
alphabet :: f a -> Sigma aSource
Get the alphabet of an automaton
Instances
AutomatonFunctions Automaton | Instance of AutomatonFunctions |
AutomatonFunctions LBFA |