C# Class Microsoft.Automata.Rex.RexEngine

Provides a member generator for regexes
Afficher le fichier Open project: AutomataDotNet/Automata Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
RexEngine ( CharSetSolver solver ) : System
ToUnicodeRepr ( int i ) : string

Method Details

AreEquivalent() public méthode

Returns true iff aut1 and aut2 accept the same set of strings.
public AreEquivalent ( Automaton aut1, Automaton aut2 ) : bool
aut1 Automaton
aut2 Automaton
Résultat bool

Complement() public méthode

Complement the automaton
public Complement ( Automaton aut ) : Automaton
aut Automaton
Résultat Automaton

CreateFromRegexes() public méthode

Create a product of the automata of the given regexes.
public CreateFromRegexes ( ) : Automaton
Résultat Automaton

CreateFromRegexes() public méthode

Create a product of the automata of the given regexes.
public CreateFromRegexes ( RegexOptions options ) : Automaton
options RegexOptions
Résultat Automaton

Describe() public méthode

public Describe ( BDD label ) : string
label BDD
Résultat string

DeserializeDAG() public méthode

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
Résultat Automaton

Escape() public static méthode

Make an escaped string from a character
public static Escape ( char c ) : string
c char
Résultat string

Escape() public static méthode

Make an escaped string from a string
public static Escape ( string s ) : string
s string
Résultat string

GenerateMember() public méthode

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
Résultat string

GenerateMemberUniformly() public méthode

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
Résultat string

GenerateMembers() public méthode

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
Résultat IEnumerable

GenerateMembers() public méthode

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
Résultat IEnumerable

Intersect() public méthode

Intersect two (or more) automata.
public Intersect ( ) : Automaton
Résultat Automaton

IsMatch() public static méthode

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
Résultat bool

Minimize() public méthode

Minimize the automaton
public Minimize ( Automaton aut ) : Automaton
aut Automaton
Résultat Automaton

RexEngine() public méthode

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
Résultat System

SerializeDAG() public méthode

Create a string encoding of the given automaton with probabilities.
public SerializeDAG ( Automaton aut ) : string
aut Automaton deterministic and loopfree automaton
Résultat string