Safe Haskell | Safe-Inferred |
---|
API for finite state automatons
- module FST.RegTypes
- module FST.AutomatonTypes
- data Automaton a
- compile :: Ord a => Reg a -> Sigma a -> StateTy -> Automaton a
- compileNFA :: Ord a => Reg a -> Sigma a -> StateTy -> Automaton a
- determinize :: Ord a => Automaton a -> Automaton a
- minimize :: Ord a => Automaton a -> Automaton a
- complete :: Eq a => Automaton a -> Automaton a
- initial :: Automaton a -> StateTy
- numberOfStates :: Ord a => Automaton a -> Int
- numberOfTransitions :: Ord a => Automaton a -> Int
- showAutomaton :: Show a => Automaton a -> String
Documentation
module FST.RegTypes
module FST.AutomatonTypes
Types
Data type for an automaton
Construction of automatons
compile :: Ord a => Reg a -> Sigma a -> StateTy -> Automaton aSource
Compile a minimized non-deterministic finite-state automaton
compileNFA :: Ord a => Reg a -> Sigma a -> StateTy -> Automaton aSource
Compile a non-deterministic finite-state automaton
Transformation of automatons
determinize :: Ord a => Automaton a -> Automaton aSource
Make a non-deterministic finite-state automaton deterministic
minimize :: Ord a => Automaton a -> Automaton aSource
Minimize an automaton using the Brzozowski algorithm. Note that the determinize function must construct an automaton with the usefulS property.
complete :: Eq a => Automaton a -> Automaton aSource
Make a automaton complete (transition on every symbol at every state)
Query inforation about automatons
numberOfStates :: Ord a => Automaton a -> IntSource
Count the number of states in a finite-state automaton
numberOfTransitions :: Ord a => Automaton a -> IntSource
Count the number of transitions in a finite-state automaton
showAutomaton :: Show a => Automaton a -> StringSource
Display the automaton