Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
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 = Int Source
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 where Source
Class of TransducerFunctions
states :: f a -> [StateTy] Source
isFinal :: f a -> StateTy -> Bool Source
initials :: f a -> InitialStates Source
finals :: f a -> FinalStates Source
transitionTable :: f a -> TTransitionTable a Source
transitionList :: f a -> StateTy -> TTransitions a Source
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 -> StateTy Source
TransducerFunctions Transducer | |
TransducerFunctions LBFT | LBFT functions |