fst-0.10.0.1: Finite state transducers

Safe HaskellSafe-Inferred
LanguageHaskell98

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 a Source

Compile a minimized non-deterministic finite-state automaton

compileNFA :: Ord a => Reg a -> Sigma a -> StateTy -> Automaton a Source

Compile a non-deterministic finite-state automaton

Transformation of automatons

determinize :: Ord a => Automaton a -> Automaton a Source

Make a non-deterministic finite-state automaton deterministic

minimize :: Ord a => Automaton a -> Automaton a Source

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 a Source

Make a automaton complete (transition on every symbol at every state)

Query inforation about automatons

initial :: Automaton a -> StateTy Source

Get the initial state of a finite-state automaton

numberOfStates :: Ord a => Automaton a -> Int Source

Count the number of states in a finite-state automaton

numberOfTransitions :: Ord a => Automaton a -> Int Source

Count the number of transitions in a finite-state automaton

showAutomaton :: Show a => Automaton a -> String Source

Display the automaton