Class Fsa
Common base class for all Finite state automata.
Inherited Members
Namespace: Automata.Core
Assembly: Automata.Core.dll
Syntax
public abstract class Fsa
Constructors
| Edit this page View SourceFsa(Alphabet)
Initializes a new instance with the specified alphabet.
Declaration
public Fsa(Alphabet alphabet)
Parameters
Type | Name | Description |
---|---|---|
Alphabet | alphabet | Alphabet used by the automaton. |
Properties
| Edit this page View SourceAcceptsEpsilon
Indicates whether the FSA accepts ϵ - the empty sting .
Declaration
public abstract bool AcceptsEpsilon { get; }
Property Value
Type | Description |
---|---|
bool |
Alphabet
Alphabet used by the FSA.
Declaration
public Alphabet Alphabet { get; }
Property Value
Type | Description |
---|---|
Alphabet |
FinalStates
Final states of the FSA.
Declaration
public abstract IReadOnlyCollection<int> FinalStates { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<int> |
HasInitialState
Indicates whether the FSA has an initial state.
Declaration
public abstract bool HasInitialState { get; }
Property Value
Type | Description |
---|---|
bool | true
|
IsEpsilonFree
Indicates whether the FSA is epsilon-free (lacks epsilon transitions).
Declaration
public abstract bool IsEpsilonFree { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceEpsilonTransitions()
Epsilon transitions of the FSA.
Declaration
public abstract IReadOnlyCollection<EpsilonTransition> EpsilonTransitions()
Returns
Type | Description |
---|---|
IReadOnlyCollection<EpsilonTransition> | An enumerable collection of EpsilonTransition. |
IsFinal(int)
Indicates whether the specified state is a final state.
Declaration
public abstract bool IsFinal(int state)
Parameters
Type | Name | Description |
---|---|---|
int | state | State to check. |
Returns
Type | Description |
---|---|
bool | true
|
IsInitial(int)
Indicates whether the specified state is an initial state.
Declaration
public abstract bool IsInitial(int state)
Parameters
Type | Name | Description |
---|---|---|
int | state | State to check. |
Returns
Type | Description |
---|---|
bool | true
|
ToCanonicalString()
Returns a canonical string representation of the MFA's data. Used by unit tests and for debugging.
Declaration
public abstract string ToCanonicalString()
Returns
Type | Description |
---|---|
string |
Transitions()
Transitions of the FSA.
Declaration
public abstract IReadOnlyCollection<Transition> Transitions()
Returns
Type | Description |
---|---|
IReadOnlyCollection<Transition> | An enumerable collection of Transition. |