fst- Finite state transducers

Safe HaskellSafe-Inferred




Transducers and their functions




data Transducer a Source

Data type for a transducer

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