fst-0.10.0.0: Finite state transducers

Safe HaskellSafe-Inferred

FST.AutomatonInterface

Contents

Description

API for finite state automatons

Synopsis

Documentation

Types

data Automaton a Source

Data type for an automaton

Instances

AutomatonFunctions Automaton

Instance of AutomatonFunctions

Read a => Read (Automaton a) 
Show a => Show (Automaton a) 

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

initial :: Automaton a -> StateTySource

Get the initial state of a finite-state automaton

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