Safe Haskell | Safe-Inferred |
---|

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 whereSource

Type class TConvertable

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

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

# Transducer construction

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

Construct a transducer

# Actions on transducers

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

Convert transducer labelled with something other than states to a Transducer

initial :: Transducer a -> StateTySource

Initial state

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

Get transition as a list of states

nullFirstState :: Transducer a -> Transducer aSource

Set first state to null

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

Product of two transducers

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

Union of two transducers

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

Kleene star of two transducers

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

Compose two transducers

showTransducer :: Show a => Transducer a -> StringSource

Show a transducer