Z3
Loading...
Searching...
No Matches
z3 Namespace Reference

Z3 C++ namespace. More...

Data Structures

class  cast_ast
class  ast_vector_tpl
class  exception
 Exception used to sign API usage errors. More...
class  config
 Z3 global configuration object. More...
class  context
 A Context manages all other Z3 objects, global configuration options, etc. More...
class  array
class  object
class  symbol
class  param_descrs
class  params
class  ast
class  sort
 A Z3 sort (aka type). Every expression (i.e., formula or term) in Z3 has a sort. More...
class  func_decl
 Function declaration (aka function definition). It is the signature of interpreted and uninterpreted functions in Z3. The basic building block in Z3 is the function application. More...
class  parser_context
class  expr
 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...
class  cast_ast< ast >
class  cast_ast< expr >
class  cast_ast< sort >
class  cast_ast< func_decl >
class  func_entry
class  func_interp
class  model
class  stats
class  parameter
 class for auxiliary parameters associated with func_decl The class is initialized with a func_decl or application expression and an index The accessor get_expr, get_sort, ... is available depending on the value of kind(). The caller is responsible to check that the kind of the parameter aligns with the call (get_expr etc). More...
class  solver
class  goal
class  apply_result
class  tactic
class  simplifier
class  probe
class  optimize
class  fixedpoint
class  constructor_list
class  constructors
class  on_clause
class  user_propagator_base
class  rcf_num
 Wrapper for Z3 Real Closed Field (RCF) numerals. More...

Typedefs

typedef ast_vector_tpl< astast_vector
typedef ast_vector_tpl< exprexpr_vector
typedef ast_vector_tpl< sortsort_vector
typedef ast_vector_tpl< func_declfunc_decl_vector
typedef std::function< void(expr const &proof, std::vector< unsigned > const &deps, expr_vector const &clause)> on_clause_eh_t

Enumerations

enum  check_result { unsat , sat , unknown }
enum  rounding_mode {
  RNA , RNE , RTP , RTN ,
  RTZ
}

Functions

void set_param (char const *param, char const *value)
void set_param (char const *param, bool value)
void set_param (char const *param, int value)
void reset_params ()
void get_version (unsigned &major, unsigned &minor, unsigned &build_number, unsigned &revision_number)
 Return Z3 version number information.
std::string get_full_version ()
 Return a string that fully describes the version of Z3 in use.
void enable_trace (char const *tag)
 Enable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.
void disable_trace (char const *tag)
 Disable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.
std::ostream & operator<< (std::ostream &out, exception const &e)
check_result to_check_result (Z3_lbool l)
void check_context (object const &a, object const &b)
std::ostream & operator<< (std::ostream &out, symbol const &s)
std::ostream & operator<< (std::ostream &out, param_descrs const &d)
std::ostream & operator<< (std::ostream &out, params const &p)
std::ostream & operator<< (std::ostream &out, ast const &n)
bool eq (ast const &a, ast const &b)
expr select (expr const &a, expr const &i)
 forward declarations
expr select (expr const &a, expr_vector const &i)
expr implies (expr const &a, expr const &b)
expr implies (expr const &a, bool b)
expr implies (bool a, expr const &b)
expr pw (expr const &a, expr const &b)
expr pw (expr const &a, int b)
expr pw (int a, expr const &b)
expr mod (expr const &a, expr const &b)
expr mod (expr const &a, int b)
expr mod (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 rem (expr const &a, expr const &b)
expr rem (expr const &a, int b)
expr rem (int a, expr const &b)
expr operator! (expr const &a)
expr is_int (expr const &e)
expr operator&& (expr const &a, expr const &b)
expr operator&& (expr const &a, bool b)
expr operator&& (bool a, expr const &b)
expr operator|| (expr const &a, expr const &b)
expr operator|| (expr const &a, bool b)
expr operator|| (bool 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, double b)
expr operator== (double 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, double b)
expr operator!= (double 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, 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, 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 nand (expr const &a, expr const &b)
expr nor (expr const &a, expr const &b)
expr xnor (expr const &a, expr const &b)
expr min (expr const &a, expr const &b)
expr max (expr const &a, expr const &b)
expr bvredor (expr const &a)
expr bvredand (expr const &a)
expr abs (expr const &a)
expr sqrt (expr const &a, expr const &rm)
expr fp_eq (expr const &a, expr const &b)
expr operator~ (expr const &a)
expr fma (expr const &a, expr const &b, expr const &c, expr const &rm)
expr fpa_fp (expr const &sgn, expr const &exp, expr const &sig)
expr fpa_to_sbv (expr const &t, unsigned sz)
expr fpa_to_ubv (expr const &t, unsigned sz)
expr sbv_to_fpa (expr const &t, sort s)
expr ubv_to_fpa (expr const &t, sort s)
expr fpa_to_fpa (expr const &t, sort s)
expr round_fpa_to_closest_integer (expr const &t)
expr ite (expr const &c, expr const &t, expr const &e)
 Create the if-then-else expression ite(c, t, e).
expr to_expr (context &c, Z3_ast a)
 Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the whole C API with the C++ layer defined in this file.
sort to_sort (context &c, Z3_sort s)
func_decl to_func_decl (context &c, Z3_func_decl f)
expr sle (expr const &a, expr const &b)
 signed less than or equal to operator for bitvectors.
expr sle (expr const &a, int b)
expr sle (int a, expr const &b)
expr slt (expr const &a, expr const &b)
 signed less than operator for bitvectors.
expr slt (expr const &a, int b)
expr slt (int a, expr const &b)
expr sge (expr const &a, expr const &b)
 signed greater than or equal to operator for bitvectors.
expr sge (expr const &a, int b)
expr sge (int a, expr const &b)
expr sgt (expr const &a, expr const &b)
 signed greater than operator for bitvectors.
expr sgt (expr const &a, int b)
expr sgt (int a, expr const &b)
expr ule (expr const &a, expr const &b)
 unsigned less than or equal to operator for bitvectors.
expr ule (expr const &a, int b)
expr ule (int a, expr const &b)
expr ult (expr const &a, expr const &b)
 unsigned less than operator for bitvectors.
expr ult (expr const &a, int b)
expr ult (int a, expr const &b)
expr uge (expr const &a, expr const &b)
 unsigned greater than or equal to operator for bitvectors.
expr uge (expr const &a, int b)
expr uge (int a, expr const &b)
expr ugt (expr const &a, expr const &b)
 unsigned greater than operator for bitvectors.
expr ugt (expr const &a, int b)
expr ugt (int a, expr const &b)
expr sdiv (expr const &a, expr const &b)
 signed division operator for bitvectors.
expr sdiv (expr const &a, int b)
expr sdiv (int a, expr const &b)
expr udiv (expr const &a, expr const &b)
 unsigned division operator for bitvectors.
expr udiv (expr const &a, int b)
expr udiv (int a, expr const &b)
expr srem (expr const &a, expr const &b)
 signed remainder operator for bitvectors
expr srem (expr const &a, int b)
expr srem (int a, expr const &b)
expr smod (expr const &a, expr const &b)
 signed modulus operator for bitvectors
expr smod (expr const &a, int b)
expr smod (int a, expr const &b)
expr urem (expr const &a, expr const &b)
 unsigned reminder operator for bitvectors
expr urem (expr const &a, int b)
expr urem (int a, expr const &b)
expr shl (expr const &a, expr const &b)
 shift left operator for bitvectors
expr shl (expr const &a, int b)
expr shl (int a, expr const &b)
expr lshr (expr const &a, expr const &b)
 logic shift right operator for bitvectors
expr lshr (expr const &a, int b)
expr lshr (int a, expr const &b)
expr ashr (expr const &a, expr const &b)
 arithmetic shift right operator for bitvectors
expr ashr (expr const &a, int b)
expr ashr (int a, expr const &b)
expr zext (expr const &a, unsigned i)
 Extend the given bit-vector with zeros to the (unsigned) equivalent bitvector of size m+i, where m is the size of the given bit-vector.
expr bv2int (expr const &a, bool is_signed)
 bit-vector and integer conversions.
expr int2bv (unsigned n, expr const &a)
expr bvadd_no_overflow (expr const &a, expr const &b, bool is_signed)
 bit-vector overflow/underflow checks
expr bvadd_no_underflow (expr const &a, expr const &b)
expr bvsub_no_overflow (expr const &a, expr const &b)
expr bvsub_no_underflow (expr const &a, expr const &b, bool is_signed)
expr bvsdiv_no_overflow (expr const &a, expr const &b)
expr bvneg_no_overflow (expr const &a)
expr bvmul_no_overflow (expr const &a, expr const &b, bool is_signed)
expr bvmul_no_underflow (expr const &a, expr const &b)
expr sext (expr const &a, unsigned i)
 Sign-extend of the given bit-vector to the (signed) equivalent bitvector of size m+i, where m is the size of the given bit-vector.
func_decl linear_order (sort const &a, unsigned index)
func_decl partial_order (sort const &a, unsigned index)
func_decl piecewise_linear_order (sort const &a, unsigned index)
func_decl tree_order (sort const &a, unsigned index)
expr_vector polynomial_subresultants (expr const &p, expr const &q, expr const &x)
 Return the nonzero subresultants of p and q with respect to the "variable" x.
expr forall (expr const &x, expr const &b)
expr forall (expr const &x1, expr const &x2, expr const &b)
expr forall (expr const &x1, expr const &x2, expr const &x3, expr const &b)
expr forall (expr const &x1, expr const &x2, expr const &x3, expr const &x4, expr const &b)
expr forall (expr_vector const &xs, expr const &b)
expr exists (expr const &x, expr const &b)
expr exists (expr const &x1, expr const &x2, expr const &b)
expr exists (expr const &x1, expr const &x2, expr const &x3, expr const &b)
expr exists (expr const &x1, expr const &x2, expr const &x3, expr const &x4, expr const &b)
expr exists (expr_vector const &xs, expr const &b)
expr lambda (expr const &x, expr const &b)
expr lambda (expr const &x1, expr const &x2, expr const &b)
expr lambda (expr const &x1, expr const &x2, expr const &x3, expr const &b)
expr lambda (expr const &x1, expr const &x2, expr const &x3, expr const &x4, expr const &b)
expr lambda (expr_vector const &xs, expr const &b)
expr pble (expr_vector const &es, int const *coeffs, int bound)
expr pbge (expr_vector const &es, int const *coeffs, int bound)
expr pbeq (expr_vector const &es, int const *coeffs, int bound)
expr atmost (expr_vector const &es, unsigned bound)
expr atleast (expr_vector const &es, unsigned bound)
expr sum (expr_vector const &args)
expr distinct (expr_vector const &args)
expr concat (expr const &a, expr const &b)
expr concat (expr_vector const &args)
expr map (expr const &f, expr const &list)
expr mapi (expr const &f, expr const &i, expr const &list)
expr foldl (expr const &f, expr const &a, expr const &list)
expr foldli (expr const &f, expr const &i, expr const &a, expr const &list)
expr mk_or (expr_vector const &args)
expr mk_and (expr_vector const &args)
expr mk_xor (expr_vector const &args)
std::ostream & operator<< (std::ostream &out, model const &m)
std::ostream & operator<< (std::ostream &out, stats const &s)
std::ostream & operator<< (std::ostream &out, check_result r)
std::ostream & operator<< (std::ostream &out, solver const &s)
std::ostream & operator<< (std::ostream &out, goal const &g)
std::ostream & operator<< (std::ostream &out, apply_result const &r)
tactic operator& (tactic const &t1, tactic const &t2)
tactic operator| (tactic const &t1, tactic const &t2)
tactic repeat (tactic const &t, unsigned max=UINT_MAX)
tactic with (tactic const &t, params const &p)
tactic try_for (tactic const &t, unsigned ms)
tactic par_or (unsigned n, tactic const *tactics)
tactic par_and_then (tactic const &t1, tactic const &t2)
simplifier operator& (simplifier const &t1, simplifier const &t2)
simplifier with (simplifier const &t, params const &p)
probe operator<= (probe const &p1, probe const &p2)
probe operator<= (probe const &p1, double p2)
probe operator<= (double p1, probe const &p2)
probe operator>= (probe const &p1, probe const &p2)
probe operator>= (probe const &p1, double p2)
probe operator>= (double p1, probe const &p2)
probe operator< (probe const &p1, probe const &p2)
probe operator< (probe const &p1, double p2)
probe operator< (double p1, probe const &p2)
probe operator> (probe const &p1, probe const &p2)
probe operator> (probe const &p1, double p2)
probe operator> (double p1, probe const &p2)
probe operator== (probe const &p1, probe const &p2)
probe operator== (probe const &p1, double p2)
probe operator== (double p1, probe const &p2)
probe operator&& (probe const &p1, probe const &p2)
probe operator|| (probe const &p1, probe const &p2)
probe operator! (probe const &p)
std::ostream & operator<< (std::ostream &out, optimize const &s)
std::ostream & operator<< (std::ostream &out, fixedpoint const &f)
tactic fail_if (probe const &p)
tactic when (probe const &p, tactic const &t)
tactic cond (probe const &p, tactic const &t1, tactic const &t2)
expr to_real (expr const &a)
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 (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 function (char const *name, sort_vector const &domain, sort const &range)
func_decl function (std::string const &name, sort_vector const &domain, 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 &d1, sort const &range)
func_decl recfun (char const *name, sort const &d1, sort const &d2, sort const &range)
expr select (expr const &a, int i)
expr store (expr const &a, expr const &i, expr const &v)
expr store (expr const &a, int i, expr const &v)
expr store (expr const &a, expr i, int v)
expr store (expr const &a, int i, int v)
expr store (expr const &a, expr_vector const &i, expr const &v)
expr as_array (func_decl &f)
expr array_default (expr const &a)
expr array_ext (expr const &a, expr const &b)
expr const_array (sort const &d, expr const &v)
expr empty_set (sort const &s)
expr full_set (sort const &s)
expr set_add (expr const &s, expr const &e)
expr set_del (expr const &s, expr const &e)
expr set_union (expr const &a, expr const &b)
expr set_intersect (expr const &a, expr const &b)
expr set_difference (expr const &a, expr const &b)
expr set_complement (expr const &a)
expr set_member (expr const &s, expr const &e)
expr set_subset (expr const &a, expr const &b)
expr finite_set_empty (sort const &s)
expr finite_set_singleton (expr const &e)
expr finite_set_union (expr const &a, expr const &b)
expr finite_set_intersect (expr const &a, expr const &b)
expr finite_set_difference (expr const &a, expr const &b)
expr finite_set_member (expr const &e, expr const &s)
expr finite_set_size (expr const &s)
expr finite_set_subset (expr const &a, expr const &b)
expr finite_set_map (expr const &f, expr const &s)
expr finite_set_filter (expr const &f, expr const &s)
expr finite_set_range (expr const &low, expr const &high)
expr empty (sort const &s)
expr suffixof (expr const &a, expr const &b)
expr prefixof (expr const &a, expr const &b)
expr indexof (expr const &s, expr const &substr, expr const &offset)
expr last_indexof (expr const &s, expr const &substr)
expr to_re (expr const &s)
expr in_re (expr const &s, expr const &re)
expr plus (expr const &re)
expr option (expr const &re)
expr star (expr const &re)
expr re_empty (sort const &s)
expr re_full (sort const &s)
expr re_intersect (expr_vector const &args)
expr re_diff (expr const &a, expr const &b)
expr re_complement (expr const &a)
expr range (expr const &lo, expr const &hi)
rcf_num rcf_pi (context &c)
 Create an RCF numeral representing pi.
rcf_num rcf_e (context &c)
 Create an RCF numeral representing e (Euler's constant).
rcf_num rcf_infinitesimal (context &c)
 Create an RCF numeral representing an infinitesimal.
std::vector< rcf_numrcf_roots (context &c, std::vector< rcf_num > const &coeffs)
 Find roots of a polynomial with given coefficients.

Detailed Description

Z3 C++ namespace.

Typedef Documentation

◆ ast_vector

Definition at line 76 of file z3++.h.

◆ expr_vector

Definition at line 77 of file z3++.h.

◆ func_decl_vector

Definition at line 79 of file z3++.h.

◆ on_clause_eh_t

typedef std::function<void(expr const& proof, std::vector<unsigned> const& deps, expr_vector const& clause)> on_clause_eh_t

Definition at line 4585 of file z3++.h.

◆ sort_vector

Definition at line 78 of file z3++.h.

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

Definition at line 166 of file z3++.h.

166 {
168 };
@ unknown
Definition z3++.h:167
@ sat
Definition z3++.h:167
@ unsat
Definition z3++.h:167

◆ rounding_mode

Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

Definition at line 170 of file z3++.h.

170 {
171 RNA,
172 RNE,
173 RTP,
174 RTN,
175 RTZ
176 };
@ RNE
Definition z3++.h:172
@ RNA
Definition z3++.h:171
@ RTZ
Definition z3++.h:175
@ RTN
Definition z3++.h:174
@ RTP
Definition z3++.h:173

Function Documentation

◆ abs()

expr abs ( expr const & a)
inline

Definition at line 2126 of file z3++.h.

2126 {
2127 Z3_ast r;
2128 if (a.is_int()) {
2129 expr zero = a.ctx().int_val(0);
2130 expr ge = a >= zero;
2131 expr na = -a;
2132 r = Z3_mk_ite(a.ctx(), ge, a, na);
2133 }
2134 else if (a.is_real()) {
2135 expr zero = a.ctx().real_val(0);
2136 expr ge = a >= zero;
2137 expr na = -a;
2138 r = Z3_mk_ite(a.ctx(), ge, a, na);
2139 }
2140 else {
2141 r = Z3_mk_fpa_abs(a.ctx(), a);
2142 }
2143 a.check_error();
2144 return expr(a.ctx(), r);
2145 }
expr int_val(int n)
Definition z3++.h:4032
expr real_val(int n)
Definition z3++.h:4039
A Z3 expression is used to represent formulas and terms. For Z3, a formula is any expression of sort ...
Definition z3++.h:919
context & ctx() const
Definition z3++.h:544
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.

◆ array_default()

expr array_default ( expr const & a)
inline

Definition at line 4236 of file z3++.h.

4236 {
4237 Z3_ast r = Z3_mk_array_default(a.ctx(), a);
4238 a.check_error();
4239 return expr(a.ctx(), r);
4240 }
Z3_ast Z3_API Z3_mk_array_default(Z3_context c, Z3_ast array)
Access the array default value. Produces the default range value, for arrays that can be represented ...

◆ array_ext()

expr array_ext ( expr const & a,
expr const & b )
inline

Definition at line 4242 of file z3++.h.

4242 {
4243 check_context(a, b);
4244 Z3_ast r = Z3_mk_array_ext(a.ctx(), a, b);
4245 a.check_error();
4246 return expr(a.ctx(), r);
4247 }
Z3_ast Z3_API Z3_mk_array_ext(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create array extensionality index given two arrays with the same sort. The meaning is given by the ax...
void check_context(object const &a, object const &b)
Definition z3++.h:548

◆ as_array()

expr as_array ( func_decl & f)
inline

Definition at line 4230 of file z3++.h.

4230 {
4231 Z3_ast r = Z3_mk_as_array(f.ctx(), f);
4232 f.check_error();
4233 return expr(f.ctx(), r);
4234 }
Z3_error_code check_error() const
Definition z3++.h:545
Z3_ast Z3_API Z3_mk_as_array(Z3_context c, Z3_func_decl f)
Create array with the same interpretation as a function. The array satisfies the property (f x) = (se...

◆ ashr() [1/3]

expr ashr ( expr const & a,
expr const & b )
inline

arithmetic shift right operator for bitvectors

Definition at line 2360 of file z3++.h.

2360{ return to_expr(a.ctx(), Z3_mk_bvashr(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvashr(Z3_context c, Z3_ast t1, Z3_ast t2)
Arithmetic shift right.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition z3++.h:2238

Referenced by ashr(), and ashr().

◆ ashr() [2/3]

expr ashr ( expr const & a,
int b )
inline

Definition at line 2361 of file z3++.h.

2361{ return ashr(a, a.ctx().num_val(b, a.get_sort())); }
expr ashr(expr const &a, expr const &b)
arithmetic shift right operator for bitvectors
Definition z3++.h:2360

◆ ashr() [3/3]

expr ashr ( int a,
expr const & b )
inline

Definition at line 2362 of file z3++.h.

2362{ return ashr(b.ctx().num_val(a, b.get_sort()), b); }

◆ atleast()

expr atleast ( expr_vector const & es,
unsigned bound )
inline

Definition at line 2582 of file z3++.h.

2582 {
2583 assert(es.size() > 0);
2584 context& ctx = es[0u].ctx();
2585 array<Z3_ast> _es(es);
2586 Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2587 ctx.check_error();
2588 return expr(ctx, r);
2589 }
A Context manages all other Z3 objects, global configuration options, etc.
Definition z3++.h:191
Z3_error_code check_error() const
Auxiliary method used to check for API usage errors.
Definition z3++.h:241
Z3_ast Z3_API Z3_mk_atleast(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ atmost()

expr atmost ( expr_vector const & es,
unsigned bound )
inline

Definition at line 2574 of file z3++.h.

2574 {
2575 assert(es.size() > 0);
2576 context& ctx = es[0u].ctx();
2577 array<Z3_ast> _es(es);
2578 Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2579 ctx.check_error();
2580 return expr(ctx, r);
2581 }
Z3_ast Z3_API Z3_mk_atmost(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ bv2int()

expr bv2int ( expr const & a,
bool is_signed )
inline

bit-vector and integer conversions.

Definition at line 2372 of file z3++.h.

2372{ Z3_ast r = Z3_mk_bv2int(a.ctx(), a, is_signed); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bv2int(Z3_context c, Z3_ast t1, bool is_signed)
Create an integer from the bit-vector argument t1. If is_signed is false, then the bit-vector t1 is t...

◆ bvadd_no_overflow()

expr bvadd_no_overflow ( expr const & a,
expr const & b,
bool is_signed )
inline

bit-vector overflow/underflow checks

Definition at line 2378 of file z3++.h.

2378 {
2379 check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_overflow(a.ctx(), a, b, is_signed); a.check_error(); return expr(a.ctx(), r);
2380 }
Z3_ast Z3_API Z3_mk_bvadd_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise addition of t1 and t2 does not overflow.

◆ bvadd_no_underflow()

expr bvadd_no_underflow ( expr const & a,
expr const & b )
inline

Definition at line 2381 of file z3++.h.

2381 {
2382 check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2383 }
Z3_ast Z3_API Z3_mk_bvadd_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed addition of t1 and t2 does not underflow.

◆ bvmul_no_overflow()

expr bvmul_no_overflow ( expr const & a,
expr const & b,
bool is_signed )
inline

Definition at line 2396 of file z3++.h.

2396 {
2397 check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_overflow(a.ctx(), a, b, is_signed); a.check_error(); return expr(a.ctx(), r);
2398 }
Z3_ast Z3_API Z3_mk_bvmul_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise multiplication of t1 and t2 does not overflow.

◆ bvmul_no_underflow()

expr bvmul_no_underflow ( expr const & a,
expr const & b )
inline

Definition at line 2399 of file z3++.h.

2399 {
2400 check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2401 }
Z3_ast Z3_API Z3_mk_bvmul_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed multiplication of t1 and t2 does not underflo...

◆ bvneg_no_overflow()

expr bvneg_no_overflow ( expr const & a)
inline

Definition at line 2393 of file z3++.h.

2393 {
2394 Z3_ast r = Z3_mk_bvneg_no_overflow(a.ctx(), a); a.check_error(); return expr(a.ctx(), r);
2395 }
Z3_ast Z3_API Z3_mk_bvneg_no_overflow(Z3_context c, Z3_ast t1)
Check that bit-wise negation does not overflow when t1 is interpreted as a signed bit-vector.

◆ bvredand()

expr bvredand ( expr const & a)
inline

Definition at line 2120 of file z3++.h.

2120 {
2121 assert(a.is_bv());
2122 Z3_ast r = Z3_mk_bvredand(a.ctx(), a);
2123 a.check_error();
2124 return expr(a.ctx(), r);
2125 }
Z3_ast Z3_API Z3_mk_bvredand(Z3_context c, Z3_ast t1)
Take conjunction of bits in vector, return vector of length 1.

◆ bvredor()

expr bvredor ( expr const & a)
inline

Definition at line 2114 of file z3++.h.

2114 {
2115 assert(a.is_bv());
2116 Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
2117 a.check_error();
2118 return expr(a.ctx(), r);
2119 }
Z3_ast Z3_API Z3_mk_bvredor(Z3_context c, Z3_ast t1)
Take disjunction of bits in vector, return vector of length 1.

◆ bvsdiv_no_overflow()

expr bvsdiv_no_overflow ( expr const & a,
expr const & b )
inline

Definition at line 2390 of file z3++.h.

2390 {
2391 check_context(a, b); Z3_ast r = Z3_mk_bvsdiv_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2392 }
Z3_ast Z3_API Z3_mk_bvsdiv_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed division of t1 and t2 does not overflow.

◆ bvsub_no_overflow()

expr bvsub_no_overflow ( expr const & a,
expr const & b )
inline

Definition at line 2384 of file z3++.h.

2384 {
2385 check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2386 }
Z3_ast Z3_API Z3_mk_bvsub_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed subtraction of t1 and t2 does not overflow.

◆ bvsub_no_underflow()

expr bvsub_no_underflow ( expr const & a,
expr const & b,
bool is_signed )
inline

Definition at line 2387 of file z3++.h.

2387 {
2388 check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_underflow(a.ctx(), a, b, is_signed); a.check_error(); return expr(a.ctx(), r);
2389 }
Z3_ast Z3_API Z3_mk_bvsub_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise subtraction of t1 and t2 does not underflow.

◆ check_context()

void check_context ( object const & a,
object const & b )
inline

◆ concat() [1/2]

expr concat ( expr const & a,
expr const & b )
inline

Definition at line 2608 of file z3++.h.

2608 {
2609 check_context(a, b);
2610 Z3_ast r;
2611 if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2612 Z3_ast _args[2] = { a, b };
2613 r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2614 }
2615 else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2616 Z3_ast _args[2] = { a, b };
2617 r = Z3_mk_re_concat(a.ctx(), 2, _args);
2618 }
2619 else {
2620 r = Z3_mk_concat(a.ctx(), a, b);
2621 }
2622 a.ctx().check_error();
2623 return expr(a.ctx(), r);
2624 }
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

Referenced by expr::operator+.

◆ concat() [2/2]

expr concat ( expr_vector const & args)
inline

Definition at line 2626 of file z3++.h.

2626 {
2627 Z3_ast r;
2628 assert(args.size() > 0);
2629 if (args.size() == 1) {
2630 return args[0u];
2631 }
2632 context& ctx = args[0u].ctx();
2633 array<Z3_ast> _args(args);
2634 if (Z3_is_seq_sort(ctx, args[0u].get_sort())) {
2635 r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2636 }
2637 else if (Z3_is_re_sort(ctx, args[0u].get_sort())) {
2638 r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2639 }
2640 else {
2641 r = _args[args.size()-1];
2642 for (unsigned i = args.size()-1; i > 0; ) {
2643 --i;
2644 r = Z3_mk_concat(ctx, _args[i], r);
2645 ctx.check_error();
2646 }
2647 }
2648 ctx.check_error();
2649 return expr(ctx, r);
2650 }

◆ cond()

tactic cond ( probe const & p,
tactic const & t1,
tactic const & t2 )
inline

Definition at line 3692 of file z3++.h.

3692 {
3693 check_context(p, t1); check_context(p, t2);
3694 Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
3695 t1.check_error();
3696 return tactic(t1.ctx(), r);
3697 }
Z3_tactic Z3_API Z3_tactic_cond(Z3_context c, Z3_probe p, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal if the probe p evaluates to true, and t2 if p evaluat...

◆ const_array()

expr const_array ( sort const & d,
expr const & v )
inline

Definition at line 4260 of file z3++.h.

4260 {
4262 }
Z3_ast Z3_API Z3_mk_const_array(Z3_context c, Z3_sort domain, Z3_ast v)
Create the constant array.
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition z3++.h:4254

◆ disable_trace()

void disable_trace ( char const * tag)
inline

Disable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.

Definition at line 112 of file z3++.h.

112 {
113 Z3_disable_trace(tag);
114 }
void Z3_API Z3_disable_trace(Z3_string tag)
Disable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.

◆ distinct()

expr distinct ( expr_vector const & args)
inline

Definition at line 2599 of file z3++.h.

2599 {
2600 assert(args.size() > 0);
2601 context& ctx = args[0u].ctx();
2602 array<Z3_ast> _args(args);
2603 Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2604 ctx.check_error();
2605 return expr(ctx, r);
2606 }
Z3_ast Z3_API Z3_mk_distinct(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing distinct(args[0], ..., args[num_args-1]).

◆ empty()

expr empty ( sort const & s)
inline

Definition at line 4364 of file z3++.h.

4364 {
4365 Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
4366 s.check_error();
4367 return expr(s.ctx(), r);
4368 }
Z3_ast Z3_API Z3_mk_seq_empty(Z3_context c, Z3_sort seq)
Create an empty sequence of the sequence sort seq.

◆ empty_set()

expr empty_set ( sort const & s)
inline

Definition at line 4264 of file z3++.h.

4264 {
4266 }
Z3_ast Z3_API Z3_mk_empty_set(Z3_context c, Z3_sort domain)
Create the empty set.
#define MK_EXPR1(_fn, _arg)
Definition z3++.h:4249

◆ enable_trace()

void enable_trace ( char const * tag)
inline

Enable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.

Definition at line 104 of file z3++.h.

104 {
105 Z3_enable_trace(tag);
106 }
void Z3_API Z3_enable_trace(Z3_string tag)
Enable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.

◆ eq()

bool eq ( ast const & a,
ast const & b )
inline

Definition at line 654 of file z3++.h.

654{ return Z3_is_eq_ast(a.ctx(), a, b); }
bool Z3_API Z3_is_eq_ast(Z3_context c, Z3_ast t1, Z3_ast t2)
Compare terms.

◆ exists() [1/5]

expr exists ( expr const & x,
expr const & b )
inline

Definition at line 2501 of file z3++.h.

2501 {
2502 check_context(x, b);
2503 Z3_app vars[] = {(Z3_app) x};
2504 Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2505 }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.

◆ exists() [2/5]

expr exists ( expr const & x1,
expr const & x2,
expr const & b )
inline

Definition at line 2506 of file z3++.h.

2506 {
2507 check_context(x1, b); check_context(x2, b);
2508 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2509 Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2510 }

◆ exists() [3/5]

expr exists ( expr const & x1,
expr const & x2,
expr const & x3,
expr const & b )
inline

Definition at line 2511 of file z3++.h.

2511 {
2512 check_context(x1, b); check_context(x2, b); check_context(x3, b);
2513 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2514 Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2515 }

◆ exists() [4/5]

expr exists ( expr const & x1,
expr const & x2,
expr const & x3,
expr const & x4,
expr const & b )
inline

Definition at line 2516 of file z3++.h.

2516 {
2517 check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2518 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2519 Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2520 }

◆ exists() [5/5]

expr exists ( expr_vector const & xs,
expr const & b )
inline

Definition at line 2521 of file z3++.h.

2521 {
2522 array<Z3_app> vars(xs);
2523 Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, vars.size(), vars.ptr(), 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2524 }

◆ fail_if()

tactic fail_if ( probe const & p)
inline

Definition at line 3681 of file z3++.h.

3681 {
3682 Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
3683 p.check_error();
3684 return tactic(p.ctx(), r);
3685 }
Z3_tactic Z3_API Z3_tactic_fail_if(Z3_context c, Z3_probe p)
Return a tactic that fails if the probe p evaluates to false.

◆ finite_set_difference()

expr finite_set_difference ( expr const & a,
expr const & b )
inline

Definition at line 4332 of file z3++.h.

4332 {
4334 }
Z3_ast Z3_API Z3_mk_finite_set_difference(Z3_context c, Z3_ast s1, Z3_ast s2)
Create the set difference of two finite sets.

◆ finite_set_empty()

expr finite_set_empty ( sort const & s)
inline

Definition at line 4314 of file z3++.h.

4314 {
4315 Z3_ast r = Z3_mk_finite_set_empty(s.ctx(), s);
4316 s.check_error();
4317 return expr(s.ctx(), r);
4318 }
Z3_ast Z3_API Z3_mk_finite_set_empty(Z3_context c, Z3_sort set_sort)
Create an empty finite set of the given sort.

◆ finite_set_filter()

expr finite_set_filter ( expr const & f,
expr const & s )
inline

Definition at line 4352 of file z3++.h.

4352 {
4354 }
Z3_ast Z3_API Z3_mk_finite_set_filter(Z3_context c, Z3_ast f, Z3_ast set)
Filter a finite set using a predicate.

◆ finite_set_intersect()

expr finite_set_intersect ( expr const & a,
expr const & b )
inline

Definition at line 4328 of file z3++.h.

4328 {
4330 }
Z3_ast Z3_API Z3_mk_finite_set_intersect(Z3_context c, Z3_ast s1, Z3_ast s2)
Create the intersection of two finite sets.

◆ finite_set_map()

expr finite_set_map ( expr const & f,
expr const & s )
inline

Definition at line 4348 of file z3++.h.

4348 {
4350 }
Z3_ast Z3_API Z3_mk_finite_set_map(Z3_context c, Z3_ast f, Z3_ast set)
Apply a function to all elements of a finite set.

◆ finite_set_member()

expr finite_set_member ( expr const & e,
expr const & s )
inline

Definition at line 4336 of file z3++.h.

4336 {
4338 }
Z3_ast Z3_API Z3_mk_finite_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check if an element is a member of a finite set.

◆ finite_set_range()

expr finite_set_range ( expr const & low,
expr const & high )
inline

Definition at line 4356 of file z3++.h.

4356 {
4357 MK_EXPR2(Z3_mk_finite_set_range, low, high);
4358 }
Z3_ast Z3_API Z3_mk_finite_set_range(Z3_context c, Z3_ast low, Z3_ast high)
Create a finite set of integers in the range [low, high].

◆ finite_set_singleton()

expr finite_set_singleton ( expr const & e)
inline

Definition at line 4320 of file z3++.h.

4320 {
4322 }
Z3_ast Z3_API Z3_mk_finite_set_singleton(Z3_context c, Z3_ast elem)
Create a singleton finite set.

◆ finite_set_size()

expr finite_set_size ( expr const & s)
inline

Definition at line 4340 of file z3++.h.

4340 {
4342 }
Z3_ast Z3_API Z3_mk_finite_set_size(Z3_context c, Z3_ast set)
Get the size (cardinality) of a finite set.

◆ finite_set_subset()

expr finite_set_subset ( expr const & a,
expr const & b )
inline

Definition at line 4344 of file z3++.h.

4344 {
4346 }
Z3_ast Z3_API Z3_mk_finite_set_subset(Z3_context c, Z3_ast s1, Z3_ast s2)
Check if one finite set is a subset of another.

◆ finite_set_union()

expr finite_set_union ( expr const & a,
expr const & b )
inline

Definition at line 4324 of file z3++.h.

4324 {
4326 }
Z3_ast Z3_API Z3_mk_finite_set_union(Z3_context c, Z3_ast s1, Z3_ast s2)
Create the union of two finite sets.

◆ fma()

expr fma ( expr const & a,
expr const & b,
expr const & c,
expr const & rm )
inline

Definition at line 2162 of file z3++.h.

2162 {
2163 check_context(a, b); check_context(a, c); check_context(a, rm);
2164 assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
2165 Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
2166 a.check_error();
2167 return expr(a.ctx(), r);
2168 }
Z3_ast Z3_API Z3_mk_fpa_fma(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Floating-point fused multiply-add.

◆ foldl()

expr foldl ( expr const & f,
expr const & a,
expr const & list )
inline

Definition at line 2666 of file z3++.h.

2666 {
2667 context& ctx = f.ctx();
2668 Z3_ast r = Z3_mk_seq_foldl(ctx, f, a, list);
2669 ctx.check_error();
2670 return expr(ctx, r);
2671 }
Z3_ast Z3_API Z3_mk_seq_foldl(Z3_context c, Z3_ast f, Z3_ast a, Z3_ast s)
Create a fold of the function f over the sequence s with accumulator a.

◆ foldli()

expr foldli ( expr const & f,
expr const & i,
expr const & a,
expr const & list )
inline

Definition at line 2673 of file z3++.h.

2673 {
2674 context& ctx = f.ctx();
2675 Z3_ast r = Z3_mk_seq_foldli(ctx, f, i, a, list);
2676 ctx.check_error();
2677 return expr(ctx, r);
2678 }
Z3_ast Z3_API Z3_mk_seq_foldli(Z3_context c, Z3_ast f, Z3_ast i, Z3_ast a, Z3_ast s)
Create a fold with index tracking of the function f over the sequence s with accumulator a starting a...

◆ forall() [1/5]

expr forall ( expr const & x,
expr const & b )
inline

Definition at line 2477 of file z3++.h.

2477 {
2478 check_context(x, b);
2479 Z3_app vars[] = {(Z3_app) x};
2480 Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2481 }
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables.

◆ forall() [2/5]

expr forall ( expr const & x1,
expr const & x2,
expr const & b )
inline

Definition at line 2482 of file z3++.h.

2482 {
2483 check_context(x1, b); check_context(x2, b);
2484 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2485 Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2486 }

◆ forall() [3/5]

expr forall ( expr const & x1,
expr const & x2,
expr const & x3,
expr const & b )
inline

Definition at line 2487 of file z3++.h.

2487 {
2488 check_context(x1, b); check_context(x2, b); check_context(x3, b);
2489 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2490 Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2491 }

◆ forall() [4/5]

expr forall ( expr const & x1,
expr const & x2,
expr const & x3,
expr const & x4,
expr const & b )
inline

Definition at line 2492 of file z3++.h.

2492 {
2493 check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2494 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2495 Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2496 }

◆ forall() [5/5]

expr forall ( expr_vector const & xs,
expr const & b )
inline

Definition at line 2497 of file z3++.h.

2497 {
2498 array<Z3_app> vars(xs);
2499 Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, vars.size(), vars.ptr(), 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2500 }

◆ fp_eq()

expr fp_eq ( expr const & a,
expr const & b )
inline

Definition at line 2153 of file z3++.h.

2153 {
2154 check_context(a, b);
2155 assert(a.is_fpa());
2156 Z3_ast r = Z3_mk_fpa_eq(a.ctx(), a, b);
2157 a.check_error();
2158 return expr(a.ctx(), r);
2159 }
Z3_ast Z3_API Z3_mk_fpa_eq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point equality.

◆ fpa_fp()

expr fpa_fp ( expr const & sgn,
expr const & exp,
expr const & sig )
inline

Definition at line 2170 of file z3++.h.

2170 {
2171 check_context(sgn, exp); check_context(exp, sig);
2172 assert(sgn.is_bv() && exp.is_bv() && sig.is_bv());
2173 Z3_ast r = Z3_mk_fpa_fp(sgn.ctx(), sgn, exp, sig);
2174 sgn.check_error();
2175 return expr(sgn.ctx(), r);
2176 }

◆ fpa_to_fpa()

expr fpa_to_fpa ( expr const & t,
sort s )
inline

Definition at line 2206 of file z3++.h.

2206 {
2207 assert(t.is_fpa());
2208 Z3_ast r = Z3_mk_fpa_to_fp_float(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2209 t.check_error();
2210 return expr(t.ctx(), r);
2211 }
Z3_ast Z3_API Z3_mk_fpa_to_fp_float(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a FloatingPoint term into another term of different FloatingPoint sort.

◆ fpa_to_sbv()

expr fpa_to_sbv ( expr const & t,
unsigned sz )
inline

Definition at line 2178 of file z3++.h.

2178 {
2179 assert(t.is_fpa());
2180 Z3_ast r = Z3_mk_fpa_to_sbv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
2181 t.check_error();
2182 return expr(t.ctx(), r);
2183 }
Z3_ast Z3_API Z3_mk_fpa_to_sbv(Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz)
Conversion of a floating-point term into a signed bit-vector.

◆ fpa_to_ubv()

expr fpa_to_ubv ( expr const & t,
unsigned sz )
inline

Definition at line 2185 of file z3++.h.

2185 {
2186 assert(t.is_fpa());
2187 Z3_ast r = Z3_mk_fpa_to_ubv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
2188 t.check_error();
2189 return expr(t.ctx(), r);
2190 }
Z3_ast Z3_API Z3_mk_fpa_to_ubv(Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz)
Conversion of a floating-point term into an unsigned bit-vector.

◆ full_set()

expr full_set ( sort const & s)
inline

Definition at line 4268 of file z3++.h.

4268 {
4270 }
Z3_ast Z3_API Z3_mk_full_set(Z3_context c, Z3_sort domain)
Create the full set.

◆ function() [1/9]

func_decl function ( char const * name,
sort const & d1,
sort const & d2,
sort const & d3,
sort const & d4,
sort const & d5,
sort const & range )
inline

Definition at line 4170 of file z3++.h.

4170 {
4171 return range.ctx().function(name, d1, d2, d3, d4, d5, range);
4172 }
expr range(expr const &lo, expr const &hi)
Definition z3++.h:4436

◆ function() [2/9]

func_decl function ( char const * name,
sort const & d1,
sort const & d2,
sort const & d3,
sort const & d4,
sort const & range )
inline

Definition at line 4167 of file z3++.h.

4167 {
4168 return range.ctx().function(name, d1, d2, d3, d4, range);
4169 }

◆ function() [3/9]

func_decl function ( char const * name,
sort const & d1,
sort const & d2,
sort const & d3,
sort const & range )
inline

Definition at line 4164 of file z3++.h.

4164 {
4165 return range.ctx().function(name, d1, d2, d3, range);
4166 }

◆ function() [4/9]

func_decl function ( char const * name,
sort const & d1,
sort const & d2,
sort const & range )
inline

Definition at line 4161 of file z3++.h.

4161 {
4162 return range.ctx().function(name, d1, d2, range);
4163 }

◆ function() [5/9]

func_decl function ( char const * name,
sort const & domain,
sort const & range )
inline

Definition at line 4158 of file z3++.h.

4158 {
4159 return range.ctx().function(name, domain, range);
4160 }

◆ function() [6/9]

func_decl function ( char const * name,
sort_vector const & domain,
sort const & range )
inline

Definition at line 4173 of file z3++.h.

4173 {
4174 return range.ctx().function(name, domain, range);
4175 }

◆ function() [7/9]

func_decl function ( char const * name,
unsigned arity,
sort const * domain,
sort const & range )
inline

Definition at line 4155 of file z3++.h.

4155 {
4156 return range.ctx().function(name, arity, domain, range);
4157 }

◆ function() [8/9]

func_decl function ( std::string const & name,
sort_vector const & domain,
sort const & range )
inline

Definition at line 4176 of file z3++.h.

4176 {
4177 return range.ctx().function(name.c_str(), domain, range);
4178 }

◆ function() [9/9]

func_decl function ( symbol const & name,
unsigned arity,
sort const * domain,
sort const & range )
inline

Definition at line 4152 of file z3++.h.

4152 {
4153 return range.ctx().function(name, arity, domain, range);
4154 }

◆ get_full_version()

std::string get_full_version ( )
inline

Return a string that fully describes the version of Z3 in use.

Definition at line 96 of file z3++.h.

96 {
97 return std::string(Z3_get_full_version());
98 }
Z3_string Z3_API Z3_get_full_version(void)
Return a string that fully describes the version of Z3 in use.

◆ get_version()

void get_version ( unsigned & major,
unsigned & minor,
unsigned & build_number,
unsigned & revision_number )
inline

Return Z3 version number information.

Definition at line 89 of file z3++.h.

89 {
90 Z3_get_version(&major, &minor, &build_number, &revision_number);
91 }
void Z3_API Z3_get_version(unsigned *major, unsigned *minor, unsigned *build_number, unsigned *revision_number)
Return Z3 version number information.

◆ implies() [1/3]

expr implies ( bool a,
expr const & b )
inline

Definition at line 1765 of file z3++.h.

1765{ return implies(b.ctx().bool_val(a), b); }
expr implies(expr const &a, expr const &b)
Definition z3++.h:1760

◆ implies() [2/3]

expr implies ( expr const & a,
bool b )
inline

Definition at line 1764 of file z3++.h.

1764{ return implies(a, a.ctx().bool_val(b)); }

◆ implies() [3/3]

expr implies ( expr const & a,
expr const & b )
inline

Definition at line 1760 of file z3++.h.

1760 {
1761 assert(a.is_bool() && b.is_bool());
1763 }
Z3_ast Z3_API Z3_mk_implies(Z3_context c, Z3_ast t1, Z3_ast t2)
Create an AST node representing t1 implies t2.
#define _Z3_MK_BIN_(a, b, binop)
Definition z3++.h:1753

Referenced by expr::implies, and expr::implies.

◆ in_re()

expr in_re ( expr const & s,
expr const & re )
inline

Definition at line 4396 of file z3++.h.

4396 {
4397 MK_EXPR2(Z3_mk_seq_in_re, s, re);
4398 }
Z3_ast Z3_API Z3_mk_seq_in_re(Z3_context c, Z3_ast seq, Z3_ast re)
Check if seq is in the language generated by the regular expression re.

◆ indexof()

expr indexof ( expr const & s,
expr const & substr,
expr const & offset )
inline

Definition at line 4381 of file z3++.h.

4381 {
4382 check_context(s, substr); check_context(s, offset);
4383 Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
4384 s.check_error();
4385 return expr(s.ctx(), r);
4386 }
Z3_ast Z3_API Z3_mk_seq_index(Z3_context c, Z3_ast s, Z3_ast substr, Z3_ast offset)
Return index of the first occurrence of substr in s starting from offset offset. If s does not contai...

◆ int2bv()

expr int2bv ( unsigned n,
expr const & a )
inline

Definition at line 2373 of file z3++.h.

2373{ Z3_ast r = Z3_mk_int2bv(a.ctx(), n, a); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_int2bv(Z3_context c, unsigned n, Z3_ast t1)
Create an n bit bit-vector from the integer argument t1.

◆ is_int()

expr is_int ( expr const & e)
inline

Definition at line 1808 of file z3++.h.

1808{ _Z3_MK_UN_(e, Z3_mk_is_int); }
Z3_ast Z3_API Z3_mk_is_int(Z3_context c, Z3_ast t1)
Check if a real number is an integer.
#define _Z3_MK_UN_(a, mkun)
Definition z3++.h:1800

◆ ite()

expr ite ( expr const & c,
expr const & t,
expr const & e )
inline

Create the if-then-else expression ite(c, t, e).

Precondition
c.is_bool()

Definition at line 2225 of file z3++.h.

2225 {
2226 check_context(c, t); check_context(c, e);
2227 assert(c.is_bool());
2228 Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
2229 c.check_error();
2230 return expr(c.ctx(), r);
2231 }

◆ lambda() [1/5]

expr lambda ( expr const & x,
expr const & b )
inline

Definition at line 2525 of file z3++.h.

2525 {
2526 check_context(x, b);
2527 Z3_app vars[] = {(Z3_app) x};
2528 Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
2529 }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.

◆ lambda() [2/5]

expr lambda ( expr const & x1,
expr const & x2,
expr const & b )
inline

Definition at line 2530 of file z3++.h.

2530 {
2531 check_context(x1, b); check_context(x2, b);
2532 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2533 Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
2534 }

◆ lambda() [3/5]

expr lambda ( expr const & x1,
expr const & x2,
expr const & x3,
expr const & b )
inline

Definition at line 2535 of file z3++.h.

2535 {
2536 check_context(x1, b); check_context(x2, b); check_context(x3, b);
2537 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2538 Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
2539 }

◆ lambda() [4/5]

expr lambda ( expr const & x1,
expr const & x2,
expr const & x3,
expr const & x4,
expr const & b )
inline

Definition at line 2540 of file z3++.h.

2540 {
2541 check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2542 Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2543 Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
2544 }

◆ lambda() [5/5]

expr lambda ( expr_vector const & xs,
expr const & b )
inline

Definition at line 2545 of file z3++.h.

2545 {
2546 array<Z3_app> vars(xs);
2547 Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
2548 }

◆ last_indexof()

expr last_indexof ( expr const & s,
expr const & substr )
inline

Definition at line 4387 of file z3++.h.

4387 {
4388 check_context(s, substr);
4389 Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
4390 s.check_error();
4391 return expr(s.ctx(), r);
4392 }
Z3_ast Z3_API Z3_mk_seq_last_index(Z3_context c, Z3_ast s, Z3_ast substr)
Return index of the last occurrence of substr in s. If s does not contain substr, then the value is -...

◆ linear_order()

func_decl linear_order ( sort const & a,
unsigned index )
inline

Definition at line 2409 of file z3++.h.

2409 {
2410 return to_func_decl(a.ctx(), Z3_mk_linear_order(a.ctx(), a, index));
2411 }
Z3_func_decl Z3_API Z3_mk_linear_order(Z3_context c, Z3_sort a, unsigned id)
create a linear ordering relation over signature a. The relation is identified by the index id.
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition z3++.h:2252

◆ lshr() [1/3]

expr lshr ( expr const & a,
expr const & b )
inline

logic shift right operator for bitvectors

Definition at line 2353 of file z3++.h.

2353{ return to_expr(a.ctx(), Z3_mk_bvlshr(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvlshr(Z3_context c, Z3_ast t1, Z3_ast t2)
Logical shift right.

Referenced by lshr(), and lshr().

◆ lshr() [2/3]

expr lshr ( expr const & a,
int b )
inline

Definition at line 2354 of file z3++.h.

2354{ return lshr(a, a.ctx().num_val(b, a.get_sort())); }
expr lshr(expr const &a, expr const &b)
logic shift right operator for bitvectors
Definition z3++.h:2353

◆ lshr() [3/3]

expr lshr ( int a,
expr const & b )
inline

Definition at line 2355 of file z3++.h.

2355{ return lshr(b.ctx().num_val(a, b.get_sort()), b); }

◆ map()

expr map ( expr const & f,
expr const & list )
inline

Definition at line 2652 of file z3++.h.

2652 {
2653 context& ctx = f.ctx();
2654 Z3_ast r = Z3_mk_seq_map(ctx, f, list);
2655 ctx.check_error();
2656 return expr(ctx, r);
2657 }
Z3_ast Z3_API Z3_mk_seq_map(Z3_context c, Z3_ast f, Z3_ast s)
Create a map of the function f over the sequence s.

◆ mapi()

expr mapi ( expr const & f,
expr const & i,
expr const & list )
inline

Definition at line 2659 of file z3++.h.

2659 {
2660 context& ctx = f.ctx();
2661 Z3_ast r = Z3_mk_seq_mapi(ctx, f, i, list);
2662 ctx.check_error();
2663 return expr(ctx, r);
2664 }
Z3_ast Z3_API Z3_mk_seq_mapi(Z3_context c, Z3_ast f, Z3_ast i, Z3_ast s)
Create a map of the function f over the sequence s starting at index i.

◆ max()

expr max ( expr const & a,
expr const & b )
inline

Definition at line 2098 of file z3++.h.

2098 {
2099 check_context(a, b);
2100 Z3_ast r;
2101 if (a.is_arith()) {
2102 r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
2103 }
2104 else if (a.is_bv()) {
2105 r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
2106 }
2107 else {
2108 assert(a.is_fpa());
2109 r = Z3_mk_fpa_max(a.ctx(), a, b);
2110 }
2111 a.check_error();
2112 return expr(a.ctx(), r);
2113 }
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
Z3_ast Z3_API Z3_mk_fpa_max(Z3_context c, Z3_ast t1, Z3_ast t2)
Maximum of floating-point numbers.
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.

Referenced by tactic::repeat.

◆ min()

expr min ( expr const & a,
expr const & b )
inline

Definition at line 2082 of file z3++.h.

2082 {
2083 check_context(a, b);
2084 Z3_ast r;
2085 if (a.is_arith()) {
2086 r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
2087 }
2088 else if (a.is_bv()) {
2089 r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
2090 }
2091 else {
2092 assert(a.is_fpa());
2093 r = Z3_mk_fpa_min(a.ctx(), a, b);
2094 }
2095 a.check_error();
2096 return expr(a.ctx(), r);
2097 }
Z3_ast Z3_API Z3_mk_fpa_min(Z3_context c, Z3_ast t1, Z3_ast t2)
Minimum of floating-point numbers.

◆ mk_and()

expr mk_and ( expr_vector const & args)
inline

Definition at line 2686 of file z3++.h.

2686 {
2687 array<Z3_ast> _args(args);
2688 Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2689 args.check_error();
2690 return expr(args.ctx(), r);
2691 }
Z3_ast Z3_API Z3_mk_and(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] and ... and args[num_args-1].

◆ mk_or()

expr mk_or ( expr_vector const & args)
inline

Definition at line 2680 of file z3++.h.

2680 {
2681 array<Z3_ast> _args(args);
2682 Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2683 args.check_error();
2684 return expr(args.ctx(), r);
2685 }
Z3_ast Z3_API Z3_mk_or(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] or ... or args[num_args-1].

◆ mk_xor()

expr mk_xor ( expr_vector const & args)
inline

Definition at line 2692 of file z3++.h.

2692 {
2693 if (args.empty())
2694 return args.ctx().bool_val(false);
2695 expr r = args[0u];
2696 for (unsigned i = 1; i < args.size(); ++i)
2697 r = r ^ args[i];
2698 return r;
2699 }

◆ mod() [1/3]

expr mod ( expr const & a,
expr const & b )
inline

Definition at line 1772 of file z3++.h.

1772 {
1773 if (a.is_bv()) {
1774 _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1775 }
1776 else {
1777 _Z3_MK_BIN_(a, b, Z3_mk_mod);
1778 }
1779 }
Z3_ast Z3_API Z3_mk_mod(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 mod arg2.
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows divisor).

Referenced by expr::mod, expr::mod, operator%(), operator%(), and operator%().

◆ mod() [2/3]

expr mod ( expr const & a,
int b )
inline

Definition at line 1780 of file z3++.h.

1780{ return mod(a, a.ctx().num_val(b, a.get_sort())); }
expr mod(expr const &a, expr const &b)
Definition z3++.h:1772

◆ mod() [3/3]

expr mod ( int a,
expr const & b )
inline

Definition at line 1781 of file z3++.h.

1781{ return mod(b.ctx().num_val(a, b.get_sort()), b); }

◆ nand()

expr nand ( expr const & a,
expr const & b )
inline

Definition at line 2079 of file z3++.h.

2079{ if (a.is_bool()) return !(a && b); check_context(a, b); Z3_ast r = Z3_mk_bvnand(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvnand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise nand.

◆ nor()

expr nor ( expr const & a,
expr const & b )
inline

Definition at line 2080 of file z3++.h.

2080{ if (a.is_bool()) return !(a || b); check_context(a, b); Z3_ast r = Z3_mk_bvnor(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvnor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise nor.

◆ operator!() [1/2]

expr operator! ( expr const & a)
inline
Precondition
a.is_bool()

Definition at line 1806 of file z3++.h.

1806{ assert(a.is_bool()); _Z3_MK_UN_(a, Z3_mk_not); }
Z3_ast Z3_API Z3_mk_not(Z3_context c, Z3_ast a)
Create an AST node representing not(a).

◆ operator!() [2/2]

probe operator! ( probe const & p)
inline

Definition at line 3497 of file z3++.h.

3497 {
3498 Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
3499 }
Z3_probe Z3_API Z3_probe_not(Z3_context x, Z3_probe p)
Return a probe that evaluates to "true" when p does not evaluate to true.

◆ operator!=() [1/5]

expr operator!= ( double a,
expr const & b )
inline

Definition at line 1858 of file z3++.h.

1858{ assert(b.is_fpa()); return b.ctx().fpa_val(a) != b; }

◆ operator!=() [2/5]

expr operator!= ( expr const & a,
double b )
inline

Definition at line 1857 of file z3++.h.

1857{ assert(a.is_fpa()); return a != a.ctx().fpa_val(b); }

◆ operator!=() [3/5]

expr operator!= ( expr const & a,
expr const & b )
inline

Definition at line 1848 of file z3++.h.

1848 {
1849 check_context(a, b);
1850 Z3_ast args[2] = { a, b };
1851 Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1852 a.check_error();
1853 return expr(a.ctx(), r);
1854 }

◆ operator!=() [4/5]

expr operator!= ( expr const & a,
int b )
inline

Definition at line 1855 of file z3++.h.

1855{ assert(a.is_arith() || a.is_bv() || a.is_fpa()); return a != a.ctx().num_val(b, a.get_sort()); }

◆ operator!=() [5/5]

expr operator!= ( int a,
expr const & b )
inline

Definition at line 1856 of file z3++.h.

1856{ assert(b.is_arith() || b.is_bv() || b.is_fpa()); return b.ctx().num_val(a, b.get_sort()) != b; }

◆ operator%() [1/3]

expr operator% ( expr const & a,
expr const & b )
inline

Definition at line 1783 of file z3++.h.

1783{ return mod(a, b); }

◆ operator%() [2/3]

expr operator% ( expr const & a,
int b )
inline

Definition at line 1784 of file z3++.h.

1784{ return mod(a, b); }

◆ operator%() [3/3]

expr operator% ( int a,
expr const & b )
inline

Definition at line 1785 of file z3++.h.

1785{ return mod(a, b); }

◆ operator&() [1/5]

expr operator& ( expr const & a,
expr const & b )
inline

Definition at line 2067 of file z3++.h.

2067{ if (a.is_bool()) return a && b; check_context(a, b); Z3_ast r = Z3_mk_bvand(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise and.

◆ operator&() [2/5]

expr operator& ( expr const & a,
int b )
inline

Definition at line 2068 of file z3++.h.

2068{ return a & a.ctx().num_val(b, a.get_sort()); }

◆ operator&() [3/5]

expr operator& ( int a,
expr const & b )
inline

Definition at line 2069 of file z3++.h.

2069{ return b.ctx().num_val(a, b.get_sort()) & b; }

◆ operator&() [4/5]

simplifier operator& ( simplifier const & t1,
simplifier const & t2 )
inline

Definition at line 3411 of file z3++.h.

3411 {
3412 check_context(t1, t2);
3413 Z3_simplifier r = Z3_simplifier_and_then(t1.ctx(), t1, t2);
3414 t1.check_error();
3415 return simplifier(t1.ctx(), r);
3416 }
Z3_simplifier Z3_API Z3_simplifier_and_then(Z3_context c, Z3_simplifier t1, Z3_simplifier t2)
Return a simplifier that applies t1 to a given goal and t2 to every subgoal produced by t1.

◆ operator&() [5/5]

tactic operator& ( tactic const & t1,
tactic const & t2 )
inline

Definition at line 3337 of file z3++.h.

3337 {
3338 check_context(t1, t2);
3339 Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
3340 t1.check_error();
3341 return tactic(t1.ctx(), r);
3342 }
Z3_tactic Z3_API Z3_tactic_and_then(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal and t2 to every subgoal produced by t1.

◆ operator&&() [1/4]

expr operator&& ( bool a,
expr const & b )
inline
Precondition
b.is_bool()

Definition at line 1822 of file z3++.h.

1822{ return b.ctx().bool_val(a) && b; }

◆ operator&&() [2/4]

expr operator&& ( expr const & a,
bool b )
inline
Precondition
a.is_bool()

Definition at line 1821 of file z3++.h.

1821{ return a && a.ctx().bool_val(b); }

◆ operator&&() [3/4]

expr operator&& ( expr const & a,
expr const & b )
inline
Precondition
a.is_bool()
b.is_bool()

Definition at line 1812 of file z3++.h.

1812 {
1813 check_context(a, b);
1814 assert(a.is_bool() && b.is_bool());
1815 Z3_ast args[2] = { a, b };
1816 Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1817 a.check_error();
1818 return expr(a.ctx(), r);
1819 }

◆ operator&&() [4/4]

probe operator&& ( probe const & p1,
probe const & p2 )
inline

Definition at line 3491 of file z3++.h.

3491 {
3492 check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3493 }
Z3_probe Z3_API Z3_probe_and(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 and p2 evaluates to true.

◆ operator*() [1/3]

expr operator* ( expr const & a,
expr const & b )
inline

Definition at line 1890 of file z3++.h.

1890 {
1891 check_context(a, b);
1892 Z3_ast r = 0;
1893 if (a.is_arith() && b.is_arith()) {
1894 Z3_ast args[2] = { a, b };
1895 r = Z3_mk_mul(a.ctx(), 2, args);
1896 }
1897 else if (a.is_bv() && b.is_bv()) {
1898 r = Z3_mk_bvmul(a.ctx(), a, b);
1899 }
1900 else if (a.is_fpa() && b.is_fpa()) {
1901 r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1902 }
1903 else {
1904 // operator is not supported by given arguments.
1905 assert(false);
1906 }
1907 a.check_error();
1908 return expr(a.ctx(), r);
1909 }
Z3_ast Z3_API Z3_mk_mul(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] * ... * args[num_args-1].
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement multiplication.
Z3_ast Z3_API Z3_mk_fpa_mul(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point multiplication.

◆ operator*() [2/3]

expr operator* ( expr const & a,
int b )
inline

Definition at line 1910 of file z3++.h.

1910{ return a * a.ctx().num_val(b, a.get_sort()); }

◆ operator*() [3/3]

expr operator* ( int a,
expr const & b )
inline

Definition at line 1911 of file z3++.h.

1911{ return b.ctx().num_val(a, b.get_sort()) * b; }

◆ operator+() [1/3]

expr operator+ ( expr const & a,
expr const & b )
inline

Definition at line 1860 of file z3++.h.

1860 {
1861 check_context(a, b);
1862 Z3_ast r = 0;
1863 if (a.is_arith() && b.is_arith()) {
1864 Z3_ast args[2] = { a, b };
1865 r = Z3_mk_add(a.ctx(), 2, args);
1866 }
1867 else if (a.is_bv() && b.is_bv()) {
1868 r = Z3_mk_bvadd(a.ctx(), a, b);
1869 }
1870 else if (a.is_seq() && b.is_seq()) {
1871 return concat(a, b);
1872 }
1873 else if (a.is_re() && b.is_re()) {
1874 Z3_ast _args[2] = { a, b };
1875 r = Z3_mk_re_union(a.ctx(), 2, _args);
1876 }
1877 else if (a.is_fpa() && b.is_fpa()) {
1878 r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1879 }
1880 else {
1881 // operator is not supported by given arguments.
1882 assert(false);
1883 }
1884 a.check_error();
1885 return expr(a.ctx(), r);
1886 }
Z3_ast Z3_API Z3_mk_re_union(Z3_context c, unsigned n, Z3_ast const args[])
Create the union of the regular languages.
Z3_ast Z3_API Z3_mk_bvadd(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement addition.
Z3_ast Z3_API Z3_mk_fpa_add(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point addition.
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].
expr concat(expr const &a, expr const &b)
Definition z3++.h:2608

◆ operator+() [2/3]

expr operator+ ( expr const & a,
int b )
inline

Definition at line 1887 of file z3++.h.

1887{ return a + a.ctx().num_val(b, a.get_sort()); }

◆ operator+() [3/3]

expr operator+ ( int a,
expr const & b )
inline

Definition at line 1888 of file z3++.h.

1888{ return b.ctx().num_val(a, b.get_sort()) + b; }

◆ operator-() [1/4]

expr operator- ( expr const & a)
inline

Definition at line 1956 of file z3++.h.

1956 {
1957 Z3_ast r = 0;
1958 if (a.is_arith()) {
1959 r = Z3_mk_unary_minus(a.ctx(), a);
1960 }
1961 else if (a.is_bv()) {
1962 r = Z3_mk_bvneg(a.ctx(), a);
1963 }
1964 else if (a.is_fpa()) {
1965 r = Z3_mk_fpa_neg(a.ctx(), a);
1966 }
1967 else {
1968 // operator is not supported by given arguments.
1969 assert(false);
1970 }
1971 a.check_error();
1972 return expr(a.ctx(), r);
1973 }
Z3_ast Z3_API Z3_mk_unary_minus(Z3_context c, Z3_ast arg)
Create an AST node representing - arg.
Z3_ast Z3_API Z3_mk_fpa_neg(Z3_context c, Z3_ast t)
Floating-point negation.
Z3_ast Z3_API Z3_mk_bvneg(Z3_context c, Z3_ast t1)
Standard two's complement unary minus.

◆ operator-() [2/4]

expr operator- ( expr const & a,
expr const & b )
inline

Definition at line 1975 of file z3++.h.

1975 {
1976 check_context(a, b);
1977 Z3_ast r = 0;
1978 if (a.is_arith() && b.is_arith()) {
1979 Z3_ast args[2] = { a, b };
1980 r = Z3_mk_sub(a.ctx(), 2, args);
1981 }
1982 else if (a.is_bv() && b.is_bv()) {
1983 r = Z3_mk_bvsub(a.ctx(), a, b);
1984 }
1985 else if (a.is_fpa() && b.is_fpa()) {
1986 r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1987 }
1988 else {
1989 // operator is not supported by given arguments.
1990 assert(false);
1991 }
1992 a.check_error();
1993 return expr(a.ctx(), r);
1994 }
Z3_ast Z3_API Z3_mk_fpa_sub(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point subtraction.
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement subtraction.
Z3_ast Z3_API Z3_mk_sub(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] - ... - args[num_args - 1].

◆ operator-() [3/4]

expr operator- ( expr const & a,
int b )
inline

Definition at line 1995 of file z3++.h.

1995{ return a - a.ctx().num_val(b, a.get_sort()); }

◆ operator-() [4/4]

expr operator- ( int a,
expr const & b )
inline

Definition at line 1996 of file z3++.h.

1996{ return b.ctx().num_val(a, b.get_sort()) - b; }

◆ operator/() [1/3]

expr operator/ ( expr const & a,
expr const & b )
inline

Definition at line 1934 of file z3++.h.

1934 {
1935 check_context(a, b);
1936 Z3_ast r = 0;
1937 if (a.is_arith() && b.is_arith()) {
1938 r = Z3_mk_div(a.ctx(), a, b);
1939 }
1940 else if (a.is_bv() && b.is_bv()) {
1941 r = Z3_mk_bvsdiv(a.ctx(), a, b);
1942 }
1943 else if (a.is_fpa() && b.is_fpa()) {
1944 r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1945 }
1946 else {
1947 // operator is not supported by given arguments.
1948 assert(false);
1949 }
1950 a.check_error();
1951 return expr(a.ctx(), r);
1952 }
Z3_ast Z3_API Z3_mk_div(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 div arg2.
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed division.
Z3_ast Z3_API Z3_mk_fpa_div(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point division.

◆ operator/() [2/3]

expr operator/ ( expr const & a,
int b )
inline

Definition at line 1953 of file z3++.h.

1953{ return a / a.ctx().num_val(b, a.get_sort()); }

◆ operator/() [3/3]

expr operator/ ( int a,
expr const & b )
inline

Definition at line 1954 of file z3++.h.

1954{ return b.ctx().num_val(a, b.get_sort()) / b; }

◆ operator<() [1/6]

probe operator< ( double p1,
probe const & p2 )
inline

Definition at line 3480 of file z3++.h.

3480{ return probe(p2.ctx(), p1) < p2; }

◆ operator<() [2/6]

expr operator< ( expr const & a,
expr const & b )
inline

Definition at line 2023 of file z3++.h.

2023 {
2024 check_context(a, b);
2025 Z3_ast r = 0;
2026 if (a.is_arith() && b.is_arith()) {
2027 r = Z3_mk_lt(a.ctx(), a, b);
2028 }
2029 else if (a.is_bv() && b.is_bv()) {
2030 r = Z3_mk_bvslt(a.ctx(), a, b);
2031 }
2032 else if (a.is_fpa() && b.is_fpa()) {
2033 r = Z3_mk_fpa_lt(a.ctx(), a, b);
2034 }
2035 else {
2036 // operator is not supported by given arguments.
2037 assert(false);
2038 }
2039 a.check_error();
2040 return expr(a.ctx(), r);
2041 }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than.
Z3_ast Z3_API Z3_mk_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than.
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.

◆ operator<() [3/6]

expr operator< ( expr const & a,
int b )
inline

Definition at line 2042 of file z3++.h.

2042{ return a < a.ctx().num_val(b, a.get_sort()); }

◆ operator<() [4/6]

expr operator< ( int a,
expr const & b )
inline

Definition at line 2043 of file z3++.h.

2043{ return b.ctx().num_val(a, b.get_sort()) < b; }

◆ operator<() [5/6]

probe operator< ( probe const & p1,
double p2 )
inline

Definition at line 3479 of file z3++.h.

3479{ return p1 < probe(p1.ctx(), p2); }

◆ operator<() [6/6]

probe operator< ( probe const & p1,
probe const & p2 )
inline

Definition at line 3476 of file z3++.h.

3476 {
3477 check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3478 }
Z3_probe Z3_API Z3_probe_lt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than the value returned...

◆ operator<<() [1/13]

std::ostream & operator<< ( std::ostream & out,
apply_result const & r )
inline

Definition at line 3295 of file z3++.h.

3295{ out << Z3_apply_result_to_string(r.ctx(), r); return out; }
Z3_string Z3_API Z3_apply_result_to_string(Z3_context c, Z3_apply_result r)
Convert the Z3_apply_result object returned by Z3_tactic_apply into a string.

◆ operator<<() [2/13]

std::ostream & operator<< ( std::ostream & out,
ast const & n )
inline

Definition at line 650 of file z3++.h.

650 {
651 out << Z3_ast_to_string(n.ctx(), n.m_ast); return out;
652 }
Z3_string Z3_API Z3_ast_to_string(Z3_context c, Z3_ast a)
Convert the given AST node into a string.

◆ operator<<() [3/13]

std::ostream & operator<< ( std::ostream & out,
check_result r )
inline

Definition at line 2891 of file z3++.h.

2891 {
2892 if (r == unsat) out << "unsat";
2893 else if (r == sat) out << "sat";
2894 else out << "unknown";
2895 return out;
2896 }

◆ operator<<() [4/13]

std::ostream & operator<< ( std::ostream & out,
exception const & e )
inline

Definition at line 128 of file z3++.h.

128{ out << e.msg(); return out; }

◆ operator<<() [5/13]

std::ostream & operator<< ( std::ostream & out,
fixedpoint const & f )
inline

Definition at line 3679 of file z3++.h.

3679{ return out << Z3_fixedpoint_to_string(f.ctx(), f, 0, 0); }
Z3_string Z3_API Z3_fixedpoint_to_string(Z3_context c, Z3_fixedpoint f, unsigned num_queries, Z3_ast queries[])
Print the current rules and background axioms as a string.

◆ operator<<() [6/13]

std::ostream & operator<< ( std::ostream & out,
goal const & g )
inline

Definition at line 3271 of file z3++.h.

3271{ out << Z3_goal_to_string(g.ctx(), g); return out; }
Z3_string Z3_API Z3_goal_to_string(Z3_context c, Z3_goal g)
Convert a goal into a string.

◆ operator<<() [7/13]

std::ostream & operator<< ( std::ostream & out,
model const & m )
inline

Definition at line 2859 of file z3++.h.

2859{ return out << m.to_string(); }

◆ operator<<() [8/13]

std::ostream & operator<< ( std::ostream & out,
optimize const & s )
inline

Definition at line 3621 of file z3++.h.

3621{ out << Z3_optimize_to_string(s.ctx(), s.m_opt); return out; }
Z3_string Z3_API Z3_optimize_to_string(Z3_context c, Z3_optimize o)
Print the current context as a string.

◆ operator<<() [9/13]

std::ostream & operator<< ( std::ostream & out,
param_descrs const & d )
inline

Definition at line 593 of file z3++.h.

593{ return out << d.to_string(); }

◆ operator<<() [10/13]

std::ostream & operator<< ( std::ostream & out,
params const & p )
inline

Definition at line 617 of file z3++.h.

617 {
618 out << Z3_params_to_string(p.ctx(), p); return out;
619 }
Z3_string Z3_API Z3_params_to_string(Z3_context c, Z3_params p)
Convert a parameter set into a string. This function is mainly used for printing the contents of a pa...

◆ operator<<() [11/13]

std::ostream & operator<< ( std::ostream & out,
solver const & s )
inline

Definition at line 3212 of file z3++.h.

3212{ out << Z3_solver_to_string(s.ctx(), s); return out; }
Z3_string Z3_API Z3_solver_to_string(Z3_context c, Z3_solver s)
Convert a solver into a string.

◆ operator<<() [12/13]

std::ostream & operator<< ( std::ostream & out,
stats const & s )
inline

Definition at line 2888 of file z3++.h.

2888{ out << Z3_stats_to_string(s.ctx(), s); return out; }
Z3_string Z3_API Z3_stats_to_string(Z3_context c, Z3_stats s)
Convert a statistics into a string.

◆ operator<<() [13/13]

std::ostream & operator<< ( std::ostream & out,
symbol const & s )
inline

Definition at line 561 of file z3++.h.

561 {
562 if (s.kind() == Z3_INT_SYMBOL)
563 out << "k!" << s.to_int();
564 else
565 out << s.str();
566 return out;
567 }
@ Z3_INT_SYMBOL
Definition z3_api.h:73

◆ operator<=() [1/6]

probe operator<= ( double p1,
probe const & p2 )
inline

Definition at line 3470 of file z3++.h.

3470{ return probe(p2.ctx(), p1) <= p2; }

◆ operator<=() [2/6]

expr operator<= ( expr const & a,
expr const & b )
inline

Definition at line 1998 of file z3++.h.

1998 {
1999 check_context(a, b);
2000 Z3_ast r = 0;
2001 if (a.is_arith() && b.is_arith()) {
2002 r = Z3_mk_le(a.ctx(), a, b);
2003 }
2004 else if (a.is_bv() && b.is_bv()) {
2005 r = Z3_mk_bvsle(a.ctx(), a, b);
2006 }
2007 else if (a.is_fpa() && b.is_fpa()) {
2008 r = Z3_mk_fpa_leq(a.ctx(), a, b);
2009 }
2010 else {
2011 // operator is not supported by given arguments.
2012 assert(false);
2013 }
2014 a.check_error();
2015 return expr(a.ctx(), r);
2016 }
Z3_ast Z3_API Z3_mk_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than or equal to.
Z3_ast Z3_API Z3_mk_le(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than or equal to.
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.

◆ operator<=() [3/6]

expr operator<= ( expr const & a,
int b )
inline

Definition at line 2017 of file z3++.h.

2017{ return a <= a.ctx().num_val(b, a.get_sort()); }

◆ operator<=() [4/6]

expr operator<= ( int a,
expr const & b )
inline

Definition at line 2018 of file z3++.h.

2018{ return b.ctx().num_val(a, b.get_sort()) <= b; }

◆ operator<=() [5/6]

probe operator<= ( probe const & p1,
double p2 )
inline

Definition at line 3469 of file z3++.h.

3469{ return p1 <= probe(p1.ctx(), p2); }

◆ operator<=() [6/6]

probe operator<= ( probe const & p1,
probe const & p2 )
inline

Definition at line 3466 of file z3++.h.

3466 {
3467 check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3468 }
Z3_probe Z3_API Z3_probe_le(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than or equal to the va...

◆ operator==() [1/8]

expr operator== ( double a,
expr const & b )
inline

Definition at line 1846 of file z3++.h.

1846{ assert(b.is_fpa()); return b.ctx().fpa_val(a) == b; }

◆ operator==() [2/8]

probe operator== ( double p1,
probe const & p2 )
inline

Definition at line 3490 of file z3++.h.

3490{ return probe(p2.ctx(), p1) == p2; }

◆ operator==() [3/8]

expr operator== ( expr const & a,
double b )
inline

Definition at line 1845 of file z3++.h.

1845{ assert(a.is_fpa()); return a == a.ctx().fpa_val(b); }

◆ operator==() [4/8]

expr operator== ( expr const & a,
expr const & b )
inline

Definition at line 1837 of file z3++.h.

1837 {
1838 check_context(a, b);
1839 Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1840 a.check_error();
1841 return expr(a.ctx(), r);
1842 }
Z3_ast Z3_API Z3_mk_eq(Z3_context c, Z3_ast l, Z3_ast r)
Create an AST node representing l = r.

◆ operator==() [5/8]

expr operator== ( expr const & a,
int b )
inline

Definition at line 1843 of file z3++.h.

1843{ assert(a.is_arith() || a.is_bv() || a.is_fpa()); return a == a.ctx().num_val(b, a.get_sort()); }

◆ operator==() [6/8]

expr operator== ( int a,
expr const & b )
inline

Definition at line 1844 of file z3++.h.

1844{ assert(b.is_arith() || b.is_bv() || b.is_fpa()); return b.ctx().num_val(a, b.get_sort()) == b; }

◆ operator==() [7/8]

probe operator== ( probe const & p1,
double p2 )
inline

Definition at line 3489 of file z3++.h.

3489{ return p1 == probe(p1.ctx(), p2); }

◆ operator==() [8/8]

probe operator== ( probe const & p1,
probe const & p2 )
inline

Definition at line 3486 of file z3++.h.

3486 {
3487 check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3488 }
Z3_probe Z3_API Z3_probe_eq(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is equal to the value returned ...

◆ operator>() [1/6]

probe operator> ( double p1,
probe const & p2 )
inline

Definition at line 3485 of file z3++.h.

3485{ return probe(p2.ctx(), p1) > p2; }

◆ operator>() [2/6]

expr operator> ( expr const & a,
expr const & b )
inline

Definition at line 2045 of file z3++.h.

2045 {
2046 check_context(a, b);
2047 Z3_ast r = 0;
2048 if (a.is_arith() && b.is_arith()) {
2049 r = Z3_mk_gt(a.ctx(), a, b);
2050 }
2051 else if (a.is_bv() && b.is_bv()) {
2052 r = Z3_mk_bvsgt(a.ctx(), a, b);
2053 }
2054 else if (a.is_fpa() && b.is_fpa()) {
2055 r = Z3_mk_fpa_gt(a.ctx(), a, b);
2056 }
2057 else {
2058 // operator is not supported by given arguments.
2059 assert(false);
2060 }
2061 a.check_error();
2062 return expr(a.ctx(), r);
2063 }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than.
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.
Z3_ast Z3_API Z3_mk_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than.

◆ operator>() [3/6]

expr operator> ( expr const & a,
int b )
inline

Definition at line 2064 of file z3++.h.

2064{ return a > a.ctx().num_val(b, a.get_sort()); }

◆ operator>() [4/6]

expr operator> ( int a,
expr const & b )
inline

Definition at line 2065 of file z3++.h.

2065{ return b.ctx().num_val(a, b.get_sort()) > b; }

◆ operator>() [5/6]

probe operator> ( probe const & p1,
double p2 )
inline

Definition at line 3484 of file z3++.h.

3484{ return p1 > probe(p1.ctx(), p2); }

◆ operator>() [6/6]

probe operator> ( probe const & p1,
probe const & p2 )
inline

Definition at line 3481 of file z3++.h.

3481 {
3482 check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3483 }
Z3_probe Z3_API Z3_probe_gt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is greater than the value retur...

◆ operator>=() [1/6]

probe operator>= ( double p1,
probe const & p2 )
inline

Definition at line 3475 of file z3++.h.

3475{ return probe(p2.ctx(), p1) >= p2; }

◆ operator>=() [2/6]

expr operator>= ( expr const & a,
expr const & b )
inline

Definition at line 1914 of file z3++.h.

1914 {
1915 check_context(a, b);
1916 Z3_ast r = 0;
1917 if (a.is_arith() && b.is_arith()) {
1918 r = Z3_mk_ge(a.ctx(), a, b);
1919 }
1920 else if (a.is_bv() && b.is_bv()) {
1921 r = Z3_mk_bvsge(a.ctx(), a, b);
1922 }
1923 else if (a.is_fpa() && b.is_fpa()) {
1924 r = Z3_mk_fpa_geq(a.ctx(), a, b);
1925 }
1926 else {
1927 // operator is not supported by given arguments.
1928 assert(false);
1929 }
1930 a.check_error();
1931 return expr(a.ctx(), r);
1932 }
Z3_ast Z3_API Z3_mk_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than or equal to.
Z3_ast Z3_API Z3_mk_fpa_geq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than or equal.

◆ operator>=() [3/6]

expr operator>= ( expr const & a,
int b )
inline

Definition at line 2020 of file z3++.h.

2020{ return a >= a.ctx().num_val(b, a.get_sort()); }

◆ operator>=() [4/6]

expr operator>= ( int a,
expr const & b )
inline

Definition at line 2021 of file z3++.h.

2021{ return b.ctx().num_val(a, b.get_sort()) >= b; }

◆ operator>=() [5/6]

probe operator>= ( probe const & p1,
double p2 )
inline

Definition at line 3474 of file z3++.h.

3474{ return p1 >= probe(p1.ctx(), p2); }

◆ operator>=() [6/6]

probe operator>= ( probe const & p1,
probe const & p2 )
inline

Definition at line 3471 of file z3++.h.

3471 {
3472 check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3473 }
Z3_probe Z3_API Z3_probe_ge(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is greater than or equal to the...

◆ operator^() [1/3]

expr operator^ ( expr const & a,
expr const & b )
inline

Definition at line 2071 of file z3++.h.

2071{ check_context(a, b); Z3_ast r = a.is_bool() ? Z3_mk_xor(a.ctx(), a, b) : Z3_mk_bvxor(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvxor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise exclusive-or.
Z3_ast Z3_API Z3_mk_xor(Z3_context c, Z3_ast t1, Z3_ast t2)
Create an AST node representing t1 xor t2.

◆ operator^() [2/3]

expr operator^ ( expr const & a,
int b )
inline

Definition at line 2072 of file z3++.h.

2072{ return a ^ a.ctx().num_val(b, a.get_sort()); }

◆ operator^() [3/3]

expr operator^ ( int a,
expr const & b )
inline

Definition at line 2073 of file z3++.h.

2073{ return b.ctx().num_val(a, b.get_sort()) ^ b; }

◆ operator|() [1/4]

expr operator| ( expr const & a,
expr const & b )
inline

Definition at line 2075 of file z3++.h.

2075{ if (a.is_bool()) return a || b; check_context(a, b); Z3_ast r = Z3_mk_bvor(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise or.

◆ operator|() [2/4]

expr operator| ( expr const & a,
int b )
inline

Definition at line 2076 of file z3++.h.

2076{ return a | a.ctx().num_val(b, a.get_sort()); }

◆ operator|() [3/4]

expr operator| ( int a,
expr const & b )
inline

Definition at line 2077 of file z3++.h.

2077{ return b.ctx().num_val(a, b.get_sort()) | b; }

◆ operator|() [4/4]

tactic operator| ( tactic const & t1,
tactic const & t2 )
inline

Definition at line 3344 of file z3++.h.

3344 {
3345 check_context(t1, t2);
3346 Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
3347 t1.check_error();
3348 return tactic(t1.ctx(), r);
3349 }
Z3_tactic Z3_API Z3_tactic_or_else(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that first applies t1 to a given goal, if it fails then returns the result of t2 appl...

◆ operator||() [1/4]

expr operator|| ( bool a,
expr const & b )
inline
Precondition
b.is_bool()

Definition at line 1835 of file z3++.h.

1835{ return b.ctx().bool_val(a) || b; }

◆ operator||() [2/4]

expr operator|| ( expr const & a,
bool b )
inline
Precondition
a.is_bool()

Definition at line 1833 of file z3++.h.

1833{ return a || a.ctx().bool_val(b); }

◆ operator||() [3/4]

expr operator|| ( expr const & a,
expr const & b )
inline
Precondition
a.is_bool()
b.is_bool()

Definition at line 1824 of file z3++.h.

1824 {
1825 check_context(a, b);
1826 assert(a.is_bool() && b.is_bool());
1827 Z3_ast args[2] = { a, b };
1828 Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1829 a.check_error();
1830 return expr(a.ctx(), r);
1831 }

◆ operator||() [4/4]

probe operator|| ( probe const & p1,
probe const & p2 )
inline

Definition at line 3494 of file z3++.h.

3494 {
3495 check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3496 }
Z3_probe Z3_API Z3_probe_or(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 or p2 evaluates to true.

◆ operator~()

expr operator~ ( expr const & a)
inline

Definition at line 2160 of file z3++.h.

2160{ Z3_ast r = Z3_mk_bvnot(a.ctx(), a); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvnot(Z3_context c, Z3_ast t1)
Bitwise negation.

◆ option()

expr option ( expr const & re)
inline

Definition at line 4402 of file z3++.h.

4402 {
4404 }
Z3_ast Z3_API Z3_mk_re_option(Z3_context c, Z3_ast re)
Create the regular language [re].

◆ par_and_then()

tactic par_and_then ( tactic const & t1,
tactic const & t2 )
inline

Definition at line 3376 of file z3++.h.

3376 {
3377 check_context(t1, t2);
3378 Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
3379 t1.check_error();
3380 return tactic(t1.ctx(), r);
3381 }
Z3_tactic Z3_API Z3_tactic_par_and_then(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal and then t2 to every subgoal produced by t1....

◆ par_or()

tactic par_or ( unsigned n,
tactic const * tactics )
inline

Definition at line 3367 of file z3++.h.

3367 {
3368 if (n == 0) {
3369 Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
3370 }
3371 array<Z3_tactic> buffer(n);
3372 for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
3373 return tactic(tactics[0u].ctx(), Z3_tactic_par_or(tactics[0u].ctx(), n, buffer.ptr()));
3374 }
Exception used to sign API usage errors.
Definition z3++.h:119
Z3_tactic Z3_API Z3_tactic_par_or(Z3_context c, unsigned num, Z3_tactic const ts[])
Return a tactic that applies the given tactics in parallel.
#define Z3_THROW(x)
Definition z3++.h:134

◆ partial_order()

func_decl partial_order ( sort const & a,
unsigned index )
inline

Definition at line 2412 of file z3++.h.

2412 {
2413 return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
2414 }
Z3_func_decl Z3_API Z3_mk_partial_order(Z3_context c, Z3_sort a, unsigned id)
create a partial ordering relation over signature a and index id.

◆ pbeq()

expr pbeq ( expr_vector const & es,
int const * coeffs,
int bound )
inline

Definition at line 2566 of file z3++.h.

2566 {
2567 assert(es.size() > 0);
2568 context& ctx = es[0u].ctx();
2569 array<Z3_ast> _es(es);
2570 Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2571 ctx.check_error();
2572 return expr(ctx, r);
2573 }
Z3_ast Z3_API Z3_mk_pbeq(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ pbge()

expr pbge ( expr_vector const & es,
int const * coeffs,
int bound )
inline

Definition at line 2558 of file z3++.h.

2558 {
2559 assert(es.size() > 0);
2560 context& ctx = es[0u].ctx();
2561 array<Z3_ast> _es(es);
2562 Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2563 ctx.check_error();
2564 return expr(ctx, r);
2565 }
Z3_ast Z3_API Z3_mk_pbge(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ pble()

expr pble ( expr_vector const & es,
int const * coeffs,
int bound )
inline

Definition at line 2550 of file z3++.h.

2550 {
2551 assert(es.size() > 0);
2552 context& ctx = es[0u].ctx();
2553 array<Z3_ast> _es(es);
2554 Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2555 ctx.check_error();
2556 return expr(ctx, r);
2557 }
Z3_ast Z3_API Z3_mk_pble(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ piecewise_linear_order()

func_decl piecewise_linear_order ( sort const & a,
unsigned index )
inline

Definition at line 2415 of file z3++.h.

2415 {
2416 return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
2417 }
Z3_func_decl Z3_API Z3_mk_piecewise_linear_order(Z3_context c, Z3_sort a, unsigned id)
create a piecewise linear ordering relation over signature a and index id.

◆ plus()

expr plus ( expr const & re)
inline

Definition at line 4399 of file z3++.h.

4399 {
4401 }
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.

◆ polynomial_subresultants()

expr_vector polynomial_subresultants ( expr const & p,
expr const & q,
expr const & x )
inline

Return the nonzero subresultants of p and q with respect to the "variable" x.

Precondition
p, q and x are Z3 expressions where p and q are arithmetic terms. Note that, any subterm that cannot be viewed as a polynomial is assumed to be a variable.

Definition at line 2428 of file z3++.h.

2428 {
2429 check_context(p, q); check_context(p, x);
2430 Z3_ast_vector r = Z3_polynomial_subresultants(p.ctx(), p, q, x);
2431 p.check_error();
2432 return expr_vector(p.ctx(), r);
2433 }
Z3_ast_vector Z3_API Z3_polynomial_subresultants(Z3_context c, Z3_ast p, Z3_ast q, Z3_ast x)
Return the nonzero subresultants of p and q with respect to the "variable" x.
ast_vector_tpl< expr > expr_vector
Definition z3++.h:77

◆ prefixof()

expr prefixof ( expr const & a,
expr const & b )
inline

Definition at line 4375 of file z3++.h.

4375 {
4376 check_context(a, b);
4377 Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
4378 a.check_error();
4379 return expr(a.ctx(), r);
4380 }
Z3_ast Z3_API Z3_mk_seq_prefix(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if prefix is a prefix of s.

◆ pw() [1/3]

expr pw ( expr const & a,
expr const & b )
inline

Definition at line 1768 of file z3++.h.

1768{ _Z3_MK_BIN_(a, b, Z3_mk_power); }
Z3_ast Z3_API Z3_mk_power(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 ^ arg2.

Referenced by expr::pw, and expr::pw.

◆ pw() [2/3]

expr pw ( expr const & a,
int b )
inline

Definition at line 1769 of file z3++.h.

1769{ return pw(a, a.ctx().num_val(b, a.get_sort())); }
expr pw(expr const &a, expr const &b)
Definition z3++.h:1768

◆ pw() [3/3]

expr pw ( int a,
expr const & b )
inline

Definition at line 1770 of file z3++.h.

1770{ return pw(b.ctx().num_val(a, b.get_sort()), b); }

◆ range()

expr range ( expr const & lo,
expr const & hi )
inline

Definition at line 4436 of file z3++.h.

4436 {
4437 check_context(lo, hi);
4438 Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
4439 lo.check_error();
4440 return expr(lo.ctx(), r);
4441 }
Z3_ast Z3_API Z3_mk_re_range(Z3_context c, Z3_ast lo, Z3_ast hi)
Create the range regular expression over two sequences of length 1.

Referenced by context::fpa_sort(), context::function(), context::function(), context::function(), context::function(), context::function(), context::function(), context::function(), context::function(), context::function(), function(), function(), function(), function(), function(), function(), function(), function(), function(), context::recfun(), context::recfun(), context::recfun(), context::recfun(), context::recfun(), context::recfun(), recfun(), recfun(), recfun(), recfun(), and context::user_propagate_function().

◆ rcf_e()

rcf_num rcf_e ( context & c)
inline

Create an RCF numeral representing e (Euler's constant).

Definition at line 5089 of file z3++.h.

5089 {
5090 return rcf_num(c, Z3_rcf_mk_e(c));
5091 }
Wrapper for Z3 Real Closed Field (RCF) numerals.
Definition z3++.h:4922
Z3_rcf_num Z3_API Z3_rcf_mk_e(Z3_context c)
Return e (Euler's constant).

◆ rcf_infinitesimal()

rcf_num rcf_infinitesimal ( context & c)
inline

Create an RCF numeral representing an infinitesimal.

Definition at line 5096 of file z3++.h.

5096 {
5097 return rcf_num(c, Z3_rcf_mk_infinitesimal(c));
5098 }
Z3_rcf_num Z3_API Z3_rcf_mk_infinitesimal(Z3_context c)
Return a new infinitesimal that is smaller than all elements in the Z3 field.

◆ rcf_pi()

rcf_num rcf_pi ( context & c)
inline

Create an RCF numeral representing pi.

Definition at line 5082 of file z3++.h.

5082 {
5083 return rcf_num(c, Z3_rcf_mk_pi(c));
5084 }
Z3_rcf_num Z3_API Z3_rcf_mk_pi(Z3_context c)
Return Pi.

◆ rcf_roots()

std::vector< rcf_num > rcf_roots ( context & c,
std::vector< rcf_num > const & coeffs )
inline

Find roots of a polynomial with given coefficients.

The polynomial is a[n-1]*x^(n-1) + ... + a[1]*x + a[0]. Returns a vector of RCF numerals representing the roots.

Definition at line 5106 of file z3++.h.

5106 {
5107 if (coeffs.empty()) {
5108 Z3_THROW(exception("polynomial coefficients cannot be empty"));
5109 }
5110
5111 unsigned n = static_cast<unsigned>(coeffs.size());
5112 std::vector<Z3_rcf_num> a(n);
5113 std::vector<Z3_rcf_num> roots(n);
5114
5115 for (unsigned i = 0; i < n; ++i) {
5116 a[i] = coeffs[i];
5117 }
5118
5119 unsigned num_roots = Z3_rcf_mk_roots(c, n, a.data(), roots.data());
5120
5121 std::vector<rcf_num> result;
5122 result.reserve(num_roots);
5123 for (unsigned i = 0; i < num_roots; ++i) {
5124 result.push_back(rcf_num(c, roots[i]));
5125 }
5126
5127 return result;
5128 }
unsigned Z3_API Z3_rcf_mk_roots(Z3_context c, unsigned n, Z3_rcf_num const a[], Z3_rcf_num roots[])
Store in roots the roots of the polynomial a[n-1]*x^{n-1} + ... + a[0]. The output vector roots must ...

◆ re_complement()

expr re_complement ( expr const & a)
inline

Definition at line 4433 of file z3++.h.

4433 {
4435 }
Z3_ast Z3_API Z3_mk_re_complement(Z3_context c, Z3_ast re)
Create the complement of the regular language re.

◆ re_diff()

expr re_diff ( expr const & a,
expr const & b )
inline

Definition at line 4426 of file z3++.h.

4426 {
4427 check_context(a, b);
4428 context& ctx = a.ctx();
4429 Z3_ast r = Z3_mk_re_diff(ctx, a, b);
4430 ctx.check_error();
4431 return expr(ctx, r);
4432 }
Z3_ast Z3_API Z3_mk_re_diff(Z3_context c, Z3_ast re1, Z3_ast re2)
Create the difference of regular expressions.

◆ re_empty()

expr re_empty ( sort const & s)
inline

Definition at line 4408 of file z3++.h.

4408 {
4409 Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
4410 s.check_error();
4411 return expr(s.ctx(), r);
4412 }
Z3_ast Z3_API Z3_mk_re_empty(Z3_context c, Z3_sort re)
Create an empty regular expression of sort re.

◆ re_full()

expr re_full ( sort const & s)
inline

Definition at line 4413 of file z3++.h.

4413 {
4414 Z3_ast r = Z3_mk_re_full(s.ctx(), s);
4415 s.check_error();
4416 return expr(s.ctx(), r);
4417 }
Z3_ast Z3_API Z3_mk_re_full(Z3_context c, Z3_sort re)
Create an universal regular expression of sort re.

◆ re_intersect()

expr re_intersect ( expr_vector const & args)
inline

Definition at line 4418 of file z3++.h.

4418 {
4419 assert(args.size() > 0);
4420 context& ctx = args[0u].ctx();
4421 array<Z3_ast> _args(args);
4422 Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
4423 ctx.check_error();
4424 return expr(ctx, r);
4425 }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.

◆ recfun() [1/4]

func_decl recfun ( char const * name,
sort const & d1,
sort const & d2,
sort const & range )
inline

Definition at line 4189 of file z3++.h.

4189 {
4190 return range.ctx().recfun(name, d1, d2, range);
4191 }

◆ recfun() [2/4]

func_decl recfun ( char const * name,
sort const & d1,
sort const & range )
inline

Definition at line 4186 of file z3++.h.

4186 {
4187 return range.ctx().recfun(name, d1, range);
4188 }

◆ recfun() [3/4]

func_decl recfun ( char const * name,
unsigned arity,
sort const * domain,
sort const & range )
inline

Definition at line 4183 of file z3++.h.

4183 {
4184 return range.ctx().recfun(name, arity, domain, range);
4185 }

◆ recfun() [4/4]

func_decl recfun ( symbol const & name,
unsigned arity,
sort const * domain,
sort const & range )
inline

Definition at line 4180 of file z3++.h.

4180 {
4181 return range.ctx().recfun(name, arity, domain, range);
4182 }

◆ rem() [1/3]

expr rem ( expr const & a,
expr const & b )
inline

Definition at line 1788 of file z3++.h.

1788 {
1789 if (a.is_fpa() && b.is_fpa()) {
1791 } else {
1792 _Z3_MK_BIN_(a, b, Z3_mk_rem);
1793 }
1794 }
Z3_ast Z3_API Z3_mk_fpa_rem(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point remainder.
Z3_ast Z3_API Z3_mk_rem(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 rem arg2.

Referenced by expr::rem, and expr::rem.

◆ rem() [2/3]

expr rem ( expr const & a,
int b )
inline

Definition at line 1795 of file z3++.h.

1795{ return rem(a, a.ctx().num_val(b, a.get_sort())); }
expr rem(expr const &a, expr const &b)
Definition z3++.h:1788

◆ rem() [3/3]

expr rem ( int a,
expr const & b )
inline

Definition at line 1796 of file z3++.h.

1796{ return rem(b.ctx().num_val(a, b.get_sort()), b); }

◆ repeat()

tactic repeat ( tactic const & t,
unsigned max = UINT_MAX )
inline

Definition at line 3351 of file z3++.h.

3351 {
3352 Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
3353 t.check_error();
3354 return tactic(t.ctx(), r);
3355 }
Z3_tactic Z3_API Z3_tactic_repeat(Z3_context c, Z3_tactic t, unsigned max)
Return a tactic that keeps applying t until the goal is not modified anymore or the maximum number of...
expr max(expr const &a, expr const &b)
Definition z3++.h:2098

◆ reset_params()

void reset_params ( )
inline

Definition at line 84 of file z3++.h.

void Z3_API Z3_global_param_reset_all(void)
Restore the value of all global (and module) parameters. This command will not affect already created...

◆ round_fpa_to_closest_integer()

expr round_fpa_to_closest_integer ( expr const & t)
inline

Definition at line 2213 of file z3++.h.

2213 {
2214 assert(t.is_fpa());
2215 Z3_ast r = Z3_mk_fpa_round_to_integral(t.ctx(), t.ctx().fpa_rounding_mode(), t);
2216 t.check_error();
2217 return expr(t.ctx(), r);
2218 }
Z3_ast Z3_API Z3_mk_fpa_round_to_integral(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point roundToIntegral. Rounds a floating-point number to the closest integer,...

◆ sbv_to_fpa()

expr sbv_to_fpa ( expr const & t,
sort s )
inline

Definition at line 2192 of file z3++.h.

2192 {
2193 assert(t.is_bv());
2194 Z3_ast r = Z3_mk_fpa_to_fp_signed(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2195 t.check_error();
2196 return expr(t.ctx(), r);
2197 }
Z3_ast Z3_API Z3_mk_fpa_to_fp_signed(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.

◆ sdiv() [1/3]

expr sdiv ( expr const & a,
expr const & b )
inline

signed division operator for bitvectors.

Definition at line 2311 of file z3++.h.

2311{ return to_expr(a.ctx(), Z3_mk_bvsdiv(a.ctx(), a, b)); }

Referenced by sdiv(), and sdiv().

◆ sdiv() [2/3]

expr sdiv ( expr const & a,
int b )
inline

Definition at line 2312 of file z3++.h.

2312{ return sdiv(a, a.ctx().num_val(b, a.get_sort())); }
expr sdiv(expr const &a, expr const &b)
signed division operator for bitvectors.
Definition z3++.h:2311

◆ sdiv() [3/3]

expr sdiv ( int a,
expr const & b )
inline

Definition at line 2313 of file z3++.h.

2313{ return sdiv(b.ctx().num_val(a, b.get_sort()), b); }

◆ select() [1/3]

expr select ( expr const & a,
expr const & i )
inline

forward declarations

Definition at line 4193 of file z3++.h.

4193 {
4194 check_context(a, i);
4195 Z3_ast r = Z3_mk_select(a.ctx(), a, i);
4196 a.check_error();
4197 return expr(a.ctx(), r);
4198 }
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i)
Array read. The argument a is the array and i is the index of the array that gets read.

Referenced by expr::operator[](), expr::operator[](), and select().

◆ select() [2/3]

expr select ( expr const & a,
expr_vector const & i )
inline

Definition at line 4202 of file z3++.h.

4202 {
4203 check_context(a, i);
4204 array<Z3_ast> idxs(i);
4205 Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
4206 a.check_error();
4207 return expr(a.ctx(), r);
4208 }
Z3_ast Z3_API Z3_mk_select_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs)
n-ary Array read. The argument a is the array and idxs are the indices of the array that gets read.

◆ select() [3/3]

expr select ( expr const & a,
int i )
inline

Definition at line 4199 of file z3++.h.

4199 {
4200 return select(a, a.ctx().num_val(i, a.get_sort().array_domain()));
4201 }
expr select(expr const &a, expr const &i)
forward declarations
Definition z3++.h:4193

◆ set_add()

expr set_add ( expr const & s,
expr const & e )
inline

Definition at line 4272 of file z3++.h.

4272 {
4273 MK_EXPR2(Z3_mk_set_add, s, e);
4274 }
Z3_ast Z3_API Z3_mk_set_add(Z3_context c, Z3_ast set, Z3_ast elem)
Add an element to a set.

◆ set_complement()

expr set_complement ( expr const & a)
inline

Definition at line 4300 of file z3++.h.

4300 {
4302 }
Z3_ast Z3_API Z3_mk_set_complement(Z3_context c, Z3_ast arg)
Take the complement of a set.

◆ set_del()

expr set_del ( expr const & s,
expr const & e )
inline

Definition at line 4276 of file z3++.h.

4276 {
4277 MK_EXPR2(Z3_mk_set_del, s, e);
4278 }
Z3_ast Z3_API Z3_mk_set_del(Z3_context c, Z3_ast set, Z3_ast elem)
Remove an element to a set.

◆ set_difference()

expr set_difference ( expr const & a,
expr const & b )
inline

Definition at line 4296 of file z3++.h.

4296 {
4298 }
Z3_ast Z3_API Z3_mk_set_difference(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Take the set difference between two sets.

◆ set_intersect()

expr set_intersect ( expr const & a,
expr const & b )
inline

Definition at line 4288 of file z3++.h.

4288 {
4289 check_context(a, b);
4290 Z3_ast es[2] = { a, b };
4291 Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
4292 a.check_error();
4293 return expr(a.ctx(), r);
4294 }
Z3_ast Z3_API Z3_mk_set_intersect(Z3_context c, unsigned num_args, Z3_ast const args[])
Take the intersection of a list of sets.

◆ set_member()

expr set_member ( expr const & s,
expr const & e )
inline

Definition at line 4304 of file z3++.h.

4304 {
4306 }
Z3_ast Z3_API Z3_mk_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check for set membership.

◆ set_param() [1/3]

void set_param ( char const * param,
bool value )
inline

Definition at line 82 of file z3++.h.

82{ Z3_global_param_set(param, value ? "true" : "false"); }
void Z3_API Z3_global_param_set(Z3_string param_id, Z3_string param_value)
Set a global (or module) parameter. This setting is shared by all Z3 contexts.

◆ set_param() [2/3]

void set_param ( char const * param,
char const * value )
inline

Definition at line 81 of file z3++.h.

81{ Z3_global_param_set(param, value); }

◆ set_param() [3/3]

void set_param ( char const * param,
int value )
inline

Definition at line 83 of file z3++.h.

83{ auto str = std::to_string(value); Z3_global_param_set(param, str.c_str()); }

◆ set_subset()

expr set_subset ( expr const & a,
expr const & b )
inline

Definition at line 4308 of file z3++.h.

4308 {
4310 }
Z3_ast Z3_API Z3_mk_set_subset(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Check for subsetness of sets.

◆ set_union()

expr set_union ( expr const & a,
expr const & b )
inline

Definition at line 4280 of file z3++.h.

4280 {
4281 check_context(a, b);
4282 Z3_ast es[2] = { a, b };
4283 Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
4284 a.check_error();
4285 return expr(a.ctx(), r);
4286 }
Z3_ast Z3_API Z3_mk_set_union(Z3_context c, unsigned num_args, Z3_ast const args[])
Take the union of a list of sets.

◆ sext()

expr sext ( expr const & a,
unsigned i )
inline

Sign-extend of the given bit-vector to the (signed) equivalent bitvector of size m+i, where m is the size of the given bit-vector.

Definition at line 2407 of file z3++.h.

2407{ return to_expr(a.ctx(), Z3_mk_sign_ext(a.ctx(), i, a)); }
Z3_ast Z3_API Z3_mk_sign_ext(Z3_context c, unsigned i, Z3_ast t1)
Sign-extend of the given bit-vector to the (signed) equivalent bit-vector of size m+i,...

◆ sge() [1/3]

expr sge ( expr const & a,
expr const & b )
inline

signed greater than or equal to operator for bitvectors.

Definition at line 2272 of file z3++.h.

2272{ return to_expr(a.ctx(), Z3_mk_bvsge(a.ctx(), a, b)); }

Referenced by sge(), and sge().

◆ sge() [2/3]

expr sge ( expr const & a,
int b )
inline

Definition at line 2273 of file z3++.h.

2273{ return sge(a, a.ctx().num_val(b, a.get_sort())); }
expr sge(expr const &a, expr const &b)
signed greater than or equal to operator for bitvectors.
Definition z3++.h:2272

◆ sge() [3/3]

expr sge ( int a,
expr const & b )
inline

Definition at line 2274 of file z3++.h.

2274{ return sge(b.ctx().num_val(a, b.get_sort()), b); }

◆ sgt() [1/3]

expr sgt ( expr const & a,
expr const & b )
inline

signed greater than operator for bitvectors.

Definition at line 2278 of file z3++.h.

2278{ return to_expr(a.ctx(), Z3_mk_bvsgt(a.ctx(), a, b)); }

Referenced by sgt(), and sgt().

◆ sgt() [2/3]

expr sgt ( expr const & a,
int b )
inline

Definition at line 2279 of file z3++.h.

2279{ return sgt(a, a.ctx().num_val(b, a.get_sort())); }
expr sgt(expr const &a, expr const &b)
signed greater than operator for bitvectors.
Definition z3++.h:2278

◆ sgt() [3/3]

expr sgt ( int a,
expr const & b )
inline

Definition at line 2280 of file z3++.h.

2280{ return sgt(b.ctx().num_val(a, b.get_sort()), b); }

◆ shl() [1/3]

expr shl ( expr const & a,
expr const & b )
inline

shift left operator for bitvectors

Definition at line 2346 of file z3++.h.

2346{ return to_expr(a.ctx(), Z3_mk_bvshl(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvshl(Z3_context c, Z3_ast t1, Z3_ast t2)
Shift left.

Referenced by shl(), and shl().

◆ shl() [2/3]

expr shl ( expr const & a,
int b )
inline

Definition at line 2347 of file z3++.h.

2347{ return shl(a, a.ctx().num_val(b, a.get_sort())); }
expr shl(expr const &a, expr const &b)
shift left operator for bitvectors
Definition z3++.h:2346

◆ shl() [3/3]

expr shl ( int a,
expr const & b )
inline

Definition at line 2348 of file z3++.h.

2348{ return shl(b.ctx().num_val(a, b.get_sort()), b); }

◆ sle() [1/3]

expr sle ( expr const & a,
expr const & b )
inline

signed less than or equal to operator for bitvectors.

Definition at line 2260 of file z3++.h.

2260{ return to_expr(a.ctx(), Z3_mk_bvsle(a.ctx(), a, b)); }

Referenced by sle(), and sle().

◆ sle() [2/3]

expr sle ( expr const & a,
int b )
inline

Definition at line 2261 of file z3++.h.

2261{ return sle(a, a.ctx().num_val(b, a.get_sort())); }
expr sle(expr const &a, expr const &b)
signed less than or equal to operator for bitvectors.
Definition z3++.h:2260

◆ sle() [3/3]

expr sle ( int a,
expr const & b )
inline

Definition at line 2262 of file z3++.h.

2262{ return sle(b.ctx().num_val(a, b.get_sort()), b); }

◆ slt() [1/3]

expr slt ( expr const & a,
expr const & b )
inline

signed less than operator for bitvectors.

Definition at line 2266 of file z3++.h.

2266{ return to_expr(a.ctx(), Z3_mk_bvslt(a.ctx(), a, b)); }

Referenced by slt(), and slt().

◆ slt() [2/3]

expr slt ( expr const & a,
int b )
inline

Definition at line 2267 of file z3++.h.

2267{ return slt(a, a.ctx().num_val(b, a.get_sort())); }
expr slt(expr const &a, expr const &b)
signed less than operator for bitvectors.
Definition z3++.h:2266

◆ slt() [3/3]

expr slt ( int a,
expr const & b )
inline

Definition at line 2268 of file z3++.h.

2268{ return slt(b.ctx().num_val(a, b.get_sort()), b); }

◆ smod() [1/3]

expr smod ( expr const & a,
expr const & b )
inline

signed modulus operator for bitvectors

Definition at line 2332 of file z3++.h.

2332{ return to_expr(a.ctx(), Z3_mk_bvsmod(a.ctx(), a, b)); }

Referenced by smod(), and smod().

◆ smod() [2/3]

expr smod ( expr const & a,
int b )
inline

Definition at line 2333 of file z3++.h.

2333{ return smod(a, a.ctx().num_val(b, a.get_sort())); }
expr smod(expr const &a, expr const &b)
signed modulus operator for bitvectors
Definition z3++.h:2332

◆ smod() [3/3]

expr smod ( int a,
expr const & b )
inline

Definition at line 2334 of file z3++.h.

2334{ return smod(b.ctx().num_val(a, b.get_sort()), b); }

◆ sqrt()

expr sqrt ( expr const & a,
expr const & rm )
inline

Definition at line 2146 of file z3++.h.

2146 {
2147 check_context(a, rm);
2148 assert(a.is_fpa());
2149 Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
2150 a.check_error();
2151 return expr(a.ctx(), r);
2152 }
Z3_ast Z3_API Z3_mk_fpa_sqrt(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point square root.

◆ srem() [1/3]

expr srem ( expr const & a,
expr const & b )
inline

signed remainder operator for bitvectors

Definition at line 2325 of file z3++.h.

2325{ return to_expr(a.ctx(), Z3_mk_bvsrem(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsrem(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows dividend).

Referenced by srem(), and srem().

◆ srem() [2/3]

expr srem ( expr const & a,
int b )
inline

Definition at line 2326 of file z3++.h.

2326{ return srem(a, a.ctx().num_val(b, a.get_sort())); }
expr srem(expr const &a, expr const &b)
signed remainder operator for bitvectors
Definition z3++.h:2325

◆ srem() [3/3]

expr srem ( int a,
expr const & b )
inline

Definition at line 2327 of file z3++.h.

2327{ return srem(b.ctx().num_val(a, b.get_sort()), b); }

◆ star()

expr star ( expr const & re)
inline

Definition at line 4405 of file z3++.h.

4405 {
4407 }
Z3_ast Z3_API Z3_mk_re_star(Z3_context c, Z3_ast re)
Create the regular language re*.

◆ store() [1/5]

expr store ( expr const & a,
expr const & i,
expr const & v )
inline

Definition at line 4210 of file z3++.h.

4210 {
4211 check_context(a, i); check_context(a, v);
4212 Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
4213 a.check_error();
4214 return expr(a.ctx(), r);
4215 }
Z3_ast Z3_API Z3_mk_store(Z3_context c, Z3_ast a, Z3_ast i, Z3_ast v)
Array update.

Referenced by store(), store(), and store().

◆ store() [2/5]

expr store ( expr const & a,
expr i,
int v )
inline

Definition at line 4218 of file z3++.h.

4218{ return store(a, i, a.ctx().num_val(v, a.get_sort().array_range())); }
expr store(expr const &a, expr const &i, expr const &v)
Definition z3++.h:4210

◆ store() [3/5]

expr store ( expr const & a,
expr_vector const & i,
expr const & v )
inline

Definition at line 4222 of file z3++.h.

4222 {
4223 check_context(a, i); check_context(a, v);
4224 array<Z3_ast> idxs(i);
4225 Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
4226 a.check_error();
4227 return expr(a.ctx(), r);
4228 }
Z3_ast Z3_API Z3_mk_store_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs, Z3_ast v)
n-ary Array update.

◆ store() [4/5]

expr store ( expr const & a,
int i,
expr const & v )
inline

Definition at line 4217 of file z3++.h.

4217{ return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), v); }

◆ store() [5/5]

expr store ( expr const & a,
int i,
int v )
inline

Definition at line 4219 of file z3++.h.

4219 {
4220 return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
4221 }

◆ suffixof()

expr suffixof ( expr const & a,
expr const & b )
inline

Definition at line 4369 of file z3++.h.

4369 {
4370 check_context(a, b);
4371 Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
4372 a.check_error();
4373 return expr(a.ctx(), r);
4374 }
Z3_ast Z3_API Z3_mk_seq_suffix(Z3_context c, Z3_ast suffix, Z3_ast s)
Check if suffix is a suffix of s.

◆ sum()

expr sum ( expr_vector const & args)
inline

Definition at line 2590 of file z3++.h.

2590 {
2591 assert(args.size() > 0);
2592 context& ctx = args[0u].ctx();
2593 array<Z3_ast> _args(args);
2594 Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
2595 ctx.check_error();
2596 return expr(ctx, r);
2597 }

◆ to_check_result()

check_result to_check_result ( Z3_lbool l)
inline

Definition at line 178 of file z3++.h.

178 {
179 if (l == Z3_L_TRUE) return sat;
180 else if (l == Z3_L_FALSE) return unsat;
181 return unknown;
182 }
@ Z3_L_TRUE
Definition z3_api.h:61
@ Z3_L_FALSE
Definition z3_api.h:59

Referenced by optimize::check(), optimize::check(), solver::check(), solver::check(), solver::check(), solver::consequences(), fixedpoint::query(), and fixedpoint::query().

◆ to_expr()

expr to_expr ( context & c,
Z3_ast a )
inline

Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the whole C API with the C++ layer defined in this file.

Definition at line 2238 of file z3++.h.

2238 {
2239 c.check_error();
2240 assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
2242 Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
2244 return expr(c, a);
2245 }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.
@ Z3_APP_AST
Definition z3_api.h:144
@ Z3_VAR_AST
Definition z3_api.h:145
@ Z3_NUMERAL_AST
Definition z3_api.h:143
@ Z3_QUANTIFIER_AST
Definition z3_api.h:146

Referenced by ashr(), lshr(), sdiv(), sext(), sge(), sgt(), shl(), sle(), slt(), smod(), srem(), udiv(), uge(), ugt(), ule(), ult(), urem(), and zext().

◆ to_func_decl()

func_decl to_func_decl ( context & c,
Z3_func_decl f )
inline

Definition at line 2252 of file z3++.h.

2252 {
2253 c.check_error();
2254 return func_decl(c, f);
2255 }
Function declaration (aka function definition). It is the signature of interpreted and uninterpreted ...
Definition z3++.h:830

Referenced by linear_order(), partial_order(), piecewise_linear_order(), and tree_order().

◆ to_re()

expr to_re ( expr const & s)
inline

Definition at line 4393 of file z3++.h.

4393 {
4395 }
Z3_ast Z3_API Z3_mk_seq_to_re(Z3_context c, Z3_ast seq)
Create a regular expression that accepts the sequence seq.

◆ to_real()

expr to_real ( expr const & a)
inline

Definition at line 4150 of file z3++.h.

4150{ Z3_ast r = Z3_mk_int2real(a.ctx(), a); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_int2real(Z3_context c, Z3_ast t1)
Coerce an integer to a real.

◆ to_sort()

sort to_sort ( context & c,
Z3_sort s )
inline

Definition at line 2247 of file z3++.h.

2247 {
2248 c.check_error();
2249 return sort(c, s);
2250 }
A Z3 sort (aka type). Every expression (i.e., formula or term) in Z3 has a sort.
Definition z3++.h:727

Referenced by context::enumeration_sort(), context::tuple_sort(), context::uninterpreted_sort(), and context::uninterpreted_sort().

◆ tree_order()

func_decl tree_order ( sort const & a,
unsigned index )
inline

Definition at line 2418 of file z3++.h.

2418 {
2419 return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
2420 }
Z3_func_decl Z3_API Z3_mk_tree_order(Z3_context c, Z3_sort a, unsigned id)
create a tree ordering relation over signature a identified using index id.

◆ try_for()

tactic try_for ( tactic const & t,
unsigned ms )
inline

Definition at line 3362 of file z3++.h.

3362 {
3363 Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
3364 t.check_error();
3365 return tactic(t.ctx(), r);
3366 }
Z3_tactic Z3_API Z3_tactic_try_for(Z3_context c, Z3_tactic t, unsigned ms)
Return a tactic that applies t to a given goal for ms milliseconds. If t does not terminate in ms mil...

◆ ubv_to_fpa()

expr ubv_to_fpa ( expr const & t,
sort s )
inline

Definition at line 2199 of file z3++.h.

2199 {
2200 assert(t.is_bv());
2201 Z3_ast r = Z3_mk_fpa_to_fp_unsigned(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2202 t.check_error();
2203 return expr(t.ctx(), r);
2204 }
Z3_ast Z3_API Z3_mk_fpa_to_fp_unsigned(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a 2's complement unsigned bit-vector term into a term of FloatingPoint sort.

◆ udiv() [1/3]

expr udiv ( expr const & a,
expr const & b )
inline

unsigned division operator for bitvectors.

Definition at line 2318 of file z3++.h.

2318{ return to_expr(a.ctx(), Z3_mk_bvudiv(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvudiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned division.

Referenced by udiv(), and udiv().

◆ udiv() [2/3]

expr udiv ( expr const & a,
int b )
inline

Definition at line 2319 of file z3++.h.

2319{ return udiv(a, a.ctx().num_val(b, a.get_sort())); }
expr udiv(expr const &a, expr const &b)
unsigned division operator for bitvectors.
Definition z3++.h:2318

◆ udiv() [3/3]

expr udiv ( int a,
expr const & b )
inline

Definition at line 2320 of file z3++.h.

2320{ return udiv(b.ctx().num_val(a, b.get_sort()), b); }

◆ uge() [1/3]

expr uge ( expr const & a,
expr const & b )
inline

unsigned greater than or equal to operator for bitvectors.

Definition at line 2298 of file z3++.h.

2298{ return to_expr(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b)); }

Referenced by uge(), and uge().

◆ uge() [2/3]

expr uge ( expr const & a,
int b )
inline

Definition at line 2299 of file z3++.h.

2299{ return uge(a, a.ctx().num_val(b, a.get_sort())); }
expr uge(expr const &a, expr const &b)
unsigned greater than or equal to operator for bitvectors.
Definition z3++.h:2298

◆ uge() [3/3]

expr uge ( int a,
expr const & b )
inline

Definition at line 2300 of file z3++.h.

2300{ return uge(b.ctx().num_val(a, b.get_sort()), b); }

◆ ugt() [1/3]

expr ugt ( expr const & a,
expr const & b )
inline

unsigned greater than operator for bitvectors.

Definition at line 2304 of file z3++.h.

2304{ return to_expr(a.ctx(), Z3_mk_bvugt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvugt(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than.

Referenced by ugt(), and ugt().

◆ ugt() [2/3]

expr ugt ( expr const & a,
int b )
inline

Definition at line 2305 of file z3++.h.

2305{ return ugt(a, a.ctx().num_val(b, a.get_sort())); }
expr ugt(expr const &a, expr const &b)
unsigned greater than operator for bitvectors.
Definition z3++.h:2304

◆ ugt() [3/3]

expr ugt ( int a,
expr const & b )
inline

Definition at line 2306 of file z3++.h.

2306{ return ugt(b.ctx().num_val(a, b.get_sort()), b); }

◆ ule() [1/3]

expr ule ( expr const & a,
expr const & b )
inline

unsigned less than or equal to operator for bitvectors.

Definition at line 2286 of file z3++.h.

2286{ return to_expr(a.ctx(), Z3_mk_bvule(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvule(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned less than or equal to.

Referenced by ule(), and ule().

◆ ule() [2/3]

expr ule ( expr const & a,
int b )
inline

Definition at line 2287 of file z3++.h.

2287{ return ule(a, a.ctx().num_val(b, a.get_sort())); }
expr ule(expr const &a, expr const &b)
unsigned less than or equal to operator for bitvectors.
Definition z3++.h:2286

◆ ule() [3/3]

expr ule ( int a,
expr const & b )
inline

Definition at line 2288 of file z3++.h.

2288{ return ule(b.ctx().num_val(a, b.get_sort()), b); }

◆ ult() [1/3]

expr ult ( expr const & a,
expr const & b )
inline

unsigned less than operator for bitvectors.

Definition at line 2292 of file z3++.h.

2292{ return to_expr(a.ctx(), Z3_mk_bvult(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvult(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned less than.

Referenced by ult(), and ult().

◆ ult() [2/3]

expr ult ( expr const & a,
int b )
inline

Definition at line 2293 of file z3++.h.

2293{ return ult(a, a.ctx().num_val(b, a.get_sort())); }
expr ult(expr const &a, expr const &b)
unsigned less than operator for bitvectors.
Definition z3++.h:2292

◆ ult() [3/3]

expr ult ( int a,
expr const & b )
inline

Definition at line 2294 of file z3++.h.

2294{ return ult(b.ctx().num_val(a, b.get_sort()), b); }

◆ urem() [1/3]

expr urem ( expr const & a,
expr const & b )
inline

unsigned reminder operator for bitvectors

Definition at line 2339 of file z3++.h.

2339{ return to_expr(a.ctx(), Z3_mk_bvurem(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvurem(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned remainder.

Referenced by urem(), and urem().

◆ urem() [2/3]

expr urem ( expr const & a,
int b )
inline

Definition at line 2340 of file z3++.h.

2340{ return urem(a, a.ctx().num_val(b, a.get_sort())); }
expr urem(expr const &a, expr const &b)
unsigned reminder operator for bitvectors
Definition z3++.h:2339

◆ urem() [3/3]

expr urem ( int a,
expr const & b )
inline

Definition at line 2341 of file z3++.h.

2341{ return urem(b.ctx().num_val(a, b.get_sort()), b); }

◆ when()

tactic when ( probe const & p,
tactic const & t )
inline

Definition at line 3686 of file z3++.h.

3686 {
3687 check_context(p, t);
3688 Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
3689 t.check_error();
3690 return tactic(t.ctx(), r);
3691 }
Z3_tactic Z3_API Z3_tactic_when(Z3_context c, Z3_probe p, Z3_tactic t)
Return a tactic that applies t to a given goal is the probe p evaluates to true. If p evaluates to fa...

◆ with() [1/2]

simplifier with ( simplifier const & t,
params const & p )
inline

Definition at line 3418 of file z3++.h.

3418 {
3419 Z3_simplifier r = Z3_simplifier_using_params(t.ctx(), t, p);
3420 t.check_error();
3421 return simplifier(t.ctx(), r);
3422 }
Z3_simplifier Z3_API Z3_simplifier_using_params(Z3_context c, Z3_simplifier t, Z3_params p)
Return a simplifier that applies t using the given set of parameters.

◆ with() [2/2]

tactic with ( tactic const & t,
params const & p )
inline

Definition at line 3357 of file z3++.h.

3357 {
3358 Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
3359 t.check_error();
3360 return tactic(t.ctx(), r);
3361 }
Z3_tactic Z3_API Z3_tactic_using_params(Z3_context c, Z3_tactic t, Z3_params p)
Return a tactic that applies t using the given set of parameters.

◆ xnor()

expr xnor ( expr const & a,
expr const & b )
inline

Definition at line 2081 of file z3++.h.

2081{ if (a.is_bool()) return !(a ^ b); check_context(a, b); Z3_ast r = Z3_mk_bvxnor(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvxnor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise xnor.

◆ zext()

expr zext ( expr const & a,
unsigned i )
inline

Extend the given bit-vector with zeros to the (unsigned) equivalent bitvector of size m+i, where m is the size of the given bit-vector.

Definition at line 2367 of file z3++.h.

2367{ return to_expr(a.ctx(), Z3_mk_zero_ext(a.ctx(), i, a)); }
Z3_ast Z3_API Z3_mk_zero_ext(Z3_context c, unsigned i, Z3_ast t1)
Extend the given bit-vector with zeros to the (unsigned) equivalent bit-vector of size m+i,...