Automata Docs Automata Docs
Automata Docs Automata Docs

Search Results for

    Edit this page

    Class FsaDet

    Common base class for deterministic automata, such as Dfa and Mfa.

    Inheritance
    object
    Fsa
    FsaDet
    Dfa
    Mfa
    Inherited Members
    Fsa.Alphabet
    Fsa.FinalStates
    Fsa.IsFinal(int)
    Fsa.Transitions()
    Fsa.ToCanonicalString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Automata.Core
    Assembly: Automata.Core.dll
    Syntax
    public abstract class FsaDet : Fsa

    Constructors

    | Edit this page View Source

    FsaDet(Alphabet)

    Initializes a new instance with the specified alphabet.

    Declaration
    public FsaDet(Alphabet alphabet)
    Parameters
    Type Name Description
    Alphabet alphabet

    Alphabet used by the automaton.

    Properties

    | Edit this page View Source

    AcceptsEpsilon

    Indicates whether the automaton accepts ϵ - the empty sting.

    Returns trueiff an InitialState exists and it is also a final state.

    Declaration
    public override bool AcceptsEpsilon { get; }
    Property Value
    Type Description
    bool
    Overrides
    Fsa.AcceptsEpsilon
    | Edit this page View Source

    HasInitialState

    Indicates whether the automaton has an initial state.

    Declaration
    public override bool HasInitialState { get; }
    Property Value
    Type Description
    bool

    true iff MFA has an initial state.

    Overrides
    Fsa.HasInitialState
    | Edit this page View Source

    InitialState

    Initial state of the deterministic automaton.

    Declaration
    public abstract int InitialState { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsEpsilonFree

    Indicates whether the MFA is epsilon-free. Always returns true.

    Declaration
    public override bool IsEpsilonFree { get; }
    Property Value
    Type Description
    bool
    Overrides
    Fsa.IsEpsilonFree
    | Edit this page View Source

    MaxState

    Upper limit for the maximum state number in the DFA.

    A value (MaxState + 1) is guaranteed to be an unused state number.

    Declaration
    public abstract int MaxState { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    StateRange

    Range of states in this automaton.

    Any value from End and higher is guaranteed to be free and not used by the automaton.

    Declaration
    public abstract Range StateRange { get; }
    Property Value
    Type Description
    Range
    | Edit this page View Source

    TransitionCount

    Number of transitions in the automaton.

    Declaration
    public abstract int TransitionCount { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Accepts(IEnumerable<int>)

    Indicates whether the automaton accepts the given sequence of symbols as integers.

    Declaration
    public bool Accepts(IEnumerable<int> sequence)
    Parameters
    Type Name Description
    IEnumerable<int> sequence

    Sequence of symbols to check.

    Returns
    Type Description
    bool

    true iff the automaton accepts the sequence.

    Remarks

    The automaton processes each symbol in the sequence, transitioning between states according to its transition function. If the automaton reaches a final state after processing all symbols, the sequence is accepted.

    | Edit this page View Source

    Accepts(IEnumerable<string>)

    Indicates whether the automaton accepts the given sequence of symbols as strings.

    Declaration
    public bool Accepts(IEnumerable<string> sequence)
    Parameters
    Type Name Description
    IEnumerable<string> sequence

    Sequence of symbols to check.

    Returns
    Type Description
    bool

    true iff the automaton accepts the sequence.

    Remarks

    The automaton processes each symbol in the sequence, transitioning between states according to its transition function. If the automaton reaches a final state after processing all symbols, the sequence is accepted.

    | Edit this page View Source

    EpsilonTransitions()

    Epsilon transitions of the MFA, which is always empty.

    Declaration
    public override IReadOnlyCollection<EpsilonTransition> EpsilonTransitions()
    Returns
    Type Description
    IReadOnlyCollection<EpsilonTransition>

    An empty collection of EpsilonTransition.

    Overrides
    Fsa.EpsilonTransitions()
    | Edit this page View Source

    IsInitial(int)

    Indicates whether the specified state is the initial state.

    Declaration
    public override bool IsInitial(int state)
    Parameters
    Type Name Description
    int state

    State to check.

    Returns
    Type Description
    bool

    true iff the specified state is the initial state.

    Overrides
    Fsa.IsInitial(int)
    | Edit this page View Source

    State(int)

    Returns a readonly view of the specified state.

    Declaration
    public abstract StateView State(int fromState)
    Parameters
    Type Name Description
    int fromState

    State from which to get the state view.

    Returns
    Type Description
    StateView

    A StateView representing the state view from the specified state.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    fromState is negative.

    | Edit this page View Source

    StatePath(IEnumerable<int>)

    Sequence of states visited by the automaton for the given input sequence as integers.

    Declaration
    public IEnumerable<int> StatePath(IEnumerable<int> sequence)
    Parameters
    Type Name Description
    IEnumerable<int> sequence

    Sequence of input symbols.

    Returns
    Type Description
    IEnumerable<int>

    An IEnumerable<T> of state indices representing the path taken by the automaton.

    Remarks

    The method yields each state as it is visited. The result sequence may be partial, if the entire input is not accepted by this automaton. For a complete path, the number of states is sequence.Length + 1, with the last state being a final state.

    | Edit this page View Source

    StatePath(IEnumerable<string>)

    Sequence of states visited by the automaton for the given input sequence as string.

    Declaration
    public IEnumerable<int> StatePath(IEnumerable<string> sequence)
    Parameters
    Type Name Description
    IEnumerable<string> sequence

    Sequence of input symbols.

    Returns
    Type Description
    IEnumerable<int>

    An IEnumerable<T> of state indices representing the path taken by the automaton.

    Remarks

    The method yields each state as it is visited. The result sequence may be partial, if the entire input is not accepted by this automaton.

    | Edit this page View Source

    Transition(int, int)

    Returns the state reachable from the given state on the given symbol.

    Declaration
    public abstract int Transition(int fromState, int symbol)
    Parameters
    Type Name Description
    int fromState

    The state origin of the transition.

    int symbol

    Symbol for the transition.

    Returns
    Type Description
    int

    The state reachable from the given state on the given symbol. If no such transition exists, InvalidState is returned.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    fromState is negative.

    See Also
    TryTransition(int, int, out int)
    | Edit this page View Source

    TryTransition(int, int, out int)

    Tries to get the state reachable from the given state on the given symbol.

    Declaration
    public bool TryTransition(int fromState, int symbol, out int toState)
    Parameters
    Type Name Description
    int fromState

    The state origin of the transition.

    int symbol

    Symbol for the transition.

    int toState

    The reachable state, or InvalidState if no state is reachable.

    Returns
    Type Description
    bool

    true iff a reachable state exists.

    See Also
    Transition(int, int)

    Extension Methods

    Converter.AsDeterministic(Fsa)
    Converter.AsMfa(Fsa)
    Converter.AsNfa(Fsa)
    Ops.Difference(FsaDet, Mfa)
    Ops.Intersection(FsaDet, FsaDet)
    Ops.Overlaps(FsaDet, FsaDet)
    Ops.Reversal(FsaDet)