A Z3 expression is used to represent formulas and terms. For Z3, a formula is any expression of sort Boolean. Every expression has a sort. More...
Inheritance diagram for expr:Public Member Functions | |
| expr (context &c) | |
| expr (context &c, Z3_ast n) | |
| expr (expr const &n) | |
| expr & | operator= (expr const &n) |
| sort | get_sort () const |
| Return the sort of this expression. More... | |
| bool | is_bool () const |
| Return true if this is a Boolean expression. More... | |
| bool | is_int () const |
| Return true if this is an integer expression. More... | |
| bool | is_real () const |
| Return true if this is a real expression. More... | |
| bool | is_arith () const |
| Return true if this is an integer or real expression. More... | |
| bool | is_bv () const |
| Return true if this is a Bit-vector expression. More... | |
| bool | is_array () const |
| Return true if this is a Array expression. More... | |
| bool | is_datatype () const |
| Return true if this is a Datatype expression. More... | |
| bool | is_relation () const |
| Return true if this is a Relation expression. More... | |
| bool | is_finite_domain () const |
| Return true if this is a Finite-domain expression. More... | |
| bool | is_numeral () const |
| Return true if this expression is a numeral. More... | |
| bool | is_app () const |
| Return true if this expression is an application. More... | |
| bool | is_const () const |
| Return true if this expression is a constant (i.e., an application with 0 arguments). More... | |
| bool | is_quantifier () const |
| Return true if this expression is a quantifier. More... | |
| bool | is_var () const |
| Return true if this expression is a variable. More... | |
| bool | is_well_sorted () const |
| Return true if this expression is well sorted (aka type correct). More... | |
| operator Z3_app () const | |
| func_decl | decl () const |
| Return the declaration associated with this application. This method assumes the expression is an application. More... | |
| unsigned | num_args () const |
| Return the number of arguments in this application. This method assumes the expression is an application. More... | |
| expr | arg (unsigned i) const |
| Return the i-th argument of this application. This method assumes the expression is an application. More... | |
| expr | body () const |
| Return the 'body' of this quantifier. More... | |
| expr | simplify () const |
| Return a simplified version of this expression. More... | |
| expr | simplify (params const &p) const |
Return a simplified version of this expression. The parameter p is a set of parameters for the Z3 simplifier. More... | |
| expr | substitute (expr_vector const &src, expr_vector const &dst) |
| Apply substitution. Replace src expressions by dst. More... | |
| expr | substitute (expr_vector const &dst) |
| Apply substitution. Replace bound variables by expressions. More... | |
Public Member Functions inherited from ast | |
| ast (context &c) | |
| ast (context &c, Z3_ast n) | |
| ast (ast const &s) | |
| ~ast () | |
| operator Z3_ast () const | |
| operator bool () const | |
| ast & | operator= (ast const &s) |
| Z3_ast_kind | kind () const |
| unsigned | hash () const |
Public Member Functions inherited from object | |
| object (context &c) | |
| object (object const &s) | |
| context & | ctx () const |
| void | check_error () const |
Friends | |
| expr | operator! (expr const &a) |
Return an expression representing not(a). More... | |
| expr | operator&& (expr const &a, expr const &b) |
Return an expression representing a and b. More... | |
| expr | operator&& (expr const &a, bool b) |
Return an expression representing a and b. The C++ Boolean value b is automatically converted into a Z3 Boolean constant. More... | |
| expr | operator&& (bool a, expr const &b) |
Return an expression representing a and b. The C++ Boolean value a is automatically converted into a Z3 Boolean constant. More... | |
| expr | operator|| (expr const &a, expr const &b) |
Return an expression representing a or b. More... | |
| expr | operator|| (expr const &a, bool b) |
Return an expression representing a or b. The C++ Boolean value b is automatically converted into a Z3 Boolean constant. More... | |
| expr | operator|| (bool a, expr const &b) |
Return an expression representing a or b. The C++ Boolean value a is automatically converted into a Z3 Boolean constant. More... | |
| expr | implies (expr const &a, expr const &b) |
| expr | implies (expr const &a, bool b) |
| expr | implies (bool a, expr const &b) |
| expr | ite (expr const &c, expr const &t, expr const &e) |
Create the if-then-else expression ite(c, t, e) More... | |
| expr | distinct (expr_vector const &args) |
| expr | operator== (expr const &a, expr const &b) |
| expr | operator== (expr const &a, int b) |
| expr | operator== (int a, expr const &b) |
| expr | operator!= (expr const &a, expr const &b) |
| expr | operator!= (expr const &a, int b) |
| expr | operator!= (int a, expr const &b) |
| expr | operator+ (expr const &a, expr const &b) |
| expr | operator+ (expr const &a, int b) |
| expr | operator+ (int a, expr const &b) |
| expr | operator* (expr const &a, expr const &b) |
| expr | operator* (expr const &a, int b) |
| expr | operator* (int a, expr const &b) |
| expr | pw (expr const &a, expr const &b) |
| Power operator. More... | |
| expr | pw (expr const &a, int b) |
| expr | pw (int a, expr const &b) |
| expr | operator/ (expr const &a, expr const &b) |
| expr | operator/ (expr const &a, int b) |
| expr | operator/ (int a, expr const &b) |
| expr | operator- (expr const &a) |
| expr | operator- (expr const &a, expr const &b) |
| expr | operator- (expr const &a, int b) |
| expr | operator- (int a, expr const &b) |
| expr | operator<= (expr const &a, expr const &b) |
| expr | operator<= (expr const &a, int b) |
| expr | operator<= (int a, expr const &b) |
| expr | operator>= (expr const &a, expr const &b) |
| expr | operator>= (expr const &a, int b) |
| expr | operator>= (int a, expr const &b) |
| expr | operator< (expr const &a, expr const &b) |
| expr | operator< (expr const &a, int b) |
| expr | operator< (int a, expr const &b) |
| expr | operator> (expr const &a, expr const &b) |
| expr | operator> (expr const &a, int b) |
| expr | operator> (int a, expr const &b) |
| expr | operator& (expr const &a, expr const &b) |
| expr | operator& (expr const &a, int b) |
| expr | operator& (int a, expr const &b) |
| expr | operator^ (expr const &a, expr const &b) |
| expr | operator^ (expr const &a, int b) |
| expr | operator^ (int a, expr const &b) |
| expr | operator| (expr const &a, expr const &b) |
| expr | operator| (expr const &a, int b) |
| expr | operator| (int a, expr const &b) |
| expr | operator~ (expr const &a) |
Additional Inherited Members | |
Protected Attributes inherited from ast | |
| Z3_ast | m_ast |
Protected Attributes inherited from object | |
| context * | m_ctx |
A Z3 expression is used to represent formulas and terms. For Z3, a formula is any expression of sort Boolean. Every expression has a sort.
Definition at line 462 of file z3++.h.
Referenced by expr::arg(), expr::body(), expr::simplify(), and expr::substitute().
|
inline |
Return the i-th argument of this application. This method assumes the expression is an application.
Definition at line 563 of file z3++.h.
Referenced by ExprRef::children().
|
inline |
Return the 'body' of this quantifier.
Definition at line 570 of file z3++.h.
Referenced by QuantifierRef::children().
|
inline |
Return the declaration associated with this application. This method assumes the expression is an application.
Definition at line 548 of file z3++.h.
|
inline |
Return the sort of this expression.
Definition at line 470 of file z3++.h.
Referenced by expr::is_arith(), expr::is_array(), expr::is_bool(), expr::is_bv(), expr::is_datatype(), expr::is_finite_domain(), expr::is_int(), expr::is_real(), expr::is_relation(), z3::pw(), z3::select(), z3::store(), z3::udiv(), z3::uge(), z3::ugt(), z3::ule(), and z3::ult().
|
inline |
Return true if this expression is an application.
Definition at line 521 of file z3++.h.
Referenced by expr::is_const(), and expr::operator Z3_app().
|
inline |
Return true if this is an integer or real expression.
Definition at line 487 of file z3++.h.
Referenced by z3::pw().
|
inline |
Return true if this is a Array expression.
Definition at line 495 of file z3++.h.
|
inline |
Return true if this is a Boolean expression.
Definition at line 475 of file z3++.h.
Referenced by solver::add(), and z3::ite().
|
inline |
Return true if this is a Bit-vector expression.
Definition at line 491 of file z3++.h.
|
inline |
Return true if this expression is a constant (i.e., an application with 0 arguments).
Definition at line 525 of file z3++.h.
Referenced by solver::add().
|
inline |
Return true if this is a Datatype expression.
Definition at line 499 of file z3++.h.
|
inline |
Return true if this is a Finite-domain expression.
Definition at line 512 of file z3++.h.
|
inline |
Return true if this is an integer expression.
Definition at line 479 of file z3++.h.
|
inline |
Return true if this expression is a numeral.
Definition at line 517 of file z3++.h.
|
inline |
Return true if this expression is a quantifier.
Definition at line 529 of file z3++.h.
Referenced by expr::body().
|
inline |
Return true if this is a real expression.
Definition at line 483 of file z3++.h.
|
inline |
Return true if this is a Relation expression.
Definition at line 503 of file z3++.h.
|
inline |
Return true if this expression is a variable.
Definition at line 533 of file z3++.h.
|
inline |
|
inline |
Return the number of arguments in this application. This method assumes the expression is an application.
Definition at line 555 of file z3++.h.
Referenced by ExprRef::arg(), ExprRef::children(), and expr::is_const().
|
inline |
Definition at line 540 of file z3++.h.
|
inline |
|
inline |
Apply substitution. Replace src expressions by dst.
Definition at line 1790 of file z3++.h.
|
inline |
Apply substitution. Replace bound variables by expressions.
Definition at line 1803 of file z3++.h.
|
friend |
Definition at line 645 of file z3++.h.
Create the if-then-else expression ite(c, t, e)
Definition at line 914 of file z3++.h.
Return an expression representing not(a).
Definition at line 577 of file z3++.h.
Definition at line 668 of file z3++.h.
Definition at line 856 of file z3++.h.
Return an expression representing a and b.
Definition at line 591 of file z3++.h.
Return an expression representing a and b. The C++ Boolean value b is automatically converted into a Z3 Boolean constant.
Return an expression representing a and b. The C++ Boolean value a is automatically converted into a Z3 Boolean constant.
Definition at line 698 of file z3++.h.
Definition at line 678 of file z3++.h.
Definition at line 760 of file z3++.h.
Definition at line 725 of file z3++.h.
Definition at line 818 of file z3++.h.
Definition at line 780 of file z3++.h.
Definition at line 659 of file z3++.h.
Definition at line 837 of file z3++.h.
Definition at line 799 of file z3++.h.
Definition at line 860 of file z3++.h.
Definition at line 864 of file z3++.h.
Return an expression representing a or b.
Definition at line 622 of file z3++.h.
Return an expression representing a or b. The C++ Boolean value b is automatically converted into a Z3 Boolean constant.
Return an expression representing a or b. The C++ Boolean value a is automatically converted into a Z3 Boolean constant.
Power operator.
Definition at line 894 of file z3++.h.
1.8.9.1