Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
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 = Int Source
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 where Source
Class of AutomatonFunctions
Methods
states :: f a -> [StateTy] Source
Get the states of an automaton
isFinal :: f a -> StateTy -> Bool Source
Is the given state a final state?
finals :: f a -> FinalStates Source
Get the final states of an automaton
initials :: f a -> InitialStates Source
Get the initial states of an automaton
transitionList :: f a -> StateTy -> Transitions a Source
Get the transitions w.r.t. a state
transitionTable :: f a -> TransitionTable a Source
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 -> StateTy Source
Get the first state of a automaton
lastState :: Eq a => f a -> StateTy Source
Get the last state of a automaton
alphabet :: f a -> Sigma a Source
Get the alphabet of an automaton
Instances
AutomatonFunctions Automaton | Instance of AutomatonFunctions |
AutomatonFunctions LBFA |