Z3
Data Structures | Typedefs | Enumerations | Functions
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  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  solver
 
class  goal
 
class  apply_result
 
class  tactic
 
class  probe
 
class  optimize
 
class  fixedpoint
 
class  user_propagator_base
 

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
 

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 ()
 
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 More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
expr ugt (expr const &a, int b)
 
expr ugt (int a, expr const &b)
 
expr udiv (expr const &a, expr const &b)
 unsigned division operator for bitvectors. More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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. More...
 
expr bv2int (expr const &a, bool is_signed)
 bit-vector and integer conversions. More...
 
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 More...
 
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. More...
 
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 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 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)
 
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 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 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)
 

Detailed Description

Z3 C++ namespace.

Typedef Documentation

◆ ast_vector

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

◆ expr_vector

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

◆ func_decl_vector

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

◆ sort_vector

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

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

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

133  {
134  unsat, sat, unknown
135  };
@ unknown
Definition: z3++.h:134
@ sat
Definition: z3++.h:134
@ unsat
Definition: z3++.h:134

◆ rounding_mode

Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

137  {
138  RNA,
139  RNE,
140  RTP,
141  RTN,
142  RTZ
143  };
@ RNE
Definition: z3++.h:139
@ RNA
Definition: z3++.h:138
@ RTZ
Definition: z3++.h:142
@ RTN
Definition: z3++.h:141
@ RTP
Definition: z3++.h:140

Function Documentation

◆ abs()

expr z3::abs ( expr const &  a)
inline

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

1932  {
1933  Z3_ast r;
1934  if (a.is_int()) {
1935  expr zero = a.ctx().int_val(0);
1936  expr ge = a >= zero;
1937  expr na = -a;
1938  r = Z3_mk_ite(a.ctx(), ge, a, na);
1939  }
1940  else if (a.is_real()) {
1941  expr zero = a.ctx().real_val(0);
1942  expr ge = a >= zero;
1943  expr na = -a;
1944  r = Z3_mk_ite(a.ctx(), ge, a, na);
1945  }
1946  else {
1947  r = Z3_mk_fpa_abs(a.ctx(), a);
1948  }
1949  a.check_error();
1950  return expr(a.ctx(), r);
1951  }
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.

◆ as_array()

expr z3::as_array ( func_decl f)
inline

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

3679  {
3680  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3681  f.check_error();
3682  return expr(f.ctx(), r);
3683  }
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 z3::ashr ( expr const &  a,
expr const &  b 
)
inline

arithmetic shift right operator for bitvectors

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

2158 { 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:2044

Referenced by ashr().

◆ ashr() [2/3]

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

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

2159 { return ashr(a, a.ctx().num_val(b, a.get_sort())); }
expr ashr(int a, expr const &b)
Definition: z3++.h:2160

◆ ashr() [3/3]

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

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

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

◆ atleast()

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

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

2367  {
2368  assert(es.size() > 0);
2369  context& ctx = es[0u].ctx();
2370  array<Z3_ast> _es(es);
2371  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2372  ctx.check_error();
2373  return expr(ctx, r);
2374  }
Z3_ast Z3_API Z3_mk_atleast(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ atmost()

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

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

2359  {
2360  assert(es.size() > 0);
2361  context& ctx = es[0u].ctx();
2362  array<Z3_ast> _es(es);
2363  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2364  ctx.check_error();
2365  return expr(ctx, r);
2366  }
Z3_ast Z3_API Z3_mk_atmost(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ bv2int()

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

bit-vector and integer conversions.

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

2170 { 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 z3::bvadd_no_overflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

bit-vector overflow/underflow checks

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

2176  {
2177  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);
2178  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:426

◆ bvadd_no_underflow()

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

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

2179  {
2180  check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2181  }
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 z3::bvmul_no_overflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

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

2194  {
2195  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);
2196  }
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 z3::bvmul_no_underflow ( expr const &  a,
expr const &  b 
)
inline

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

2197  {
2198  check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2199  }
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 z3::bvneg_no_overflow ( expr const &  a)
inline

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

2191  {
2192  Z3_ast r = Z3_mk_bvneg_no_overflow(a.ctx(), a); a.check_error(); return expr(a.ctx(), r);
2193  }
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 z3::bvredand ( expr const &  a)
inline

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

1926  {
1927  assert(a.is_bv());
1928  Z3_ast r = Z3_mk_bvredand(a.ctx(), a);
1929  a.check_error();
1930  return expr(a.ctx(), r);
1931  }
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 z3::bvredor ( expr const &  a)
inline

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

1920  {
1921  assert(a.is_bv());
1922  Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
1923  a.check_error();
1924  return expr(a.ctx(), r);
1925  }
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 z3::bvsdiv_no_overflow ( expr const &  a,
expr const &  b 
)
inline

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

2188  {
2189  check_context(a, b); Z3_ast r = Z3_mk_bvsdiv_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2190  }
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 z3::bvsub_no_overflow ( expr const &  a,
expr const &  b 
)
inline

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

2182  {
2183  check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2184  }
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 z3::bvsub_no_underflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

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

2185  {
2186  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);
2187  }
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 z3::check_context ( object const &  a,
object const &  b 
)
inline

◆ concat() [1/2]

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

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

2393  {
2394  check_context(a, b);
2395  Z3_ast r;
2396  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2397  Z3_ast _args[2] = { a, b };
2398  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2399  }
2400  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2401  Z3_ast _args[2] = { a, b };
2402  r = Z3_mk_re_concat(a.ctx(), 2, _args);
2403  }
2404  else {
2405  r = Z3_mk_concat(a.ctx(), a, b);
2406  }
2407  a.ctx().check_error();
2408  return expr(a.ctx(), r);
2409  }
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.

◆ concat() [2/2]

expr z3::concat ( expr_vector const &  args)
inline

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

2411  {
2412  Z3_ast r;
2413  assert(args.size() > 0);
2414  if (args.size() == 1) {
2415  return args[0u];
2416  }
2417  context& ctx = args[0u].ctx();
2418  array<Z3_ast> _args(args);
2419  if (Z3_is_seq_sort(ctx, args[0u].get_sort())) {
2420  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2421  }
2422  else if (Z3_is_re_sort(ctx, args[0u].get_sort())) {
2423  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2424  }
2425  else {
2426  r = _args[args.size()-1];
2427  for (unsigned i = args.size()-1; i > 0; ) {
2428  --i;
2429  r = Z3_mk_concat(ctx, _args[i], r);
2430  ctx.check_error();
2431  }
2432  }
2433  ctx.check_error();
2434  return expr(ctx, r);
2435  }

◆ cond()

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

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

3269  {
3270  check_context(p, t1); check_context(p, t2);
3271  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
3272  t1.check_error();
3273  return tactic(t1.ctx(), r);
3274  }
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 z3::const_array ( sort const &  d,
expr const &  v 
)
inline

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

3696  {
3697  MK_EXPR2(Z3_mk_const_array, d, v);
3698  }
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:3690

◆ distinct()

expr z3::distinct ( expr_vector const &  args)
inline

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

2384  {
2385  assert(args.size() > 0);
2386  context& ctx = args[0u].ctx();
2387  array<Z3_ast> _args(args);
2388  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2389  ctx.check_error();
2390  return expr(ctx, r);
2391  }
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 z3::empty ( sort const &  s)
inline

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

3752  {
3753  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3754  s.check_error();
3755  return expr(s.ctx(), r);
3756  }
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 z3::empty_set ( sort const &  s)
inline

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

3700  {
3702  }
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:3685

◆ eq()

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

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

531 { 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 z3::exists ( expr const &  x,
expr const &  b 
)
inline

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

2286  {
2287  check_context(x, b);
2288  Z3_app vars[] = {(Z3_app) x};
2289  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2290  }
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 z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2291  {
2292  check_context(x1, b); check_context(x2, b);
2293  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2294  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2295  }

◆ exists() [3/5]

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

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

2296  {
2297  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2298  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2299  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2300  }

◆ exists() [4/5]

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

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

2301  {
2302  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2303  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2304  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2305  }

◆ exists() [5/5]

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

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

2306  {
2307  array<Z3_app> vars(xs);
2308  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);
2309  }

◆ fail_if()

tactic z3::fail_if ( probe const &  p)
inline

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

3258  {
3259  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
3260  p.check_error();
3261  return tactic(p.ctx(), r);
3262  }
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.

◆ fma()

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

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

1968  {
1969  check_context(a, b); check_context(a, c); check_context(a, rm);
1970  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
1971  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
1972  a.check_error();
1973  return expr(a.ctx(), r);
1974  }
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.

◆ forall() [1/5]

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

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

2262  {
2263  check_context(x, b);
2264  Z3_app vars[] = {(Z3_app) x};
2265  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2266  }
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 z3::forall ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2267  {
2268  check_context(x1, b); check_context(x2, b);
2269  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2270  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2271  }

◆ forall() [3/5]

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

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

2272  {
2273  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2274  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2275  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2276  }

◆ forall() [4/5]

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

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

2277  {
2278  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2279  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2280  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2281  }

◆ forall() [5/5]

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

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

2282  {
2283  array<Z3_app> vars(xs);
2284  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);
2285  }

◆ fp_eq()

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

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

1959  {
1960  check_context(a, b);
1961  assert(a.is_fpa());
1962  Z3_ast r = Z3_mk_fpa_eq(a.ctx(), a, b);
1963  a.check_error();
1964  return expr(a.ctx(), r);
1965  }
Z3_ast Z3_API Z3_mk_fpa_eq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point equality.

◆ fpa_fp()

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

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

1976  {
1977  check_context(sgn, exp); check_context(exp, sig);
1978  assert(sgn.is_bv() && exp.is_bv() && sig.is_bv());
1979  Z3_ast r = Z3_mk_fpa_fp(sgn.ctx(), sgn, exp, sig);
1980  sgn.check_error();
1981  return expr(sgn.ctx(), r);
1982  }
Z3_ast Z3_API Z3_mk_fpa_fp(Z3_context c, Z3_ast sgn, Z3_ast exp, Z3_ast sig)
Create an expression of FloatingPoint sort from three bit-vector expressions.

◆ fpa_to_fpa()

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

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

2012  {
2013  assert(t.is_fpa());
2014  Z3_ast r = Z3_mk_fpa_to_fp_float(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2015  t.check_error();
2016  return expr(t.ctx(), r);
2017  }
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 z3::fpa_to_sbv ( expr const &  t,
unsigned  sz 
)
inline

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

1984  {
1985  assert(t.is_fpa());
1986  Z3_ast r = Z3_mk_fpa_to_sbv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
1987  t.check_error();
1988  return expr(t.ctx(), r);
1989  }
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 z3::fpa_to_ubv ( expr const &  t,
unsigned  sz 
)
inline

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

1991  {
1992  assert(t.is_fpa());
1993  Z3_ast r = Z3_mk_fpa_to_ubv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
1994  t.check_error();
1995  return expr(t.ctx(), r);
1996  }
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 z3::full_set ( sort const &  s)
inline

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

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

◆ function() [1/9]

func_decl z3::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 3619 of file z3++.h.

3619  {
3620  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
3621  }
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3340
context & ctx() const
Definition: z3++.h:422
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3824

◆ function() [2/9]

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

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

3616  {
3617  return range.ctx().function(name, d1, d2, d3, d4, range);
3618  }

◆ function() [3/9]

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

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

3613  {
3614  return range.ctx().function(name, d1, d2, d3, range);
3615  }

◆ function() [4/9]

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

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

3610  {
3611  return range.ctx().function(name, d1, d2, range);
3612  }

◆ function() [5/9]

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

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

3607  {
3608  return range.ctx().function(name, domain, range);
3609  }

◆ function() [6/9]

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

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

3622  {
3623  return range.ctx().function(name, domain, range);
3624  }

◆ function() [7/9]

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

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

3604  {
3605  return range.ctx().function(name, arity, domain, range);
3606  }

◆ function() [8/9]

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

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

3625  {
3626  return range.ctx().function(name.c_str(), domain, range);
3627  }

◆ function() [9/9]

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

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

3601  {
3602  return range.ctx().function(name, arity, domain, range);
3603  }

◆ implies() [1/3]

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

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

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

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

1568  {
1569  assert(a.is_bool() && b.is_bool());
1570  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1571  }
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:1561

◆ in_re()

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

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

3784  {
3785  MK_EXPR2(Z3_mk_seq_in_re, s, re);
3786  }
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 z3::indexof ( expr const &  s,
expr const &  substr,
expr const &  offset 
)
inline

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

3769  {
3770  check_context(s, substr); check_context(s, offset);
3771  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3772  s.check_error();
3773  return expr(s.ctx(), r);
3774  }
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 z3::int2bv ( unsigned  n,
expr const &  a 
)
inline

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

2171 { 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 z3::is_int ( expr const &  e)
inline

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

1616 { _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:1608

◆ ite()

expr z3::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 2031 of file z3++.h.

2031  {
2032  check_context(c, t); check_context(c, e);
2033  assert(c.is_bool());
2034  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
2035  c.check_error();
2036  return expr(c.ctx(), r);
2037  }

◆ lambda() [1/5]

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

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

2310  {
2311  check_context(x, b);
2312  Z3_app vars[] = {(Z3_app) x};
2313  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
2314  }
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 z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2315  {
2316  check_context(x1, b); check_context(x2, b);
2317  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2318  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
2319  }

◆ lambda() [3/5]

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

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

2320  {
2321  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2322  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2323  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
2324  }

◆ lambda() [4/5]

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

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

2325  {
2326  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2327  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2328  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
2329  }

◆ lambda() [5/5]

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

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

2330  {
2331  array<Z3_app> vars(xs);
2332  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
2333  }

◆ last_indexof()

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

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

3775  {
3776  check_context(s, substr);
3777  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
3778  s.check_error();
3779  return expr(s.ctx(), r);
3780  }
Z3_ast Z3_API Z3_mk_seq_last_index(Z3_context c, Z3_ast, 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 z3::linear_order ( sort const &  a,
unsigned  index 
)
inline

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

2207  {
2208  return to_func_decl(a.ctx(), Z3_mk_linear_order(a.ctx(), a, index));
2209  }
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:2058

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

2151 { 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().

◆ lshr() [2/3]

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

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

2152 { return lshr(a, a.ctx().num_val(b, a.get_sort())); }
expr lshr(int a, expr const &b)
Definition: z3++.h:2153

◆ lshr() [3/3]

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

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

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

◆ max()

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

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

1905  {
1906  check_context(a, b);
1907  Z3_ast r;
1908  if (a.is_arith()) {
1909  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
1910  }
1911  else if (a.is_bv()) {
1912  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
1913  }
1914  else {
1915  assert(a.is_fpa());
1916  r = Z3_mk_fpa_max(a.ctx(), a, b);
1917  }
1918  return expr(a.ctx(), r);
1919  }
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.

◆ min()

expr z3::min ( 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;
1893  if (a.is_arith()) {
1894  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1895  }
1896  else if (a.is_bv()) {
1897  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1898  }
1899  else {
1900  assert(a.is_fpa());
1901  r = Z3_mk_fpa_min(a.ctx(), a, b);
1902  }
1903  return expr(a.ctx(), r);
1904  }
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 z3::mk_and ( expr_vector const &  args)
inline

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

2443  {
2444  array<Z3_ast> _args(args);
2445  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2446  args.check_error();
2447  return expr(args.ctx(), r);
2448  }
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 z3::mk_or ( expr_vector const &  args)
inline

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

2437  {
2438  array<Z3_ast> _args(args);
2439  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2440  args.check_error();
2441  return expr(args.ctx(), r);
2442  }
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 z3::mk_xor ( expr_vector const &  args)
inline

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

2449  {
2450  if (args.empty())
2451  return args.ctx().bool_val(false);
2452  expr r = args[0u];
2453  for (unsigned i = 1; i < args.size(); ++i)
2454  r = r ^ args[i];
2455  return r;
2456  }

◆ mod() [1/3]

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

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

1580  {
1581  if (a.is_bv()) {
1582  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1583  }
1584  else {
1585  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1586  }
1587  }
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 operator%().

◆ mod() [2/3]

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

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

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

◆ mod() [3/3]

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

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

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

◆ nand()

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

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

1887 { if (a.is_bool()) return !(a && b); check_context(a, b); Z3_ast r = Z3_mk_bvnand(a.ctx(), a, b); 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 z3::nor ( expr const &  a,
expr const &  b 
)
inline

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

1888 { if (a.is_bool()) return !(a || b); check_context(a, b); Z3_ast r = Z3_mk_bvnor(a.ctx(), a, b); 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 z3::operator! ( expr const &  a)
inline
Precondition
a.is_bool()

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

1614 { 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 z3::operator! ( probe const &  p)
inline

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

3092  {
3093  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
3094  }
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 z3::operator!= ( double  a,
expr const &  b 
)
inline

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

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

◆ operator!=() [2/5]

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

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

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

◆ operator!=() [3/5]

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

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

1656  {
1657  check_context(a, b);
1658  Z3_ast args[2] = { a, b };
1659  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1660  a.check_error();
1661  return expr(a.ctx(), r);
1662  }

◆ operator!=() [4/5]

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

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

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

◆ operator!=() [5/5]

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

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

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

◆ operator%() [1/3]

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

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

1591 { return mod(a, b); }

◆ operator%() [2/3]

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

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

1592 { return mod(a, b); }

◆ operator%() [3/3]

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

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

1593 { return mod(a, b); }

◆ operator&() [1/4]

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

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

1875 { if (a.is_bool()) return a && b; check_context(a, b); Z3_ast r = Z3_mk_bvand(a.ctx(), a, b); 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/4]

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

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

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

◆ operator&() [3/4]

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

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

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

◆ operator&() [4/4]

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

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

2973  {
2974  check_context(t1, t2);
2975  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2976  t1.check_error();
2977  return tactic(t1.ctx(), r);
2978  }
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 z3::operator&& ( bool  a,
expr const &  b 
)
inline
Precondition
b.is_bool()

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

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

◆ operator&&() [2/4]

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

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

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

◆ operator&&() [3/4]

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

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

1620  {
1621  check_context(a, b);
1622  assert(a.is_bool() && b.is_bool());
1623  Z3_ast args[2] = { a, b };
1624  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1625  a.check_error();
1626  return expr(a.ctx(), r);
1627  }

◆ operator&&() [4/4]

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

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

3086  {
3087  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3088  }
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 z3::operator* ( expr const &  a,
expr const &  b 
)
inline

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

1698  {
1699  check_context(a, b);
1700  Z3_ast r = 0;
1701  if (a.is_arith() && b.is_arith()) {
1702  Z3_ast args[2] = { a, b };
1703  r = Z3_mk_mul(a.ctx(), 2, args);
1704  }
1705  else if (a.is_bv() && b.is_bv()) {
1706  r = Z3_mk_bvmul(a.ctx(), a, b);
1707  }
1708  else if (a.is_fpa() && b.is_fpa()) {
1709  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1710  }
1711  else {
1712  // operator is not supported by given arguments.
1713  assert(false);
1714  }
1715  a.check_error();
1716  return expr(a.ctx(), r);
1717  }
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 z3::operator* ( expr const &  a,
int  b 
)
inline

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

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

◆ operator*() [3/3]

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

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

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

◆ operator+() [1/3]

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

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

1668  {
1669  check_context(a, b);
1670  Z3_ast r = 0;
1671  if (a.is_arith() && b.is_arith()) {
1672  Z3_ast args[2] = { a, b };
1673  r = Z3_mk_add(a.ctx(), 2, args);
1674  }
1675  else if (a.is_bv() && b.is_bv()) {
1676  r = Z3_mk_bvadd(a.ctx(), a, b);
1677  }
1678  else if (a.is_seq() && b.is_seq()) {
1679  return concat(a, b);
1680  }
1681  else if (a.is_re() && b.is_re()) {
1682  Z3_ast _args[2] = { a, b };
1683  r = Z3_mk_re_union(a.ctx(), 2, _args);
1684  }
1685  else if (a.is_fpa() && b.is_fpa()) {
1686  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1687  }
1688  else {
1689  // operator is not supported by given arguments.
1690  assert(false);
1691  }
1692  a.check_error();
1693  return expr(a.ctx(), r);
1694  }
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_vector const &args)
Definition: z3++.h:2411

◆ operator+() [2/3]

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

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

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

◆ operator+() [3/3]

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

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

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

◆ operator-() [1/4]

expr z3::operator- ( expr const &  a)
inline

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

1764  {
1765  Z3_ast r = 0;
1766  if (a.is_arith()) {
1767  r = Z3_mk_unary_minus(a.ctx(), a);
1768  }
1769  else if (a.is_bv()) {
1770  r = Z3_mk_bvneg(a.ctx(), a);
1771  }
1772  else if (a.is_fpa()) {
1773  r = Z3_mk_fpa_neg(a.ctx(), a);
1774  }
1775  else {
1776  // operator is not supported by given arguments.
1777  assert(false);
1778  }
1779  a.check_error();
1780  return expr(a.ctx(), r);
1781  }
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 z3::operator- ( expr const &  a,
expr const &  b 
)
inline

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

1783  {
1784  check_context(a, b);
1785  Z3_ast r = 0;
1786  if (a.is_arith() && b.is_arith()) {
1787  Z3_ast args[2] = { a, b };
1788  r = Z3_mk_sub(a.ctx(), 2, args);
1789  }
1790  else if (a.is_bv() && b.is_bv()) {
1791  r = Z3_mk_bvsub(a.ctx(), a, b);
1792  }
1793  else if (a.is_fpa() && b.is_fpa()) {
1794  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1795  }
1796  else {
1797  // operator is not supported by given arguments.
1798  assert(false);
1799  }
1800  a.check_error();
1801  return expr(a.ctx(), r);
1802  }
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 z3::operator- ( expr const &  a,
int  b 
)
inline

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

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

◆ operator-() [4/4]

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

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

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

◆ operator/() [1/3]

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

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

1742  {
1743  check_context(a, b);
1744  Z3_ast r = 0;
1745  if (a.is_arith() && b.is_arith()) {
1746  r = Z3_mk_div(a.ctx(), a, b);
1747  }
1748  else if (a.is_bv() && b.is_bv()) {
1749  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1750  }
1751  else if (a.is_fpa() && b.is_fpa()) {
1752  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1753  }
1754  else {
1755  // operator is not supported by given arguments.
1756  assert(false);
1757  }
1758  a.check_error();
1759  return expr(a.ctx(), r);
1760  }
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 z3::operator/ ( expr const &  a,
int  b 
)
inline

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

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

◆ operator/() [3/3]

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

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

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

◆ operator<() [1/6]

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

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

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

◆ operator<() [2/6]

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

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

1831  {
1832  check_context(a, b);
1833  Z3_ast r = 0;
1834  if (a.is_arith() && b.is_arith()) {
1835  r = Z3_mk_lt(a.ctx(), a, b);
1836  }
1837  else if (a.is_bv() && b.is_bv()) {
1838  r = Z3_mk_bvslt(a.ctx(), a, b);
1839  }
1840  else if (a.is_fpa() && b.is_fpa()) {
1841  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1842  }
1843  else {
1844  // operator is not supported by given arguments.
1845  assert(false);
1846  }
1847  a.check_error();
1848  return expr(a.ctx(), r);
1849  }
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 z3::operator< ( expr const &  a,
int  b 
)
inline

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

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

◆ operator<() [4/6]

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

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

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

◆ operator<() [5/6]

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

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

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

◆ operator<() [6/6]

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

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

3071  {
3072  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3073  }
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& z3::operator<< ( std::ostream &  out,
apply_result const &  r 
)
inline

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

2931 { 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& z3::operator<< ( std::ostream &  out,
ast const &  n 
)
inline

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

527  {
528  out << Z3_ast_to_string(n.ctx(), n.m_ast); return out;
529  }
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& z3::operator<< ( std::ostream &  out,
check_result  r 
)
inline

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

2625  {
2626  if (r == unsat) out << "unsat";
2627  else if (r == sat) out << "sat";
2628  else out << "unknown";
2629  return out;
2630  }

◆ operator<<() [4/13]

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

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

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

◆ operator<<() [5/13]

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

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

3256 { 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& z3::operator<< ( std::ostream &  out,
goal const &  g 
)
inline

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

2907 { 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& z3::operator<< ( std::ostream &  out,
model const &  m 
)
inline

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

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

◆ operator<<() [8/13]

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

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

3198 { 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& z3::operator<< ( std::ostream &  out,
param_descrs const &  d 
)
inline

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

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

◆ operator<<() [10/13]

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

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

494  {
495  out << Z3_params_to_string(p.ctx(), p); return out;
496  }
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& z3::operator<< ( std::ostream &  out,
solver const &  s 
)
inline

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

2848 { 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& z3::operator<< ( std::ostream &  out,
stats const &  s 
)
inline

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

2622 { 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& z3::operator<< ( std::ostream &  out,
symbol const &  s 
)
inline

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

439  {
440  if (s.kind() == Z3_INT_SYMBOL)
441  out << "k!" << s.to_int();
442  else
443  out << s.str();
444  return out;
445  }
@ Z3_INT_SYMBOL
Definition: z3_api.h:117

◆ operator<=() [1/6]

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

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

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

◆ operator<=() [2/6]

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

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

1806  {
1807  check_context(a, b);
1808  Z3_ast r = 0;
1809  if (a.is_arith() && b.is_arith()) {
1810  r = Z3_mk_le(a.ctx(), a, b);
1811  }
1812  else if (a.is_bv() && b.is_bv()) {
1813  r = Z3_mk_bvsle(a.ctx(), a, b);
1814  }
1815  else if (a.is_fpa() && b.is_fpa()) {
1816  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1817  }
1818  else {
1819  // operator is not supported by given arguments.
1820  assert(false);
1821  }
1822  a.check_error();
1823  return expr(a.ctx(), r);
1824  }
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 z3::operator<= ( expr const &  a,
int  b 
)
inline

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

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

◆ operator<=() [4/6]

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

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

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

◆ operator<=() [5/6]

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

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

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

◆ operator<=() [6/6]

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

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

3061  {
3062  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3063  }
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 z3::operator== ( double  a,
expr const &  b 
)
inline

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

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

◆ operator==() [2/8]

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

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

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

◆ operator==() [3/8]

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

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

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

◆ operator==() [4/8]

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

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

1645  {
1646  check_context(a, b);
1647  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1648  a.check_error();
1649  return expr(a.ctx(), r);
1650  }
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 z3::operator== ( expr const &  a,
int  b 
)
inline

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

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

◆ operator==() [6/8]

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

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

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

◆ operator==() [7/8]

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

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

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

◆ operator==() [8/8]

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

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

3081  {
3082  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3083  }
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 z3::operator> ( double  p1,
probe const &  p2 
)
inline

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

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

◆ operator>() [2/6]

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

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

1853  {
1854  check_context(a, b);
1855  Z3_ast r = 0;
1856  if (a.is_arith() && b.is_arith()) {
1857  r = Z3_mk_gt(a.ctx(), a, b);
1858  }
1859  else if (a.is_bv() && b.is_bv()) {
1860  r = Z3_mk_bvsgt(a.ctx(), a, b);
1861  }
1862  else if (a.is_fpa() && b.is_fpa()) {
1863  r = Z3_mk_fpa_gt(a.ctx(), a, b);
1864  }
1865  else {
1866  // operator is not supported by given arguments.
1867  assert(false);
1868  }
1869  a.check_error();
1870  return expr(a.ctx(), r);
1871  }
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 z3::operator> ( expr const &  a,
int  b 
)
inline

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

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

◆ operator>() [4/6]

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

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

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

◆ operator>() [5/6]

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

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

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

◆ operator>() [6/6]

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

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

3076  {
3077  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3078  }
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 z3::operator>= ( double  p1,
probe const &  p2 
)
inline

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

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

◆ operator>=() [2/6]

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

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

1722  {
1723  check_context(a, b);
1724  Z3_ast r = 0;
1725  if (a.is_arith() && b.is_arith()) {
1726  r = Z3_mk_ge(a.ctx(), a, b);
1727  }
1728  else if (a.is_bv() && b.is_bv()) {
1729  r = Z3_mk_bvsge(a.ctx(), a, b);
1730  }
1731  else if (a.is_fpa() && b.is_fpa()) {
1732  r = Z3_mk_fpa_geq(a.ctx(), a, b);
1733  }
1734  else {
1735  // operator is not supported by given arguments.
1736  assert(false);
1737  }
1738  a.check_error();
1739  return expr(a.ctx(), r);
1740  }
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 z3::operator>= ( expr const &  a,
int  b 
)
inline

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

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

◆ operator>=() [4/6]

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

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

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

◆ operator>=() [5/6]

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

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

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

◆ operator>=() [6/6]

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

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

3066  {
3067  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3068  }
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 z3::operator^ ( expr const &  a,
expr const &  b 
)
inline

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

1879 { check_context(a, b); Z3_ast r = a.is_bool() ? Z3_mk_xor(a.ctx(), a, b) : Z3_mk_bvxor(a.ctx(), a, b); 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 z3::operator^ ( expr const &  a,
int  b 
)
inline

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

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

◆ operator^() [3/3]

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

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

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

◆ operator|() [1/4]

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

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

1883 { if (a.is_bool()) return a || b; check_context(a, b); Z3_ast r = Z3_mk_bvor(a.ctx(), a, b); 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 z3::operator| ( expr const &  a,
int  b 
)
inline

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

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

◆ operator|() [3/4]

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

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

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

◆ operator|() [4/4]

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

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

2980  {
2981  check_context(t1, t2);
2982  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2983  t1.check_error();
2984  return tactic(t1.ctx(), r);
2985  }
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 z3::operator|| ( bool  a,
expr const &  b 
)
inline
Precondition
b.is_bool()

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

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

◆ operator||() [2/4]

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

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

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

◆ operator||() [3/4]

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

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

1632  {
1633  check_context(a, b);
1634  assert(a.is_bool() && b.is_bool());
1635  Z3_ast args[2] = { a, b };
1636  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1637  a.check_error();
1638  return expr(a.ctx(), r);
1639  }

◆ operator||() [4/4]

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

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

3089  {
3090  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3091  }
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 z3::operator~ ( expr const &  a)
inline

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

1966 { 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 z3::option ( expr const &  re)
inline

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

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

◆ par_and_then()

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

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

3012  {
3013  check_context(t1, t2);
3014  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
3015  t1.check_error();
3016  return tactic(t1.ctx(), r);
3017  }
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 z3::par_or ( unsigned  n,
tactic const *  tactics 
)
inline

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

3003  {
3004  if (n == 0) {
3005  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
3006  }
3007  array<Z3_tactic> buffer(n);
3008  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
3009  return tactic(tactics[0u].ctx(), Z3_tactic_par_or(tactics[0u].ctx(), n, buffer.ptr()));
3010  }
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.
def tactics(ctx=None)
Definition: z3py.py:8396
#define Z3_THROW(x)
Definition: z3++.h:101

◆ partial_order()

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

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

2210  {
2211  return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
2212  }
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 z3::pbeq ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2351  {
2352  assert(es.size() > 0);
2353  context& ctx = es[0u].ctx();
2354  array<Z3_ast> _es(es);
2355  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2356  ctx.check_error();
2357  return expr(ctx, r);
2358  }
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 z3::pbge ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2343  {
2344  assert(es.size() > 0);
2345  context& ctx = es[0u].ctx();
2346  array<Z3_ast> _es(es);
2347  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2348  ctx.check_error();
2349  return expr(ctx, r);
2350  }
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 z3::pble ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2335  {
2336  assert(es.size() > 0);
2337  context& ctx = es[0u].ctx();
2338  array<Z3_ast> _es(es);
2339  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2340  ctx.check_error();
2341  return expr(ctx, r);
2342  }
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 z3::piecewise_linear_order ( sort const &  a,
unsigned  index 
)
inline

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

2213  {
2214  return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
2215  }
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 z3::plus ( expr const &  re)
inline

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

3787  {
3788  MK_EXPR1(Z3_mk_re_plus, re);
3789  }
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.

◆ prefixof()

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

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

3763  {
3764  check_context(a, b);
3765  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3766  a.check_error();
3767  return expr(a.ctx(), r);
3768  }
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 z3::pw ( expr const &  a,
expr const &  b 
)
inline

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

1576 { _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.

◆ pw() [2/3]

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

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

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

◆ pw() [3/3]

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

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

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

◆ range()

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

◆ re_complement()

expr z3::re_complement ( expr const &  a)
inline

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

3821  {
3823  }
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 z3::re_diff ( expr const &  a,
expr const &  b 
)
inline

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

3814  {
3815  check_context(a, b);
3816  context& ctx = a.ctx();
3817  Z3_ast r = Z3_mk_re_diff(ctx, a, b);
3818  ctx.check_error();
3819  return expr(ctx, r);
3820  }
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 z3::re_empty ( sort const &  s)
inline

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

3796  {
3797  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3798  s.check_error();
3799  return expr(s.ctx(), r);
3800  }
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 z3::re_full ( sort const &  s)
inline

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

3801  {
3802  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3803  s.check_error();
3804  return expr(s.ctx(), r);
3805  }
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 z3::re_intersect ( expr_vector const &  args)
inline

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

3806  {
3807  assert(args.size() > 0);
3808  context& ctx = args[0u].ctx();
3809  array<Z3_ast> _args(args);
3810  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3811  ctx.check_error();
3812  return expr(ctx, r);
3813  }
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 z3::recfun ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  range 
)
inline

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

3638  {
3639  return range.ctx().recfun(name, d1, d2, range);
3640  }
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3411

◆ recfun() [2/4]

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

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

3635  {
3636  return range.ctx().recfun(name, d1, range);
3637  }

◆ recfun() [3/4]

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

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

3632  {
3633  return range.ctx().recfun(name, arity, domain, range);
3634  }

◆ recfun() [4/4]

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

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

3629  {
3630  return range.ctx().recfun(name, arity, domain, range);
3631  }

◆ rem() [1/3]

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

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

1596  {
1597  if (a.is_fpa() && b.is_fpa()) {
1598  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1599  } else {
1600  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1601  }
1602  }
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.

◆ rem() [2/3]

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

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

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

◆ rem() [3/3]

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

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

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

◆ repeat()

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

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

2987  {
2988  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
2989  t.check_error();
2990  return tactic(t.ctx(), r);
2991  }
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:1905

◆ reset_params()

void z3::reset_params ( )
inline

Definition at line 81 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 z3::round_fpa_to_closest_integer ( expr const &  t)
inline

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

2019  {
2020  assert(t.is_fpa());
2021  Z3_ast r = Z3_mk_fpa_round_to_integral(t.ctx(), t.ctx().fpa_rounding_mode(), t);
2022  t.check_error();
2023  return expr(t.ctx(), r);
2024  }
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 z3::sbv_to_fpa ( expr const &  t,
sort  s 
)
inline

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

1998  {
1999  assert(t.is_bv());
2000  Z3_ast r = Z3_mk_fpa_to_fp_signed(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2001  t.check_error();
2002  return expr(t.ctx(), r);
2003  }
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.

◆ select() [1/3]

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

forward declarations

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

3642  {
3643  check_context(a, i);
3644  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3645  a.check_error();
3646  return expr(a.ctx(), r);
3647  }
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[](), and select().

◆ select() [2/3]

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

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

3651  {
3652  check_context(a, i);
3653  array<Z3_ast> idxs(i);
3654  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3655  a.check_error();
3656  return expr(a.ctx(), r);
3657  }
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 z3::select ( expr const &  a,
int  i 
)
inline

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

3648  {
3649  return select(a, a.ctx().num_val(i, a.get_sort().array_domain()));
3650  }
expr select(expr const &a, int i)
Definition: z3++.h:3648

◆ set_add()

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

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

3708  {
3709  MK_EXPR2(Z3_mk_set_add, s, e);
3710  }
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 z3::set_complement ( expr const &  a)
inline

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

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

◆ set_del()

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

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

3712  {
3713  MK_EXPR2(Z3_mk_set_del, s, e);
3714  }
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 z3::set_difference ( expr const &  a,
expr const &  b 
)
inline

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

3732  {
3734  }
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 z3::set_intersect ( expr const &  a,
expr const &  b 
)
inline

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

3724  {
3725  check_context(a, b);
3726  Z3_ast es[2] = { a, b };
3727  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3728  a.check_error();
3729  return expr(a.ctx(), r);
3730  }
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 z3::set_member ( expr const &  s,
expr const &  e 
)
inline

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

3740  {
3741  MK_EXPR2(Z3_mk_set_member, s, e);
3742  }
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 z3::set_param ( char const *  param,
bool  value 
)
inline

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

79 { 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 z3::set_param ( char const *  param,
char const *  value 
)
inline

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

78 { Z3_global_param_set(param, value); }

◆ set_param() [3/3]

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

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

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

◆ set_subset()

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

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

3744  {
3745  MK_EXPR2(Z3_mk_set_subset, a, b);
3746  }
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 z3::set_union ( expr const &  a,
expr const &  b 
)
inline

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

3716  {
3717  check_context(a, b);
3718  Z3_ast es[2] = { a, b };
3719  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
3720  a.check_error();
3721  return expr(a.ctx(), r);
3722  }
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 z3::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 2205 of file z3++.h.

2205 { 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 z3::sge ( expr const &  a,
expr const &  b 
)
inline

signed greater than or equal to operator for bitvectors.

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

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

Referenced by sge().

◆ sge() [2/3]

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

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

2079 { return sge(a, a.ctx().num_val(b, a.get_sort())); }
expr sge(int a, expr const &b)
Definition: z3++.h:2080

◆ sge() [3/3]

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

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

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

◆ sgt() [1/3]

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

signed greater than operator for bitvectors.

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

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

Referenced by sgt().

◆ sgt() [2/3]

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

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

2085 { return sgt(a, a.ctx().num_val(b, a.get_sort())); }
expr sgt(int a, expr const &b)
Definition: z3++.h:2086

◆ sgt() [3/3]

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

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

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

◆ shl() [1/3]

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

shift left operator for bitvectors

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

2144 { 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().

◆ shl() [2/3]

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

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

2145 { return shl(a, a.ctx().num_val(b, a.get_sort())); }
expr shl(int a, expr const &b)
Definition: z3++.h:2146

◆ shl() [3/3]

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

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

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

◆ sle() [1/3]

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

signed less than or equal to operator for bitvectors.

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

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

Referenced by sle().

◆ sle() [2/3]

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

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

2067 { return sle(a, a.ctx().num_val(b, a.get_sort())); }
expr sle(int a, expr const &b)
Definition: z3++.h:2068

◆ sle() [3/3]

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

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

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

◆ slt() [1/3]

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

signed less than operator for bitvectors.

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

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

Referenced by slt().

◆ slt() [2/3]

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

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

2073 { return slt(a, a.ctx().num_val(b, a.get_sort())); }
expr slt(int a, expr const &b)
Definition: z3++.h:2074

◆ slt() [3/3]

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

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

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

◆ smod() [1/3]

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

signed modulus operator for bitvectors

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

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

Referenced by smod().

◆ smod() [2/3]

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

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

2131 { return smod(a, a.ctx().num_val(b, a.get_sort())); }
expr smod(int a, expr const &b)
Definition: z3++.h:2132

◆ smod() [3/3]

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

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

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

◆ sqrt()

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

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

1952  {
1953  check_context(a, rm);
1954  assert(a.is_fpa());
1955  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
1956  a.check_error();
1957  return expr(a.ctx(), r);
1958  }
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 z3::srem ( expr const &  a,
expr const &  b 
)
inline

signed remainder operator for bitvectors

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

2123 { 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().

◆ srem() [2/3]

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

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

2124 { return srem(a, a.ctx().num_val(b, a.get_sort())); }
expr srem(int a, expr const &b)
Definition: z3++.h:2125

◆ srem() [3/3]

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

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

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

◆ star()

expr z3::star ( expr const &  re)
inline

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

3793  {
3794  MK_EXPR1(Z3_mk_re_star, re);
3795  }
Z3_ast Z3_API Z3_mk_re_star(Z3_context c, Z3_ast re)
Create the regular language re*.

◆ store() [1/5]

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

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

3659  {
3660  check_context(a, i); check_context(a, v);
3661  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3662  a.check_error();
3663  return expr(a.ctx(), r);
3664  }
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() [2/5]

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

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

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

◆ store() [3/5]

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

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

3671  {
3672  check_context(a, i); check_context(a, v);
3673  array<Z3_ast> idxs(i);
3674  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3675  a.check_error();
3676  return expr(a.ctx(), r);
3677  }
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 z3::store ( expr const &  a,
int  i,
expr const &  v 
)
inline

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

3666 { return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), v); }

◆ store() [5/5]

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

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

3668  {
3669  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
3670  }

◆ suffixof()

expr z3::suffixof ( expr const &  a,
expr const &  b 
)
inline

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

3757  {
3758  check_context(a, b);
3759  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3760  a.check_error();
3761  return expr(a.ctx(), r);
3762  }
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 z3::sum ( expr_vector const &  args)
inline

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

2375  {
2376  assert(args.size() > 0);
2377  context& ctx = args[0u].ctx();
2378  array<Z3_ast> _args(args);
2379  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
2380  ctx.check_error();
2381  return expr(ctx, r);
2382  }

◆ to_check_result()

check_result z3::to_check_result ( Z3_lbool  l)
inline

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

145  {
146  if (l == Z3_L_TRUE) return sat;
147  else if (l == Z3_L_FALSE) return unsat;
148  return unknown;
149  }
@ Z3_L_TRUE
Definition: z3_api.h:105
@ Z3_L_FALSE
Definition: z3_api.h:103

Referenced by solver::check(), optimize::check(), solver::consequences(), and fixedpoint::query().

◆ to_expr()

expr z3::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 2044 of file z3++.h.

2044  {
2045  c.check_error();
2046  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
2047  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
2048  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
2050  return expr(c, a);
2051  }
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:183
@ Z3_VAR_AST
Definition: z3_api.h:184
@ Z3_NUMERAL_AST
Definition: z3_api.h:182
@ Z3_QUANTIFIER_AST
Definition: z3_api.h:185

Referenced by ashr(), lshr(), sext(), sge(), sgt(), shl(), sle(), slt(), smod(), srem(), udiv(), uge(), ugt(), ule(), ult(), urem(), and zext().

◆ to_func_decl()

func_decl z3::to_func_decl ( context c,
Z3_func_decl  f 
)
inline

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

2058  {
2059  c.check_error();
2060  return func_decl(c, f);
2061  }

Referenced by linear_order(), partial_order(), piecewise_linear_order(), and tree_order().

◆ to_re()

expr z3::to_re ( expr const &  s)
inline

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

3781  {
3783  }
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 z3::to_real ( expr const &  a)
inline

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

3599 { 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 z3::to_sort ( context c,
Z3_sort  s 
)
inline

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

2053  {
2054  c.check_error();
2055  return sort(c, s);
2056  }

Referenced by context::enumeration_sort(), context::tuple_sort(), and context::uninterpreted_sort().

◆ tree_order()

func_decl z3::tree_order ( sort const &  a,
unsigned  index 
)
inline

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

2216  {
2217  return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
2218  }
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 z3::try_for ( tactic const &  t,
unsigned  ms 
)
inline

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

2998  {
2999  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
3000  t.check_error();
3001  return tactic(t.ctx(), r);
3002  }
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 z3::ubv_to_fpa ( expr const &  t,
sort  s 
)
inline

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

2005  {
2006  assert(t.is_bv());
2007  Z3_ast r = Z3_mk_fpa_to_fp_unsigned(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2008  t.check_error();
2009  return expr(t.ctx(), r);
2010  }
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 z3::udiv ( expr const &  a,
expr const &  b 
)
inline

unsigned division operator for bitvectors.

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

2116 { 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().

◆ udiv() [2/3]

expr z3::udiv ( expr const &  a,
int  b 
)
inline

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

2117 { return udiv(a, a.ctx().num_val(b, a.get_sort())); }
expr udiv(int a, expr const &b)
Definition: z3++.h:2118

◆ udiv() [3/3]

expr z3::udiv ( int  a,
expr const &  b 
)
inline

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

2118 { return udiv(b.ctx().num_val(a, b.get_sort()), b); }

◆ uge() [1/3]

expr z3::uge ( expr const &  a,
expr const &  b 
)
inline

unsigned greater than or equal to operator for bitvectors.

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

2104 { return to_expr(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b)); }

Referenced by uge().

◆ uge() [2/3]

expr z3::uge ( expr const &  a,
int  b 
)
inline

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

2105 { return uge(a, a.ctx().num_val(b, a.get_sort())); }
expr uge(int a, expr const &b)
Definition: z3++.h:2106

◆ uge() [3/3]

expr z3::uge ( int  a,
expr const &  b 
)
inline

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

2106 { return uge(b.ctx().num_val(a, b.get_sort()), b); }

◆ ugt() [1/3]

expr z3::ugt ( expr const &  a,
expr const &  b 
)
inline

unsigned greater than operator for bitvectors.

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

2110 { 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().

◆ ugt() [2/3]

expr z3::ugt ( expr const &  a,
int  b 
)
inline

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

2111 { return ugt(a, a.ctx().num_val(b, a.get_sort())); }
expr ugt(int a, expr const &b)
Definition: z3++.h:2112

◆ ugt() [3/3]

expr z3::ugt ( int  a,
expr const &  b 
)
inline

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

2112 { return ugt(b.ctx().num_val(a, b.get_sort()), b); }

◆ ule() [1/3]

expr z3::ule ( expr const &  a,
expr const &  b 
)
inline

unsigned less than or equal to operator for bitvectors.

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

2092 { 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().

◆ ule() [2/3]

expr z3::ule ( expr const &  a,
int  b 
)
inline

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

2093 { return ule(a, a.ctx().num_val(b, a.get_sort())); }
expr ule(int a, expr const &b)
Definition: z3++.h:2094

◆ ule() [3/3]

expr z3::ule ( int  a,
expr const &  b 
)
inline

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

2094 { return ule(b.ctx().num_val(a, b.get_sort()), b); }

◆ ult() [1/3]

expr z3::ult ( expr const &  a,
expr const &  b 
)
inline

unsigned less than operator for bitvectors.

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

2098 { 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().

◆ ult() [2/3]

expr z3::ult ( expr const &  a,
int  b 
)
inline

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

2099 { return ult(a, a.ctx().num_val(b, a.get_sort())); }
expr ult(int a, expr const &b)
Definition: z3++.h:2100

◆ ult() [3/3]

expr z3::ult ( int  a,
expr const &  b 
)
inline

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

2100 { return ult(b.ctx().num_val(a, b.get_sort()), b); }

◆ urem() [1/3]

expr z3::urem ( expr const &  a,
expr const &  b 
)
inline

unsigned reminder operator for bitvectors

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

2137 { 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().

◆ urem() [2/3]

expr z3::urem ( expr const &  a,
int  b 
)
inline

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

2138 { return urem(a, a.ctx().num_val(b, a.get_sort())); }
expr urem(int a, expr const &b)
Definition: z3++.h:2139

◆ urem() [3/3]

expr z3::urem ( int  a,
expr const &  b 
)
inline

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

2139 { return urem(b.ctx().num_val(a, b.get_sort()), b); }

◆ when()

tactic z3::when ( probe const &  p,
tactic const &  t 
)
inline

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

3263  {
3264  check_context(p, t);
3265  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
3266  t.check_error();
3267  return tactic(t.ctx(), r);
3268  }
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()

tactic z3::with ( tactic const &  t,
params const &  p 
)
inline

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

2993  {
2994  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2995  t.check_error();
2996  return tactic(t.ctx(), r);
2997  }
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 z3::xnor ( expr const &  a,
expr const &  b 
)
inline

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

1889 { if (a.is_bool()) return !(a ^ b); check_context(a, b); Z3_ast r = Z3_mk_bvxnor(a.ctx(), a, b); 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 z3::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 2165 of file z3++.h.

2165 { 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,...