Class Ops
Provides operations for finite automata.
Inherited Members
Namespace: Automata.Core.Operations
Assembly: Automata.Core.dll
Syntax
public static class Ops
Methods
| Edit this page View SourceComplement(Cfa)
Complement of a given canonical finite automaton (CFA).
Declaration
public static Dfa Complement(Cfa cfa)
Parameters
Type | Name | Description |
---|---|---|
Cfa | cfa | The canonical finite automaton to complement. |
Returns
Type | Description |
---|---|
Dfa | A new deterministic finite automaton (DFA) representing the complement of the input CFA. |
Difference(IDfa, Cfa)
Computes the difference between two deterministic finite automata (DFAs).
Declaration
public static Dfa Difference(IDfa minuend, Cfa subtrahend)
Parameters
Type | Name | Description |
---|---|---|
IDfa | minuend | The DFA from which to subtract. |
Cfa | subtrahend | The DFA whose language will be subtracted from the minuend. |
Returns
Type | Description |
---|---|
Dfa | A new Dfa representing the language of the minuend DFA minus the language of the subtrahend DFA. |
Remarks
This operation effectively removes all strings recognized by the subtrahend DFA from the minuend DFA.
Intersection(IDfa, IDfa)
Computes the intersection of two deterministic finite automata (IDFAs). The resulting automaton accepts only the strings that are accepted by both input automata.
Declaration
public static Dfa Intersection(IDfa a, IDfa b)
Parameters
Type | Name | Description |
---|---|---|
IDfa | a | The first finite automaton. |
IDfa | b | The second finite automaton. |
Returns
Type | Description |
---|---|
Dfa | A deterministic finite automaton representing the intersection of the two input automata. |
ToDfa(Nfa)
Determinization of an NFA representation to a DFA.
Declaration
public static Dfa ToDfa(Nfa nfa)
Parameters
Type | Name | Description |
---|---|---|
Nfa | nfa | The input nondeterministic finite automaton. |
Returns
Type | Description |
---|---|
Dfa | A new DFA equivalent to the NFA. |
Remarks
Uses the Powerset Construction algorithm (a.k.a. Subset Construction algorithm).