A Context manages all other Z3 objects, global configuration options, etc. More...
Public Member Functions | |
| context () | |
| context (config &c) | |
| ~context () | |
| operator Z3_context () const | |
| Z3_error_code | check_error () const |
| Auxiliary method used to check for API usage errors. More... | |
| 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. More... | |
| bool | enable_exceptions () const |
| void | set (char const *param, char const *value) |
Update global parameter param with string value. More... | |
| void | set (char const *param, bool value) |
Update global parameter param with Boolean value. More... | |
| void | set (char const *param, int value) |
Update global parameter param with Integer value. More... | |
| 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. More... | |
| symbol | str_symbol (char const *s) |
| Create a Z3 symbol based on the given string. More... | |
| symbol | int_symbol (int n) |
| Create a Z3 symbol based on the given integer. More... | |
| sort | bool_sort () |
| Return the Boolean sort. More... | |
| sort | int_sort () |
| Return the integer sort. More... | |
| sort | real_sort () |
| Return the Real sort. More... | |
| sort | bv_sort (unsigned sz) |
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz. More... | |
| sort | char_sort () |
| Return the sort for Unicode characters. More... | |
| sort | string_sort () |
| Return the sort for Unicode strings. More... | |
| sort | seq_sort (sort &s) |
Return a sequence sort over base sort s. More... | |
| sort | re_sort (sort &seq_sort) |
Return a regular expression sort over sequences seq_sort. More... | |
| sort | array_sort (sort d, sort r) |
Return an array sort for arrays from d to r. More... | |
| 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,. More... | |
| template<size_t precision> | |
| sort | fpa_sort () |
| Return a FloatingPoint sort with given precision bitwidth (16, 32, 64 or 128). More... | |
| sort | fpa_rounding_mode_sort () |
| Return a RoundingMode sort. More... | |
| void | set_rounding_mode (rounding_mode rm) |
| Sets RoundingMode of FloatingPoints. More... | |
| 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. More... | |
| 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. More... | |
| sort | uninterpreted_sort (char const *name) |
| create an uninterpreted sort with the name given by the string or symbol. More... | |
| 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 (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, expr_vector const &args, expr const &body) |
| expr | constant (symbol const &name, sort const &s) |
| expr | constant (char const *name, sort const &s) |
| expr | bool_const (char const *name) |
| expr | int_const (char const *name) |
| expr | real_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 | 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, int d) |
| 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 (char const *n) |
| 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 More... | |
| 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 | scoped_context |
A Context manages all other Z3 objects, global configuration options, etc.
Return an array sort for arrays from d to r.
Example: Given a context c, c.array_sort(c.int_sort(), c.bool_sort()) is an array sort from integer to Boolean.
Definition at line 3288 of file z3++.h.
|
inline |
Definition at line 3289 of file z3++.h.
|
inline |
Return the Boolean sort.
Definition at line 3264 of file z3++.h.
Referenced by context::bool_const().
|
inline |
Definition at line 3456 of file z3++.h.
Referenced by goal::as_expr(), z3::implies(), z3::mk_xor(), z3::operator&&(), z3::operator||(), and solver::to_smt2().
|
inline |
Definition at line 3437 of file z3++.h.
|
inline |
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition at line 3267 of file z3++.h.
Referenced by context::bv_const(), and context::bv_val().
|
inline |
Definition at line 3471 of file z3++.h.
|
inline |
Definition at line 3472 of file z3++.h.
|
inline |
Definition at line 3473 of file z3++.h.
|
inline |
Definition at line 3474 of file z3++.h.
|
inline |
Definition at line 3475 of file z3++.h.
|
inline |
Definition at line 3476 of file z3++.h.
|
inline |
Return the sort for Unicode characters.
Definition at line 3269 of file z3++.h.
|
inline |
Auxiliary method used to check for API usage errors.
Definition at line 188 of file z3++.h.
Referenced by context::array_sort(), context::bool_sort(), context::bv_sort(), context::bv_val(), context::char_sort(), object::check_error(), context::check_parser_error(), z3::concat(), context::constant(), context::enumeration_sort(), expr::extract(), context::fpa_inf(), context::fpa_nan(), context::fpa_rounding_mode_sort(), context::fpa_sort(), context::fpa_val(), context::function(), context::int_sort(), context::int_symbol(), context::int_val(), context::num_val(), func_decl::operator()(), context::parse_file(), context::parse_string(), context::re_sort(), context::real_sort(), context::real_val(), context::recfun(), expr::repeat(), expr::rotate_left(), expr::rotate_right(), context::seq_sort(), context::str_symbol(), context::string_sort(), context::string_val(), z3::to_expr(), z3::to_func_decl(), z3::to_sort(), and context::tuple_sort().
|
inline |
Definition at line 195 of file z3++.h.
Referenced by solver::from_file(), and solver::from_string().
Definition at line 3427 of file z3++.h.
Referenced by context::bool_const(), context::bv_const(), context::constant(), context::fpa_const(), context::int_const(), context::real_const(), and context::string_const().
Definition at line 3432 of file z3++.h.
|
inline |
Definition at line 208 of file z3++.h.
Referenced by context::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 3293 of file z3++.h.
|
inline |
Definition at line 3485 of file z3++.h.
Definition at line 3484 of file z3++.h.
|
inline |
Definition at line 3445 of file z3++.h.
Referenced by z3::fpa_to_fpa(), z3::fpa_to_sbv(), z3::fpa_to_ubv(), z3::operator*(), z3::operator+(), z3::operator-(), z3::operator/(), z3::round_fpa_to_closest_integer(), z3::sbv_to_fpa(), and z3::ubv_to_fpa().
|
inline |
Return a RoundingMode sort.
Definition at line 3286 of file z3++.h.
|
inline |
Return a floating point sort. ebits is a number of exponent bits, sbits is a number of significand bits,.
Definition at line 3272 of file z3++.h.
| sort fpa_sort | ( | ) |
Return a FloatingPoint sort with given precision bitwidth (16, 32, 64 or 128).
Referenced by context::fpa_const().
|
inline |
Definition at line 3275 of file z3++.h.
Referenced by context::fpa_sort().
|
inline |
Definition at line 3278 of file z3++.h.
Referenced by context::fpa_sort().
|
inline |
Definition at line 3281 of file z3++.h.
Referenced by context::fpa_sort().
|
inline |
Definition at line 3284 of file z3++.h.
Referenced by context::fpa_sort().
|
inline |
Definition at line 3482 of file z3++.h.
Referenced by z3::operator!=(), and z3::operator==().
|
inline |
Definition at line 3483 of file z3++.h.
|
inline |
Definition at line 3325 of file z3++.h.
Referenced by z3::function().
|
inline |
Definition at line 3336 of file z3++.h.
|
inline |
Definition at line 3340 of file z3++.h.
|
inline |
Definition at line 3351 of file z3++.h.
Definition at line 3356 of file z3++.h.
|
inline |
Definition at line 3364 of file z3++.h.
|
inline |
Definition at line 3372 of file z3++.h.
|
inline |
Definition at line 3380 of file z3++.h.
|
inline |
Definition at line 3388 of file z3++.h.
|
inline |
Return the integer sort.
Definition at line 3265 of file z3++.h.
Referenced by context::int_const(), and context::int_val().
|
inline |
Create a Z3 symbol based on the given integer.
Definition at line 3262 of file z3++.h.
|
inline |
Definition at line 3458 of file z3++.h.
Referenced by z3::abs().
|
inline |
Definition at line 3459 of file z3++.h.
|
inline |
Definition at line 3460 of file z3++.h.
|
inline |
Definition at line 3461 of file z3++.h.
|
inline |
Definition at line 3462 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 230 of file z3++.h.
Definition at line 3492 of file z3++.h.
Referenced by z3::ashr(), z3::lshr(), z3::mod(), z3::operator!=(), z3::operator&(), func_decl::operator()(), z3::operator*(), z3::operator+(), z3::operator-(), z3::operator/(), z3::operator<(), z3::operator<=(), z3::operator==(), z3::operator>(), z3::operator>=(), z3::operator^(), z3::operator|(), z3::pw(), z3::rem(), z3::select(), z3::sge(), z3::sgt(), z3::shl(), z3::sle(), z3::slt(), z3::smod(), z3::srem(), z3::store(), z3::udiv(), z3::uge(), z3::ugt(), z3::ule(), z3::ult(), and z3::urem().
|
inline |
Definition at line 3811 of file z3++.h.
|
inline |
Definition at line 3834 of file z3++.h.
|
inline |
parsing
Definition at line 3805 of file z3++.h.
|
inline |
Definition at line 3817 of file z3++.h.
Return a regular expression sort over sequences seq_sort.
Definition at line 3271 of file z3++.h.
|
inline |
Return the Real sort.
Definition at line 3266 of file z3++.h.
Referenced by context::real_const(), and context::real_val().
|
inline |
Definition at line 3464 of file z3++.h.
Referenced by z3::abs().
|
inline |
Definition at line 3465 of file z3++.h.
|
inline |
Definition at line 3466 of file z3++.h.
|
inline |
Definition at line 3467 of file z3++.h.
|
inline |
Definition at line 3468 of file z3++.h.
|
inline |
Definition at line 3469 of file z3++.h.
|
inline |
|
inline |
Definition at line 3396 of file z3++.h.
Referenced by context::recfun(), and z3::recfun().
|
inline |
Definition at line 3408 of file z3++.h.
Definition at line 3412 of file z3++.h.
Definition at line 3416 of file z3++.h.
Return a sequence sort over base sort s.
Definition at line 3270 of file z3++.h.
|
inline |
|
inline |
|
inline |
|
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.
|
inline |
|
inline |
Create a Z3 symbol based on the given string.
Definition at line 3261 of file z3++.h.
Referenced by context::constant(), context::function(), context::recfun(), and solver::solver().
|
inline |
Definition at line 3436 of file z3++.h.
|
inline |
Return the sort for Unicode strings.
Definition at line 3268 of file z3++.h.
Referenced by context::string_const().
|
inline |
Definition at line 3488 of file z3++.h.
|
inline |
Definition at line 3487 of file z3++.h.
|
inline |
Definition at line 3489 of file z3++.h.
|
inline |
Definition at line 3490 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 3304 of file z3++.h.
|
inline |
create an uninterpreted sort with the name given by the string or symbol.
Definition at line 3317 of file z3++.h.
|
friend |
1.8.10