Safe Haskell | Safe-Inferred |
---|

Type system for transducers

- type StateTy = Int
- type FinalStates = [StateTy]
- type FirstState = Int
- type LastState = Int
- type Sigma a = [a]
- type Relation a = (Upper a, Lower a)
- type Upper a = Symbol a
- type Lower a = Symbol a
- data Symbol a
- type TTransitions a = [(Relation a, StateTy)]
- type TTransitionTable a = [(StateTy, [(Relation a, StateTy)])]
- type InitialStates = [StateTy]
- class TransducerFunctions f where
- states :: f a -> [StateTy]
- isFinal :: f a -> StateTy -> Bool
- initials :: f a -> InitialStates
- finals :: f a -> FinalStates
- transitionTable :: f a -> TTransitionTable a
- transitionList :: f a -> StateTy -> TTransitions a
- transitionsU :: Eq a => f a -> (StateTy, Symbol a) -> [(Symbol a, StateTy)]
- transitionsD :: Eq a => f a -> (StateTy, Symbol a) -> [(Symbol a, StateTy)]
- firstState :: f a -> StateTy
- lastState :: f a -> StateTy
- alphabet :: f a -> Sigma a

# Types

type FinalStates = [StateTy]Source

Final states

type FirstState = IntSource

First state

A symbol

type TTransitions a = [(Relation a, StateTy)]Source

Transducer transitions

type TTransitionTable a = [(StateTy, [(Relation a, StateTy)])]Source

Transducer transition table

type InitialStates = [StateTy]Source

Initial states

class TransducerFunctions f whereSource

Class of TransducerFunctions

states :: f a -> [StateTy]Source

isFinal :: f a -> StateTy -> BoolSource

initials :: f a -> InitialStatesSource

finals :: f a -> FinalStatesSource

transitionTable :: f a -> TTransitionTable aSource

transitionList :: f a -> StateTy -> TTransitions aSource

transitionsU :: Eq a => f a -> (StateTy, Symbol a) -> [(Symbol a, StateTy)]Source

transitionsD :: Eq a => f a -> (StateTy, Symbol a) -> [(Symbol a, StateTy)]Source

firstState :: f a -> StateTySource

TransducerFunctions Transducer | |

TransducerFunctions LBFT | LBFT functions |