Safe Haskell | Safe-Inferred |
---|---|

Language | Haskell98 |

Transducers and their functions

- module FST.TransducerTypes
- data Transducer a
- class TConvertable f where
- encode :: Eq a => f a -> Transducer a
- decode :: Eq a => Transducer a -> f a

- construct :: (StateTy, StateTy) -> TTransitionTable a -> Sigma a -> InitialStates -> FinalStates -> Transducer a
- rename :: Eq b => [(b, [(Relation a, b)])] -> Sigma a -> [b] -> [b] -> StateTy -> Transducer a
- initial :: Transducer a -> StateTy
- transitions :: Eq a => Transducer a -> (StateTy, Relation a) -> [StateTy]
- nullFirstState :: Transducer a -> Transducer a
- productT :: Eq a => Transducer a -> Transducer a -> Transducer a
- unionT :: Eq a => Transducer a -> Transducer a -> Transducer a
- starT :: Eq a => Transducer a -> Transducer a
- compositionT :: Eq a => Transducer a -> Transducer a -> Transducer a
- showTransducer :: Show a => Transducer a -> String

# Documentation

module FST.TransducerTypes

# Types

data Transducer a Source

Data type for a transducer

TransducerFunctions Transducer | |

Read a => Read (Transducer a) | |

Show a => Show (Transducer a) |

class TConvertable f where Source

Type class TConvertable

encode :: Eq a => f a -> Transducer a Source

decode :: Eq a => Transducer a -> f a Source

# Transducer construction

construct :: (StateTy, StateTy) -> TTransitionTable a -> Sigma a -> InitialStates -> FinalStates -> Transducer a Source

Construct a transducer

# Actions on transducers

rename :: Eq b => [(b, [(Relation a, b)])] -> Sigma a -> [b] -> [b] -> StateTy -> Transducer a Source

Convert transducer labelled with something other than states to a Transducer

initial :: Transducer a -> StateTy Source

Initial state

transitions :: Eq a => Transducer a -> (StateTy, Relation a) -> [StateTy] Source

Get transition as a list of states

nullFirstState :: Transducer a -> Transducer a Source

Set first state to null

productT :: Eq a => Transducer a -> Transducer a -> Transducer a Source

Product of two transducers

unionT :: Eq a => Transducer a -> Transducer a -> Transducer a Source

Union of two transducers

starT :: Eq a => Transducer a -> Transducer a Source

Kleene star of two transducers

compositionT :: Eq a => Transducer a -> Transducer a -> Transducer a Source

Compose two transducers

showTransducer :: Show a => Transducer a -> String Source

Show a transducer