C# Класс Microsoft.Automata.Rex.RexEngine

Provides a member generator for regexes
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AreEquivalent ( Automaton aut1, Automaton aut2 ) : bool

Returns true iff aut1 and aut2 accept the same set of strings.

Complement ( Automaton aut ) : Automaton

Complement the automaton

CreateFromRegexes ( ) : Automaton

Create a product of the automata of the given regexes.

CreateFromRegexes ( RegexOptions options ) : Automaton

Create a product of the automata of the given regexes.

Describe ( BDD label ) : string
DeserializeDAG ( string dag ) : Automaton

Recreate an automaton from a string that has been produced with SerializeDAG.

Escape ( char c ) : string

Make an escaped string from a character

Escape ( string s ) : string

Make an escaped string from a string

GenerateMember ( Automaton fa ) : string

Gets the random seed of the generator

Generates a random member accepted by fa. Assumes that fa has no dead states, or else termination is not guaranteed.

GenerateMemberUniformly ( Automaton fa ) : string

Generates a random member accepted by fa with uniform distribution among strings accepted by the sfa. Assumes that the fa is deterministic and loopfree.

GenerateMembers ( Automaton sfa, int k ) : IEnumerable

Generates at most k distinct strings in the language of the sfa. The enumeration is empty if the language is empty.

GenerateMembers ( RegexOptions options, int k ) : IEnumerable

Generates at most k distinct strings that match all the given regexes. The enumeration is empty if there are no strings that match all the regexes.

Intersect ( ) : Automaton

Intersect two (or more) automata.

IsMatch ( string input, string regex, RegexOptions options ) : bool

Invokes System.Text.RegularExpressions.Regex.IsMatch(input, regex, options)

Minimize ( Automaton aut ) : Automaton

Minimize the automaton

RexEngine ( BitWidth encoding ) : System

Create a regex member generator for the given character encoding and the given random seed

Create a regex member generator for the given character encoding.

SerializeDAG ( Automaton aut ) : string

Create a string encoding of the given automaton with probabilities.

Приватные методы

Метод Описание
RexEngine ( CharSetSolver solver ) : System
ToUnicodeRepr ( int i ) : string

Описание методов

AreEquivalent() публичный Метод

Returns true iff aut1 and aut2 accept the same set of strings.
public AreEquivalent ( Automaton aut1, Automaton aut2 ) : bool
aut1 Automaton
aut2 Automaton
Результат bool

Complement() публичный Метод

Complement the automaton
public Complement ( Automaton aut ) : Automaton
aut Automaton
Результат Automaton

CreateFromRegexes() публичный Метод

Create a product of the automata of the given regexes.
public CreateFromRegexes ( ) : Automaton
Результат Automaton

CreateFromRegexes() публичный Метод

Create a product of the automata of the given regexes.
public CreateFromRegexes ( RegexOptions options ) : Automaton
options RegexOptions
Результат Automaton

Describe() публичный Метод

public Describe ( BDD label ) : string
label BDD
Результат string

DeserializeDAG() публичный Метод

Recreate an automaton from a string that has been produced with SerializeDAG.
public DeserializeDAG ( string dag ) : Automaton
dag string string encoding of a deterministic and loopfree automaton with probabilities
Результат Automaton

Escape() публичный статический Метод

Make an escaped string from a character
public static Escape ( char c ) : string
c char
Результат string

Escape() публичный статический Метод

Make an escaped string from a string
public static Escape ( string s ) : string
s string
Результат string

GenerateMember() публичный Метод

Gets the random seed of the generator Generates a random member accepted by fa. Assumes that fa has no dead states, or else termination is not guaranteed.
public GenerateMember ( Automaton fa ) : string
fa Automaton
Результат string

GenerateMemberUniformly() публичный Метод

Generates a random member accepted by fa with uniform distribution among strings accepted by the sfa. Assumes that the fa is deterministic and loopfree.
public GenerateMemberUniformly ( Automaton fa ) : string
fa Automaton
Результат string

GenerateMembers() публичный Метод

Generates at most k distinct strings in the language of the sfa. The enumeration is empty if the language is empty.
public GenerateMembers ( Automaton sfa, int k ) : IEnumerable
sfa Automaton
k int
Результат IEnumerable

GenerateMembers() публичный Метод

Generates at most k distinct strings that match all the given regexes. The enumeration is empty if there are no strings that match all the regexes.
public GenerateMembers ( RegexOptions options, int k ) : IEnumerable
options RegexOptions regular expression options
k int number of members to be generated
Результат IEnumerable

Intersect() публичный Метод

Intersect two (or more) automata.
public Intersect ( ) : Automaton
Результат Automaton

IsMatch() публичный статический Метод

Invokes System.Text.RegularExpressions.Regex.IsMatch(input, regex, options)
public static IsMatch ( string input, string regex, RegexOptions options ) : bool
input string
regex string
options RegexOptions
Результат bool

Minimize() публичный Метод

Minimize the automaton
public Minimize ( Automaton aut ) : Automaton
aut Automaton
Результат Automaton

RexEngine() публичный Метод

Create a regex member generator for the given character encoding and the given random seed Create a regex member generator for the given character encoding.
public RexEngine ( BitWidth encoding ) : System
encoding BitWidth character encoding
Результат System

SerializeDAG() публичный Метод

Create a string encoding of the given automaton with probabilities.
public SerializeDAG ( Automaton aut ) : string
aut Automaton deterministic and loopfree automaton
Результат string