fst-0.10.0.1: Finite state transducers

Safe HaskellSafe-Inferred
LanguageHaskell98

FST.AutomatonTypes

Contents

Description

Types for Automaton

Synopsis

Types

type StateTy = Int Source

A state

type FirstState = Int Source

First state

type LastState = Int Source

Last state

type InitialStates = [StateTy] Source

Initial states

type FinalStates = [StateTy] Source

Final states

type Transitions a = [(a, StateTy)] Source

Transitions

type TransitionTable a = [(StateTy, Transitions a)] Source

Table of transitions

type Sigma a = [a] Source

The alphabet of an automaton

Type class

class AutomatonFunctions f where Source

Class of AutomatonFunctions

Methods

states :: f a -> [StateTy] Source

Get the states of an automaton

isFinal :: f a -> StateTy -> Bool Source

Is the given state a final state?

finals :: f a -> FinalStates Source

Get the final states of an automaton

initials :: f a -> InitialStates Source

Get the initial states of an automaton

transitionList :: f a -> StateTy -> Transitions a Source

Get the transitions w.r.t. a state

transitionTable :: f a -> TransitionTable a Source

Get the transitionTable

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

Get the transitions w.r.t. a state and a symbol

firstState :: Eq a => f a -> StateTy Source

Get the first state of a automaton

lastState :: Eq a => f a -> StateTy Source

Get the last state of a automaton

alphabet :: f a -> Sigma a Source

Get the alphabet of an automaton

Instances

AutomatonFunctions Automaton

Instance of AutomatonFunctions

AutomatonFunctions LBFA