Show / Hide Table of Contents

    Class AutomatonTestUtil

    Utilities for testing automata.

    Capable of generating random regular expressions, and automata, and also provides a number of very basic unoptimized implementations (*slow) for testing.

    Inheritance
    System.Object
    AutomatonTestUtil
    Namespace: Automaton
    Assembly: Lucene.Net.TestFramework.dll
    Syntax
    public static class AutomatonTestUtil : object

    Methods

    | Improve this Doc View Source

    AssertNoDetachedStates(Automaton)

    Checks that an automaton has no detached states that are unreachable from the initial state.

    Declaration
    public static void AssertNoDetachedStates(Automaton a)
    Parameters
    Type Name Description
    Automaton a
    | Improve this Doc View Source

    DeterminizeSimple(Automaton)

    Simple, original brics implementation of Determinize()

    Declaration
    public static void DeterminizeSimple(Automaton a)
    Parameters
    Type Name Description
    Automaton a
    | Improve this Doc View Source

    DeterminizeSimple(Automaton, ISet<State>)

    Simple, original brics implementation of Determinize() Determinizes the given automaton using the given set of initial states.

    Declaration
    public static void DeterminizeSimple(Automaton a, ISet<State> initialset)
    Parameters
    Type Name Description
    Automaton a
    ISet<State> initialset
    | Improve this Doc View Source

    IsFiniteSlow(Automaton)

    Returns true if the language of this automaton is finite.

    WARNING: this method is slow, it will blow up if the automaton is large. this is only used to test the correctness of our faster implementation.

    Declaration
    public static bool IsFiniteSlow(Automaton a)
    Parameters
    Type Name Description
    Automaton a
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    MinimizeSimple(Automaton)

    Simple, original brics implementation of Brzozowski Minimize()

    Declaration
    public static void MinimizeSimple(Automaton a)
    Parameters
    Type Name Description
    Automaton a
    | Improve this Doc View Source

    RandomAutomaton(Random)

    Return a random NFA/DFA for testing.

    Declaration
    public static Automaton RandomAutomaton(Random random)
    Parameters
    Type Name Description
    Random random
    Returns
    Type Description
    Automaton
    | Improve this Doc View Source

    RandomRegexp(Random)

    Returns random string, including full unicode range.

    Declaration
    public static string RandomRegexp(Random r)
    Parameters
    Type Name Description
    Random r
    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)