C# Class Microsoft.Automata.Z3.RankedAlphabet

Represents a definition of a datatype over a given set of ranked symbols and a given node sort.
Exibir arquivo Open project: AutomataDotNet/Automata Class Usage Examples

Public Properties

Property Type Description
constructors Microsoft.Z3.FuncDecl[]
ranks int[]

Public Methods

Method Description
ChildVar ( int k ) : Expr

Gets the formal variable for the k'th child subtree.

ContainsConstructor ( FuncDecl symbol ) : bool

Returns true iff the constructor belongs to the alphabet.

ContainsConstructor ( string symbol ) : bool

Returns true iff the alphabet contains a constructor with the given name.

GetAttributeAccessor ( string symbol ) : FuncDecl

Gets the accessor of the node label for the given node symbol.

GetChildAccessor ( string symbol, int n ) : FuncDecl

Gets the accessor of the n'th child.

GetConstructor ( string symbol ) : FuncDecl

Gets the constructor for the given node symbol.

GetRank ( string symbol ) : int

Gets the number of children (subtrees) that a node with the given symbol has.

GetSymbols ( int rank ) : List
GetTester ( string symbol ) : FuncDecl

Gets the predicate for testing that its argument has the given node symbol.

MkAcceptorRule ( int state, string symbol ) : TreeRule

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol with guard=true.

MkAcceptorRule ( int state, string symbol, Expr guard ) : TreeRule

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol.

MkAcceptorRule ( int state, string symbol, Expr guard, int lookahead ) : TreeRule

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol.

MkAcceptorRule ( int state, string symbol, int lookahead ) : TreeRule

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol and the guard is true.

MkAttr ( ) : Expr

Make a an attribute term.

MkTrans ( RankedAlphabet outputAlphabet, int state, int child ) : Expr

Make an output term of applying the given state to the given child subtree.

MkTree ( FuncDecl f, Expr attribute ) : Expr

Make a tree with the given constructor, attribute, and subtrees.

MkTree ( string constructor, Expr attribute ) : Expr

Make a tree with the given constructor, attribute, and subtrees.

MkTreeAcceptor ( ) : TreeTransducer

Make a new tree acceptor. The initial state is the state of the first rule.

ToString ( ) : string

Returns the name of the alphabet sort.

this ( string constructorName ) : FuncDecl

Gets the constructor with the given name. Same as GetConstructor(constructorName).

Private Methods

Method Description
EnumerateCombinedRules ( ConsList state_set, FuncDecl func, Func GetRules ) : ExprSet[]>>.IEnumerable
GetId ( string symbol ) : int
GetMaxStateId ( IEnumerable rules ) : int
MkAcceptorOutput ( FuncDecl f ) : Expr

Make an acceptor output term for the given symbol and states.

MkLangConj ( IEnumerable states, IEnumerable args ) : Expr

Makes the language acceptance condition for the given states and arguments. For example if states =[{},{q1},{q2,q3},{q2}] and args = [t0,t1,t2,t3] creates the conjunction (($lang(q1,t1) and $lang(q2,t2)) and $lang(q3,t2)) and $lang(q2,t3). Assumes that the enumerations have the same length.

RankedAlphabet ( TreeTheory tt, string symbols, int>.Dictionary idMap, Microsoft.Z3.Sort alphabetSort, Microsoft.Z3.Sort nodeSort, int ranks, FuncDecl constructors, FuncDecl accessors, FuncDecl testers, FuncDecl acceptor, Expr vars ) : System

Method Details

ChildVar() public method

Gets the formal variable for the k'th child subtree.
public ChildVar ( int k ) : Expr
k int positive integer between 1 and MaxRank
return Microsoft.Z3.Expr

ContainsConstructor() public method

Returns true iff the constructor belongs to the alphabet.
public ContainsConstructor ( FuncDecl symbol ) : bool
symbol Microsoft.Z3.FuncDecl constructor
return bool

ContainsConstructor() public method

Returns true iff the alphabet contains a constructor with the given name.
public ContainsConstructor ( string symbol ) : bool
symbol string constructor name
return bool

GetAttributeAccessor() public method

Gets the accessor of the node label for the given node symbol.
public GetAttributeAccessor ( string symbol ) : FuncDecl
symbol string function symbol name
return Microsoft.Z3.FuncDecl

GetChildAccessor() public method

Gets the accessor of the n'th child.
public GetChildAccessor ( string symbol, int n ) : FuncDecl
symbol string function symbol name
n int must be an integer between 1 and GetChildRank(symbol)
return Microsoft.Z3.FuncDecl

GetConstructor() public method

Gets the constructor for the given node symbol.
public GetConstructor ( string symbol ) : FuncDecl
symbol string function symbol name
return Microsoft.Z3.FuncDecl

GetRank() public method

Gets the number of children (subtrees) that a node with the given symbol has.
public GetRank ( string symbol ) : int
symbol string function symbol name
return int

GetSymbols() public method

public GetSymbols ( int rank ) : List
rank int
return List

GetTester() public method

Gets the predicate for testing that its argument has the given node symbol.
public GetTester ( string symbol ) : FuncDecl
symbol string function symbol name
return Microsoft.Z3.FuncDecl

MkAcceptorRule() public method

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol with guard=true.
public MkAcceptorRule ( int state, string symbol ) : TreeRule
state int top state of the rule
symbol string symbol of the alphabet
return TreeRule

MkAcceptorRule() public method

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol.
public MkAcceptorRule ( int state, string symbol, Expr guard ) : TreeRule
state int top state of the rule
symbol string symbol of the alphabet
guard Microsoft.Z3.Expr attribute guard
return TreeRule

MkAcceptorRule() public method

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol.
public MkAcceptorRule ( int state, string symbol, Expr guard, int lookahead ) : TreeRule
state int top state of the rule
symbol string symbol of the alphabet
guard Microsoft.Z3.Expr attribute guard
lookahead int bottom state sets of the rule
return TreeRule

MkAcceptorRule() public method

Make a new acceptor rule where k = lookahead.Length is the rank of the symbol and the guard is true.
public MkAcceptorRule ( int state, string symbol, int lookahead ) : TreeRule
state int top state of the rule
symbol string symbol of the alphabet
lookahead int bottom state sets of the rule (elements of lookahead may be null)
return TreeRule

MkAttr() public method

Make a an attribute term.
public MkAttr ( ) : Expr
return Microsoft.Z3.Expr

MkTrans() public method

Make an output term of applying the given state to the given child subtree.
public MkTrans ( RankedAlphabet outputAlphabet, int state, int child ) : Expr
outputAlphabet RankedAlphabet the output alphabet sort
state int the state from which the child is transduced
child int the accessor of the child, must be a positive integer between 1 and MaxRank
return Microsoft.Z3.Expr

MkTree() public method

Make a tree with the given constructor, attribute, and subtrees.
public MkTree ( FuncDecl f, Expr attribute ) : Expr
f Microsoft.Z3.FuncDecl
attribute Microsoft.Z3.Expr
return Microsoft.Z3.Expr

MkTree() public method

Make a tree with the given constructor, attribute, and subtrees.
public MkTree ( string constructor, Expr attribute ) : Expr
constructor string
attribute Microsoft.Z3.Expr
return Microsoft.Z3.Expr

MkTreeAcceptor() public method

Make a new tree acceptor. The initial state is the state of the first rule.
public MkTreeAcceptor ( ) : TreeTransducer
return TreeTransducer

ToString() public method

Returns the name of the alphabet sort.
public ToString ( ) : string
return string

this() public method

Gets the constructor with the given name. Same as GetConstructor(constructorName).
public this ( string constructorName ) : FuncDecl
constructorName string the name of the constructor
return Microsoft.Z3.FuncDecl

Property Details

constructors public_oe property

public FuncDecl[],Microsoft.Z3 constructors
return Microsoft.Z3.FuncDecl[]

ranks public_oe property

public int[] ranks
return int[]