The abstract syntax tree (AST) class.
More...
|
| override bool | Equals (object o) |
| | Object comparison.
|
| |
| virtual int | CompareTo (object other) |
| | Object Comparison.
|
| |
| override int | GetHashCode () |
| | The AST's hash code.
|
| |
| AST | Translate (Context ctx) |
| | Translates (copies) the AST to the Context ctx .
|
| |
| override string | ToString () |
| | A string representation of the AST.
|
| |
| string | SExpr () |
| | A string representation of the AST in s-expression notation.
|
| |
| void | Dispose () |
| | Disposes of the underlying native Z3 object.
|
| |
The abstract syntax tree (AST) class.
Definition at line 31 of file AST.cs.
| virtual int CompareTo |
( |
object |
other | ) |
|
|
inlinevirtual |
Object Comparison.
- Parameters
-
- Returns
- Negative if the object should be sorted before other , positive if after else zero.
Definition at line 76 of file AST.cs.
{
if (other == null) return 1;
AST oAST = other as AST;
if (oAST == null)
return 1;
else
{
return -1;
return +1;
else
return 0;
}
}
| override bool Equals |
( |
object |
o | ) |
|
|
inline |
Object comparison.
Definition at line 64 of file AST.cs.
{
AST casted = o as AST;
if (casted == null) return false;
return this == casted;
}
| override int GetHashCode |
( |
| ) |
|
|
inline |
The AST's hash code.
- Returns
- A hash code
Definition at line 97 of file AST.cs.
{
return (int)Native.Z3_get_ast_hash(Context.nCtx, NativeObject);
}
| static bool operator!= |
( |
AST |
a, |
|
|
AST |
b |
|
) |
| |
|
inlinestatic |
Comparison operator.
- Parameters
-
- Returns
- True if a and b are not from the same context or represent different sorts; false otherwise.
Definition at line 56 of file AST.cs.
| static bool operator== |
( |
AST |
a, |
|
|
AST |
b |
|
) |
| |
|
inlinestatic |
Comparison operator.
- Parameters
-
- Returns
- True if a and b are from the same context and represent the same sort; false otherwise.
Definition at line 40 of file AST.cs.
{
return Object.ReferenceEquals(a, b) ||
(!Object.ReferenceEquals(a, null) &&
!Object.ReferenceEquals(b, null) &&
a.Context.nCtx == b.Context.nCtx &&
Native.Z3_is_eq_ast(a.Context.nCtx, a.NativeObject, b.NativeObject) != 0);
}
A string representation of the AST in s-expression notation.
Definition at line 195 of file AST.cs.
{
Contract.Ensures(Contract.Result<string>() != null);
return Native.Z3_ast_to_string(Context.nCtx, NativeObject);
}
| override string ToString |
( |
| ) |
|
|
inline |
A string representation of the AST.
Definition at line 187 of file AST.cs.
{
return Native.Z3_ast_to_string(Context.nCtx, NativeObject);
}
Translates (copies) the AST to the Context ctx .
- Parameters
-
- Returns
- A copy of the AST which is associated with ctx
Definition at line 115 of file AST.cs.
{
Contract.Requires(ctx != null);
Contract.Ensures(Contract.Result<AST>() != null);
if (ReferenceEquals(Context, ctx))
return this;
else
return new AST(ctx, Native.Z3_translate(Context.nCtx, NativeObject, ctx.nCtx));
}
Indicates whether the AST is a FunctionDeclaration
Definition at line 180 of file AST.cs.
Indicates whether the AST is a BoundVariable
Definition at line 156 of file AST.cs.