A Context manages all other Z3 objects, global configuration options, etc. More...
#include <z3++.h>
Public Member Functions | |
| context () | |
| context (config &c) | |
| context (context &&other) noexcept | |
| context & | operator= (context &&other) noexcept |
| ~context () | |
| operator Z3_context () const | |
| Z3_error_code | check_error () const |
| Auxiliary method used to check for API usage errors. | |
| void | check_parser_error () const |
| void | set_enable_exceptions (bool f) |
| The C++ API uses by defaults exceptions on errors. For applications that don't work well with exceptions (there should be only few) you have the ability to turn off exceptions. The tradeoffs are that applications have to be very careful about using check_error() after calls that may result in an erroneous state. | |
| bool | enable_exceptions () const |
| void | set (char const *param, char const *value) |
Update global parameter param with string value. | |
| void | set (char const *param, bool value) |
Update global parameter param with Boolean value. | |
| unsigned | num_simplifiers () const |
| std::string | simplifier_name (unsigned i) const |
| std::string | simplifier_description (char const *name) const |
| void | set (char const *param, int value) |
Update global parameter param with Integer value. | |
| void | interrupt () |
| Interrupt the current procedure being executed by any object managed by this context. This is a soft interruption: there is no guarantee the object will actually stop. | |
| symbol | str_symbol (char const *s) |
| Create a Z3 symbol based on the given string. | |
| symbol | int_symbol (int n) |
| Create a Z3 symbol based on the given integer. | |
| sort | bool_sort () |
| Return the Boolean sort. | |
| sort | int_sort () |
| Return the integer sort. | |
| sort | real_sort () |
| Return the Real sort. | |
| sort | complex_sort () |
| Return the Complex sort (pairs of Reals). | |
| sort | finite_field_sort (char const *prime) |
| Return the prime finite-field sort with the given decimal modulus. | |
| sort | bv_sort (unsigned sz) |
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz. | |
| sort | char_sort () |
| Return the sort for Unicode characters. | |
| sort | string_sort () |
| Return the sort for Unicode strings. | |
| sort | seq_sort (sort &s) |
Return a sequence sort over base sort s. | |
| sort | re_sort (sort &seq_sort) |
Return a regular expression sort over sequences seq_sort. | |
| sort | finite_set_sort (sort &s) |
Return a finite set sort over element sort s. | |
| sort | array_sort (sort d, sort r) |
Return an array sort for arrays from d to r. | |
| sort | array_sort (sort_vector const &d, sort r) |
| sort | fpa_sort (unsigned ebits, unsigned sbits) |
Return a floating point sort. ebits is a number of exponent bits, sbits is a number of significand bits,. | |
| template<size_t precision> | |
| sort | fpa_sort () |
| Return a FloatingPoint sort with given precision bitwidth (16, 32, 64 or 128). | |
| sort | fpa_rounding_mode_sort () |
| Return a RoundingMode sort. | |
| void | set_rounding_mode (rounding_mode rm) |
| Sets RoundingMode of FloatingPoints. | |
| sort | enumeration_sort (char const *name, unsigned n, char const *const *enum_names, func_decl_vector &cs, func_decl_vector &ts) |
Return an enumeration sort: enum_names[0], ..., enum_names[n-1]. cs and ts are output parameters. The method stores in cs the constants corresponding to the enumerated elements, and in ts the predicates for testing if terms of the enumeration sort correspond to an enumeration. | |
| func_decl | tuple_sort (char const *name, unsigned n, char const *const *names, sort const *sorts, func_decl_vector &projs) |
Return a tuple constructor. name is the name of the returned constructor, n are the number of arguments, names and sorts are their projected sorts. projs is an output parameter. It contains the set of projection functions. | |
| sort | datatype (symbol const &name, constructors const &cs) |
Create a recursive datatype over a single sort. name is the name of the recursive datatype n - the number of constructors of the datatype cs - the n constructors used to define the datatype. | |
| sort | datatype (symbol const &name, sort_vector const ¶ms, constructors const &cs) |
Create a parametric recursive datatype. name is the name of the recursive datatype params - the sort parameters of the datatype cs - the n constructors used to define the datatype References to the datatype and mutually recursive datatypes can be created using datatype_sort. | |
| sort_vector | datatypes (unsigned n, symbol const *names, constructor_list *const *cons) |
Create a set of mutually recursive datatypes. n - number of recursive datatypes names - array of names of length n cons - array of constructor lists of length n. | |
| sort | datatype_sort (symbol const &name) |
| a reference to a recursively defined datatype. Expect that it gets defined as a datatype. | |
| sort | datatype_sort (symbol const &name, sort_vector const ¶ms) |
| a reference to a recursively defined parametric datatype. Expect that it gets defined as a datatype. | |
| sort | uninterpreted_sort (char const *name) |
| create an uninterpreted sort with the name given by the string or symbol. | |
| sort | uninterpreted_sort (symbol const &name) |
| func_decl | function (symbol const &name, unsigned arity, sort const *domain, sort const &range) |
| func_decl | function (char const *name, unsigned arity, sort const *domain, sort const &range) |
| func_decl | function (symbol const &name, sort_vector const &domain, sort const &range) |
| func_decl | function (char const *name, sort_vector const &domain, sort const &range) |
| func_decl | function (char const *name, sort const &domain, sort const &range) |
| func_decl | function (char const *name, sort const &d1, sort const &d2, sort const &range) |
| func_decl | function (char const *name, sort const &d1, sort const &d2, sort const &d3, sort const &range) |
| func_decl | function (char const *name, sort const &d1, sort const &d2, sort const &d3, sort const &d4, sort const &range) |
| func_decl | function (char const *name, sort const &d1, sort const &d2, sort const &d3, sort const &d4, sort const &d5, sort const &range) |
| func_decl | recfun (symbol const &name, unsigned arity, sort const *domain, sort const &range) |
| func_decl | recfun (symbol const &name, const sort_vector &domain, sort const &range) |
| func_decl | recfun (char const *name, sort_vector const &domain, sort const &range) |
| func_decl | recfun (char const *name, unsigned arity, sort const *domain, sort const &range) |
| func_decl | recfun (char const *name, sort const &domain, sort const &range) |
| func_decl | recfun (char const *name, sort const &d1, sort const &d2, sort const &range) |
| void | recdef (func_decl decl, expr_vector const &args, expr const &body) |
| add function definition body to declaration decl. decl needs to be declared using context::recfun. | |
| func_decl | user_propagate_function (symbol const &name, sort_vector const &domain, sort const &range) |
| expr | constant (symbol const &name, sort const &s) |
| create an uninterpreted constant. | |
| expr | constant (char const *name, sort const &s) |
| expr | bool_const (char const *name) |
| create uninterpreted constants of a given sort. | |
| expr | int_const (char const *name) |
| expr | real_const (char const *name) |
| expr | complex_const (char const *name) |
| expr | string_const (char const *name) |
| expr | bv_const (char const *name, unsigned sz) |
| expr | fpa_const (char const *name, unsigned ebits, unsigned sbits) |
| template<size_t precision> | |
| expr | fpa_const (char const *name) |
| expr | variable (unsigned index, sort const &s) |
| create a de-Bruijn variable. | |
| expr | fpa_rounding_mode () |
| expr | bool_val (bool b) |
| expr | int_val (int n) |
| expr | int_val (unsigned n) |
| expr | int_val (int64_t n) |
| expr | int_val (uint64_t n) |
| expr | int_val (char const *n) |
| expr | real_val (int n) |
| expr | real_val (unsigned n) |
| expr | real_val (int64_t n) |
| expr | real_val (uint64_t n) |
| expr | real_val (int64_t n, int64_t d) |
| expr | real_val (char const *n) |
| expr | complex_val (int re, int im=0) |
| expr | complex_val (char const *re, char const *im="0") |
| expr | bv_val (int n, unsigned sz) |
| expr | bv_val (unsigned n, unsigned sz) |
| expr | bv_val (int64_t n, unsigned sz) |
| expr | bv_val (uint64_t n, unsigned sz) |
| expr | bv_val (char const *n, unsigned sz) |
| expr | bv_val (unsigned n, bool const *bits) |
| expr | fpa_val (double n) |
| expr | fpa_val (float n) |
| expr | fpa_nan (sort const &s) |
| expr | fpa_inf (sort const &s, bool sgn) |
| expr | string_val (char const *s) |
| expr | string_val (char const *s, unsigned n) |
| expr | string_val (std::string const &s) |
| expr | string_val (std::u32string const &s) |
| expr | num_val (int n, sort const &s) |
| expr_vector | parse_string (char const *s) |
| parsing | |
| expr_vector | parse_file (char const *file) |
| expr_vector | parse_string (char const *s, sort_vector const &sorts, func_decl_vector const &decls) |
| expr_vector | parse_file (char const *s, sort_vector const &sorts, func_decl_vector const &decls) |
| template<> | |
| sort | fpa_sort () |
| template<> | |
| sort | fpa_sort () |
| template<> | |
| sort | fpa_sort () |
| template<> | |
| sort | fpa_sort () |
Friends | |
| class | user_propagator_base |
A Context manages all other Z3 objects, global configuration options, etc.
|
inlinenoexcept |
|
inline |
Definition at line 3911 of file z3++.h.
|
inline |
create uninterpreted constants of a given sort.
Definition at line 4190 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
Definition at line 4215 of file z3++.h.
Referenced by goal::as_expr(), fpa_sort(), expr::implies, expr::implies, expr::mk_xor, expr::operator&&, expr::operator&&, expr::operator||, expr::operator||, and solver::to_smt2().
|
inline |
Definition at line 4195 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition at line 3888 of file z3++.h.
Referenced by bv_const(), bv_val(), bv_val(), bv_val(), bv_val(), and bv_val().
|
inline |
Definition at line 4244 of file z3++.h.
|
inline |
Definition at line 4240 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Definition at line 4242 of file z3++.h.
|
inline |
Definition at line 4243 of file z3++.h.
|
inline |
|
inline |
Definition at line 4241 of file z3++.h.
|
inline |
|
inline |
Auxiliary method used to check for API usage errors.
Definition at line 241 of file z3++.h.
Referenced by array_sort(), array_sort(), expr::atleast, expr::atmost, expr::bit2bool(), bool_sort(), bv_sort(), bv_val(), bv_val(), bv_val(), bv_val(), bv_val(), bv_val(), char_sort(), object::check_error(), check_parser_error(), complex_sort(), expr::concat, expr::concat, constant(), datatype(), datatype(), datatype_sort(), datatype_sort(), expr::distinct, enumeration_sort(), expr::ext_rotate_left(), expr::ext_rotate_right(), expr::extract(), finite_field_sort(), finite_set_sort(), z3::foldl(), z3::foldli(), fpa_inf(), fpa_nan(), fpa_rounding_mode_sort(), fpa_sort(), fpa_val(), fpa_val(), function(), function(), function(), function(), function(), function(), function(), int_sort(), int_symbol(), int_val(), int_val(), int_val(), int_val(), int_val(), z3::map(), z3::mapi(), num_simplifiers(), num_val(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), parse_file(), parse_file(), parse_string(), parse_string(), expr::pbeq, expr::pbge, expr::pble, z3::re_diff(), z3::re_intersect(), re_sort(), real_sort(), real_val(), real_val(), real_val(), real_val(), real_val(), real_val(), recfun(), recfun(), expr::repeat(), expr::rotate_left(), expr::rotate_right(), seq_sort(), simplifier_description(), simplifier_name(), str_symbol(), string_sort(), string_val(), string_val(), string_val(), string_val(), expr::sum, z3::to_expr(), z3::to_func_decl(), z3::to_sort(), tuple_sort(), user_propagate_function(), and variable().
|
inline |
Definition at line 248 of file z3++.h.
Referenced by solver::from_file(), and solver::from_string().
|
inline |
Definition at line 4193 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Return the Complex sort (pairs of Reals).
Definition at line 3886 of file z3++.h.
Referenced by complex_const().
|
inline |
Definition at line 4234 of file z3++.h.
|
inline |
Definition at line 4229 of file z3++.h.
Referenced by fpa_sort().
create an uninterpreted constant.
Definition at line 4179 of file z3++.h.
Referenced by bool_const(), bv_const(), complex_const(), constant(), fpa_const(), fpa_const(), fpa_sort(), int_const(), real_const(), and string_const().
|
inline |
Create a recursive datatype over a single sort. name is the name of the recursive datatype n - the number of constructors of the datatype cs - the n constructors used to define the datatype.
References to the datatype can be created using datatype_sort.
Definition at line 4000 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Create a parametric recursive datatype. name is the name of the recursive datatype params - the sort parameters of the datatype cs - the n constructors used to define the datatype References to the datatype and mutually recursive datatypes can be created using datatype_sort.
Definition at line 4008 of file z3++.h.
a reference to a recursively defined datatype. Expect that it gets defined as a datatype.
Definition at line 4034 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
Create a set of mutually recursive datatypes. n - number of recursive datatypes names - array of names of length n cons - array of constructor lists of length n.
Definition at line 4018 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Definition at line 261 of file z3++.h.
Referenced by check_error().
|
inline |
Return an enumeration sort: enum_names[0], ..., enum_names[n-1]. cs and ts are output parameters. The method stores in cs the constants corresponding to the enumerated elements, and in ts the predicates for testing if terms of the enumeration sort correspond to an enumeration.
Definition at line 3915 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
|
inline |
Definition at line 4196 of file z3++.h.
Referenced by fpa_sort().
Definition at line 4254 of file z3++.h.
Referenced by fpa_sort().
Definition at line 4253 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Definition at line 4203 of file z3++.h.
Referenced by fpa_sort(), expr::fpa_to_fpa, expr::fpa_to_sbv, expr::fpa_to_ubv, expr::operator*, expr::operator+, expr::operator-, expr::operator/, expr::round_fpa_to_closest_integer, expr::sbv_to_fpa, and expr::ubv_to_fpa.
|
inline |
Return a RoundingMode sort.
Definition at line 3908 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
|
inline |
|
inline |
| sort fpa_sort | ( | ) |
Return a FloatingPoint sort with given precision bitwidth (16, 32, 64 or 128).
|
inline |
Return a floating point sort. ebits is a number of exponent bits, sbits is a number of significand bits,.
Definition at line 3894 of file z3++.h.
Referenced by fpa_const(), fpa_const(), fpa_val(), and fpa_val().
|
inline |
Definition at line 4251 of file z3++.h.
Referenced by fpa_sort(), z3::operator!=(), z3::operator!=(), z3::operator==(), and z3::operator==().
|
inline |
Definition at line 4252 of file z3++.h.
|
inline |
Definition at line 4119 of file z3++.h.
|
inline |
Definition at line 4111 of file z3++.h.
|
inline |
Definition at line 4103 of file z3++.h.
|
inline |
Definition at line 4095 of file z3++.h.
Definition at line 4087 of file z3++.h.
|
inline |
Definition at line 4082 of file z3++.h.
|
inline |
Definition at line 4071 of file z3++.h.
|
inline |
Definition at line 4056 of file z3++.h.
Referenced by fpa_sort(), function(), function(), z3::function(), z3::function(), z3::function(), z3::function(), z3::function(), z3::function(), z3::function(), z3::function(), and z3::function().
|
inline |
Definition at line 4191 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 4220 of file z3++.h.
|
inline |
Interrupt the current procedure being executed by any object managed by this context. This is a soft interruption: there is no guarantee the object will actually stop.
Definition at line 299 of file z3++.h.
|
inline |
Definition at line 4261 of file z3++.h.
Referenced by z3::ashr(), z3::ashr(), fpa_sort(), z3::lshr(), z3::lshr(), expr::mod, expr::mod, expr::operator!=, expr::operator!=, expr::operator&, expr::operator&, func_decl::operator()(), func_decl::operator()(), func_decl::operator()(), expr::operator*, expr::operator*, expr::operator+, expr::operator+, expr::operator-, expr::operator-, expr::operator/, expr::operator/, expr::operator<, expr::operator<, expr::operator<=, expr::operator<=, expr::operator==, expr::operator==, expr::operator>, expr::operator>, expr::operator>=, expr::operator>=, expr::operator^, expr::operator^, expr::operator|, expr::operator|, expr::pw, expr::pw, expr::rem, expr::rem, z3::sdiv(), z3::sdiv(), z3::select(), z3::sge(), z3::sge(), z3::sgt(), z3::sgt(), z3::shl(), z3::shl(), z3::sle(), z3::sle(), z3::slt(), z3::slt(), z3::smod(), z3::smod(), z3::srem(), z3::srem(), z3::store(), z3::store(), z3::store(), z3::udiv(), z3::udiv(), z3::uge(), z3::uge(), z3::ugt(), z3::ugt(), z3::ule(), z3::ule(), z3::ult(), z3::ult(), z3::urem(), and z3::urem().
|
inlinenoexcept |
|
inline |
Definition at line 4648 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Definition at line 4671 of file z3++.h.
|
inline |
parsing
Definition at line 4642 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Definition at line 4654 of file z3++.h.
|
inline |
Definition at line 4192 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Return the Real sort.
Definition at line 3885 of file z3++.h.
Referenced by real_const(), real_val(), real_val(), real_val(), real_val(), and real_val().
|
inline |
Definition at line 4224 of file z3++.h.
Referenced by expr::abs, complex_val(), complex_val(), and fpa_sort().
|
inline |
|
inline |
Definition at line 4227 of file z3++.h.
|
inline |
add function definition body to declaration decl. decl needs to be declared using context::recfun.
| decl | |
| args | |
| body |
Definition at line 4165 of file z3++.h.
Referenced by fpa_sort().
Definition at line 4160 of file z3++.h.
|
inline |
|
inline |
Definition at line 4139 of file z3++.h.
|
inline |
Definition at line 4127 of file z3++.h.
Referenced by fpa_sort(), recfun(), recfun(), recfun(), recfun(), z3::recfun(), z3::recfun(), z3::recfun(), and z3::recfun().
|
inline |
|
inline |
Update global parameter param with string value.
Definition at line 266 of file z3++.h.
|
inline |
Update global parameter param with Integer value.
Definition at line 290 of file z3++.h.
|
inline |
The C++ API uses by defaults exceptions on errors. For applications that don't work well with exceptions (there should be only few) you have the ability to turn off exceptions. The tradeoffs are that applications have to be very careful about using check_error() after calls that may result in an erroneous state.
Definition at line 259 of file z3++.h.
|
inline |
Sets RoundingMode of FloatingPoints.
Definition at line 4201 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
|
inline |
Create a Z3 symbol based on the given string.
Definition at line 3880 of file z3++.h.
Referenced by constant(), function(), function(), function(), function(), function(), function(), function(), recfun(), recfun(), recfun(), recfun(), and solver::solver().
|
inline |
Definition at line 4194 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Return the sort for Unicode strings.
Definition at line 3889 of file z3++.h.
Referenced by string_const().
|
inline |
Definition at line 4257 of file z3++.h.
Referenced by fpa_sort().
|
inline |
|
inline |
Definition at line 4259 of file z3++.h.
|
inline |
Return a tuple constructor. name is the name of the returned constructor, n are the number of arguments, names and sorts are their projected sorts. projs is an output parameter. It contains the set of projection functions.
Definition at line 3926 of file z3++.h.
Referenced by fpa_sort().
|
inline |
create an uninterpreted sort with the name given by the string or symbol.
Definition at line 4048 of file z3++.h.
Referenced by fpa_sort().
|
inline |
Definition at line 4171 of file z3++.h.
Referenced by fpa_sort().
create a de-Bruijn variable.
Definition at line 4185 of file z3++.h.
Referenced by fpa_sort().
|
friend |
Definition at line 193 of file z3++.h.
Referenced by user_propagator_base.