[−][src]Trait z3::ast::Ast
Abstract syntax tree (AST) nodes represent terms, constants, or expressions.
The Ast
trait contains methods common to all AST subtypes.
Required methods
pub fn get_ctx(&self) -> &'ctx Context
[src]
pub fn get_z3_ast(&self) -> Z3_ast
[src]
pub fn new(ctx: &'ctx Context, ast: Z3_ast) -> Self
[src]
Provided methods
pub fn _eq(&self, other: &Self) -> Bool<'ctx>
[src]
Compare this Ast
with another Ast
, and get a Bool
representing the result.
This operation works with all possible Ast
s (int, real, BV, etc), but the two
Ast
s being compared must be the same type.
pub fn distinct(context: &'ctx Context, values: &[&Self]) -> Bool<'ctx>
[src]
Compare this Ast
with a list of other Ast
s, and get a Bool
which is true only if all arguments (including Self) are pairwise distinct.
This operation works with all possible Ast
s (int, real, BV, etc), but the
Ast
s being compared must all be the same type.
pub fn get_sort(&self) -> Sort<'ctx>
[src]
Get the Sort
of the Ast
pub fn simplify(&self) -> Self
[src]
Simplify the Ast
. Returns a new Ast
which is equivalent,
but simplified using algebraic simplification rules, such as
constant propagation.
pub fn substitute<T: Ast<'ctx>>(&self, substitutions: &[(&T, &T)]) -> Self
[src]
Performs substitution on the Ast
. The slice substitutions
contains a
list of pairs with a "from" Ast
that will be substituted by a "to" Ast
.
pub fn num_children(&self) -> usize
[src]
Return the number of children of this AST node. Leaf nodes (eg Bool consts) will return 0.
pub fn nth_child(&self, idx: usize) -> Option<Dynamic<'ctx>>
[src]
Return the nth child of this AST node. Out-of-bound indices will return none.
pub fn children(&self) -> Vec<Dynamic<'ctx>>
[src]
Return the children of this node as a Vec of Dynamic nodes.