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 1931 of file z3++.h.

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

3678  {
3679  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3680  f.check_error();
3681  return expr(f.ctx(), r);
3682  }
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 2157 of file z3++.h.

2157 { 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:2043

Referenced by ashr().

◆ ashr() [2/3]

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

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

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

◆ ashr() [3/3]

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

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

2159 { 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 2366 of file z3++.h.

2366  {
2367  assert(es.size() > 0);
2368  context& ctx = es[0U].ctx();
2369  array<Z3_ast> _es(es);
2370  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2371  ctx.check_error();
2372  return expr(ctx, r);
2373  }
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 2358 of file z3++.h.

2358  {
2359  assert(es.size() > 0);
2360  context& ctx = es[0U].ctx();
2361  array<Z3_ast> _es(es);
2362  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2363  ctx.check_error();
2364  return expr(ctx, r);
2365  }
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 2169 of file z3++.h.

2169 { 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 2175 of file z3++.h.

2175  {
2176  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);
2177  }
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 2178 of file z3++.h.

2178  {
2179  check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2180  }
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 2193 of file z3++.h.

2193  {
2194  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);
2195  }
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 2196 of file z3++.h.

2196  {
2197  check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2198  }
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 2190 of file z3++.h.

2190  {
2191  Z3_ast r = Z3_mk_bvneg_no_overflow(a.ctx(), a); a.check_error(); return expr(a.ctx(), r);
2192  }
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 1925 of file z3++.h.

1925  {
1926  assert(a.is_bv());
1927  Z3_ast r = Z3_mk_bvredand(a.ctx(), a);
1928  a.check_error();
1929  return expr(a.ctx(), r);
1930  }
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 1919 of file z3++.h.

1919  {
1920  assert(a.is_bv());
1921  Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
1922  a.check_error();
1923  return expr(a.ctx(), r);
1924  }
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 2187 of file z3++.h.

2187  {
2188  check_context(a, b); Z3_ast r = Z3_mk_bvsdiv_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2189  }
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 2181 of file z3++.h.

2181  {
2182  check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2183  }
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 2184 of file z3++.h.

2184  {
2185  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);
2186  }
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 2392 of file z3++.h.

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

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

◆ cond()

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

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

3268  {
3269  check_context(p, t1); check_context(p, t2);
3270  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
3271  t1.check_error();
3272  return tactic(t1.ctx(), r);
3273  }
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 3695 of file z3++.h.

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

◆ distinct()

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

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

2383  {
2384  assert(args.size() > 0);
2385  context& ctx = args[0U].ctx();
2386  array<Z3_ast> _args(args);
2387  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2388  ctx.check_error();
2389  return expr(ctx, r);
2390  }
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 3751 of file z3++.h.

3751  {
3752  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3753  s.check_error();
3754  return expr(s.ctx(), r);
3755  }
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 3699 of file z3++.h.

3699  {
3701  }
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:3684

◆ 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 2285 of file z3++.h.

2285  {
2286  check_context(x, b);
2287  Z3_app vars[] = {(Z3_app) x};
2288  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2289  }
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 2290 of file z3++.h.

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

◆ exists() [3/5]

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

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

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

◆ 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 2300 of file z3++.h.

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

◆ exists() [5/5]

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

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

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

◆ fail_if()

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

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

3257  {
3258  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
3259  p.check_error();
3260  return tactic(p.ctx(), r);
3261  }
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 1967 of file z3++.h.

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

2261  {
2262  check_context(x, b);
2263  Z3_app vars[] = {(Z3_app) x};
2264  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2265  }
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 2266 of file z3++.h.

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

◆ forall() [3/5]

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

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

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

◆ 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 2276 of file z3++.h.

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

◆ forall() [5/5]

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

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

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

◆ fp_eq()

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

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

1958  {
1959  check_context(a, b);
1960  assert(a.is_fpa());
1961  Z3_ast r = Z3_mk_fpa_eq(a.ctx(), a, b);
1962  a.check_error();
1963  return expr(a.ctx(), r);
1964  }
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 1975 of file z3++.h.

1975  {
1976  check_context(sgn, exp); check_context(exp, sig);
1977  assert(sgn.is_bv() && exp.is_bv() && sig.is_bv());
1978  Z3_ast r = Z3_mk_fpa_fp(sgn.ctx(), sgn, exp, sig);
1979  sgn.check_error();
1980  return expr(sgn.ctx(), r);
1981  }
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 2011 of file z3++.h.

2011  {
2012  assert(t.is_fpa());
2013  Z3_ast r = Z3_mk_fpa_to_fp_float(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2014  t.check_error();
2015  return expr(t.ctx(), r);
2016  }
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 1983 of file z3++.h.

1983  {
1984  assert(t.is_fpa());
1985  Z3_ast r = Z3_mk_fpa_to_sbv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
1986  t.check_error();
1987  return expr(t.ctx(), r);
1988  }
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 1990 of file z3++.h.

1990  {
1991  assert(t.is_fpa());
1992  Z3_ast r = Z3_mk_fpa_to_ubv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
1993  t.check_error();
1994  return expr(t.ctx(), r);
1995  }
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 3703 of file z3++.h.

3703  {
3705  }
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 3618 of file z3++.h.

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

◆ 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 3615 of file z3++.h.

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

◆ 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 3612 of file z3++.h.

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

◆ function() [4/9]

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

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

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

◆ function() [5/9]

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

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

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

◆ function() [6/9]

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

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

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

◆ function() [7/9]

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

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

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

◆ function() [8/9]

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

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

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

◆ function() [9/9]

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

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

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

◆ implies() [1/3]

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

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

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

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

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

◆ in_re()

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

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

3783  {
3784  MK_EXPR2(Z3_mk_seq_in_re, s, re);
3785  }
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 3768 of file z3++.h.

3768  {
3769  check_context(s, substr); check_context(s, offset);
3770  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3771  s.check_error();
3772  return expr(s.ctx(), r);
3773  }
Z3_ast Z3_API Z3_mk_seq_index(Z3_context c, Z3_ast s, Z3_ast substr, Z3_ast offset)
Return index of first occurrence of substr in s starting from offset offset. If s does not contain su...

◆ int2bv()

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

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

2170 { 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 1615 of file z3++.h.

1615 { _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:1607

◆ 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 2030 of file z3++.h.

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

◆ lambda() [1/5]

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

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

2309  {
2310  check_context(x, b);
2311  Z3_app vars[] = {(Z3_app) x};
2312  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
2313  }
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 2314 of file z3++.h.

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

◆ lambda() [3/5]

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

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

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

◆ 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 2324 of file z3++.h.

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

◆ lambda() [5/5]

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

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

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

◆ last_indexof()

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

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

3774  {
3775  check_context(s, substr);
3776  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
3777  s.check_error();
3778  return expr(s.ctx(), r);
3779  }
Z3_ast Z3_API Z3_mk_seq_last_index(Z3_context c, Z3_ast, Z3_ast substr)
Return the last occurrence of substr in s. If s does not contain substr, then the value is -1,...

◆ linear_order()

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

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

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

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

2150 { 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 2151 of file z3++.h.

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

◆ lshr() [3/3]

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

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

2152 { 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 1904 of file z3++.h.

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

1889  {
1890  check_context(a, b);
1891  Z3_ast r;
1892  if (a.is_arith()) {
1893  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1894  }
1895  else if (a.is_bv()) {
1896  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1897  }
1898  else {
1899  assert(a.is_fpa());
1900  r = Z3_mk_fpa_min(a.ctx(), a, b);
1901  }
1902  return expr(a.ctx(), r);
1903  }
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 2442 of file z3++.h.

2442  {
2443  array<Z3_ast> _args(args);
2444  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2445  args.check_error();
2446  return expr(args.ctx(), r);
2447  }
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 2436 of file z3++.h.

2436  {
2437  array<Z3_ast> _args(args);
2438  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2439  args.check_error();
2440  return expr(args.ctx(), r);
2441  }
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 2448 of file z3++.h.

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

◆ mod() [1/3]

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

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

1579  {
1580  if (a.is_bv()) {
1581  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1582  }
1583  else {
1584  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1585  }
1586  }
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 1587 of file z3++.h.

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

◆ mod() [3/3]

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

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

1588 { 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 1886 of file z3++.h.

1886 { 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 1887 of file z3++.h.

1887 { 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 1613 of file z3++.h.

1613 { 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 3091 of file z3++.h.

3091  {
3092  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
3093  }
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 1665 of file z3++.h.

1665 { 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 1664 of file z3++.h.

1664 { 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 1655 of file z3++.h.

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

◆ operator!=() [4/5]

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

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

1662 { 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 1663 of file z3++.h.

1663 { 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 1590 of file z3++.h.

1590 { return mod(a, b); }

◆ operator%() [2/3]

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

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

1591 { return mod(a, b); }

◆ operator%() [3/3]

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

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

1592 { return mod(a, b); }

◆ operator&() [1/4]

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

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

1874 { 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 1875 of file z3++.h.

1875 { 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 1876 of file z3++.h.

1876 { 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 2972 of file z3++.h.

2972  {
2973  check_context(t1, t2);
2974  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2975  t1.check_error();
2976  return tactic(t1.ctx(), r);
2977  }
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 1629 of file z3++.h.

1629 { 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 1628 of file z3++.h.

1628 { 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 1619 of file z3++.h.

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

◆ operator&&() [4/4]

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

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

3085  {
3086  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3087  }
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 1697 of file z3++.h.

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

1717 { 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 1718 of file z3++.h.

1718 { 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 1667 of file z3++.h.

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

◆ operator+() [2/3]

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

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

1694 { 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 1695 of file z3++.h.

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

◆ operator-() [1/4]

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

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

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

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

1802 { 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 1803 of file z3++.h.

1803 { 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 1741 of file z3++.h.

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

1760 { 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 1761 of file z3++.h.

1761 { 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 3074 of file z3++.h.

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

◆ operator<() [2/6]

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

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

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

1849 { 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 1850 of file z3++.h.

1850 { 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 3073 of file z3++.h.

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

◆ operator<() [6/6]

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

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

3070  {
3071  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3072  }
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 2930 of file z3++.h.

2930 { 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 2624 of file z3++.h.

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

◆ 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 3255 of file z3++.h.

3255 { 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 2906 of file z3++.h.

2906 { 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 2592 of file z3++.h.

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

◆ operator<<() [8/13]

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

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

3197 { 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 2847 of file z3++.h.

2847 { 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 2621 of file z3++.h.

2621 { 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 3064 of file z3++.h.

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

◆ operator<=() [2/6]

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

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

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

1824 { 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 1825 of file z3++.h.

1825 { 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 3063 of file z3++.h.

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

◆ operator<=() [6/6]

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

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

3060  {
3061  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3062  }
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 1653 of file z3++.h.

1653 { 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 3084 of file z3++.h.

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

◆ operator==() [3/8]

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

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

1652 { 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 1644 of file z3++.h.

1644  {
1645  check_context(a, b);
1646  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1647  a.check_error();
1648  return expr(a.ctx(), r);
1649  }
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 1650 of file z3++.h.

1650 { 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 1651 of file z3++.h.

1651 { 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 3083 of file z3++.h.

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

◆ operator==() [8/8]

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

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

3080  {
3081  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3082  }
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 3079 of file z3++.h.

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

◆ operator>() [2/6]

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

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

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

1871 { 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 1872 of file z3++.h.

1872 { 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 3078 of file z3++.h.

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

◆ operator>() [6/6]

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

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

3075  {
3076  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3077  }
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 3069 of file z3++.h.

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

◆ operator>=() [2/6]

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

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

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

1827 { 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 1828 of file z3++.h.

1828 { 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 3068 of file z3++.h.

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

◆ operator>=() [6/6]

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

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

3065  {
3066  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3067  }
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 1878 of file z3++.h.

1878 { 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 1879 of file z3++.h.

1879 { 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 1880 of file z3++.h.

1880 { 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 1882 of file z3++.h.

1882 { 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 1883 of file z3++.h.

1883 { 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 1884 of file z3++.h.

1884 { 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 2979 of file z3++.h.

2979  {
2980  check_context(t1, t2);
2981  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2982  t1.check_error();
2983  return tactic(t1.ctx(), r);
2984  }
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 1642 of file z3++.h.

1642 { 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 1640 of file z3++.h.

1640 { 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 1631 of file z3++.h.

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

◆ operator||() [4/4]

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

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

3088  {
3089  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3090  }
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 1965 of file z3++.h.

1965 { 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 3789 of file z3++.h.

3789  {
3791  }
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 3011 of file z3++.h.

3011  {
3012  check_context(t1, t2);
3013  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
3014  t1.check_error();
3015  return tactic(t1.ctx(), r);
3016  }
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 3002 of file z3++.h.

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

◆ partial_order()

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

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

2209  {
2210  return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
2211  }
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 2350 of file z3++.h.

2350  {
2351  assert(es.size() > 0);
2352  context& ctx = es[0U].ctx();
2353  array<Z3_ast> _es(es);
2354  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2355  ctx.check_error();
2356  return expr(ctx, r);
2357  }
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 2342 of file z3++.h.

2342  {
2343  assert(es.size() > 0);
2344  context& ctx = es[0U].ctx();
2345  array<Z3_ast> _es(es);
2346  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2347  ctx.check_error();
2348  return expr(ctx, r);
2349  }
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 2334 of file z3++.h.

2334  {
2335  assert(es.size() > 0);
2336  context& ctx = es[0U].ctx();
2337  array<Z3_ast> _es(es);
2338  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2339  ctx.check_error();
2340  return expr(ctx, r);
2341  }
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 2212 of file z3++.h.

2212  {
2213  return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
2214  }
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 3786 of file z3++.h.

3786  {
3787  MK_EXPR1(Z3_mk_re_plus, re);
3788  }
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 3762 of file z3++.h.

3762  {
3763  check_context(a, b);
3764  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3765  a.check_error();
3766  return expr(a.ctx(), r);
3767  }
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 1575 of file z3++.h.

1575 { _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 1576 of file z3++.h.

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

◆ pw() [3/3]

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

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

1577 { 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 3820 of file z3++.h.

3820  {
3822  }
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 3813 of file z3++.h.

3813  {
3814  check_context(a, b);
3815  context& ctx = a.ctx();
3816  Z3_ast r = Z3_mk_re_diff(ctx, a, b);
3817  ctx.check_error();
3818  return expr(ctx, r);
3819  }
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 3795 of file z3++.h.

3795  {
3796  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3797  s.check_error();
3798  return expr(s.ctx(), r);
3799  }
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 3800 of file z3++.h.

3800  {
3801  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3802  s.check_error();
3803  return expr(s.ctx(), r);
3804  }
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 3805 of file z3++.h.

3805  {
3806  assert(args.size() > 0);
3807  context& ctx = args[0U].ctx();
3808  array<Z3_ast> _args(args);
3809  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3810  ctx.check_error();
3811  return expr(ctx, r);
3812  }
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 3637 of file z3++.h.

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

◆ recfun() [2/4]

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

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

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

◆ recfun() [3/4]

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

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

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

◆ recfun() [4/4]

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

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

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

◆ rem() [1/3]

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

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

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

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

◆ rem() [3/3]

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

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

1603 { 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 2986 of file z3++.h.

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

◆ 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 2018 of file z3++.h.

2018  {
2019  assert(t.is_fpa());
2020  Z3_ast r = Z3_mk_fpa_round_to_integral(t.ctx(), t.ctx().fpa_rounding_mode(), t);
2021  t.check_error();
2022  return expr(t.ctx(), r);
2023  }
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 1997 of file z3++.h.

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

3641  {
3642  check_context(a, i);
3643  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3644  a.check_error();
3645  return expr(a.ctx(), r);
3646  }
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 3650 of file z3++.h.

3650  {
3651  check_context(a, i);
3652  array<Z3_ast> idxs(i);
3653  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3654  a.check_error();
3655  return expr(a.ctx(), r);
3656  }
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 3647 of file z3++.h.

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

◆ set_add()

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

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

3707  {
3708  MK_EXPR2(Z3_mk_set_add, s, e);
3709  }
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 3735 of file z3++.h.

3735  {
3737  }
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 3711 of file z3++.h.

3711  {
3712  MK_EXPR2(Z3_mk_set_del, s, e);
3713  }
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 3731 of file z3++.h.

3731  {
3733  }
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 3723 of file z3++.h.

3723  {
3724  check_context(a, b);
3725  Z3_ast es[2] = { a, b };
3726  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3727  a.check_error();
3728  return expr(a.ctx(), r);
3729  }
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 3739 of file z3++.h.

3739  {
3740  MK_EXPR2(Z3_mk_set_member, s, e);
3741  }
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 3743 of file z3++.h.

3743  {
3744  MK_EXPR2(Z3_mk_set_subset, a, b);
3745  }
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 3715 of file z3++.h.

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

2204 { 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 2077 of file z3++.h.

2077 { 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 2078 of file z3++.h.

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

◆ sge() [3/3]

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

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

2079 { 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 2083 of file z3++.h.

2083 { 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 2084 of file z3++.h.

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

◆ sgt() [3/3]

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

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

2085 { 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 2143 of file z3++.h.

2143 { 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 2144 of file z3++.h.

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

◆ shl() [3/3]

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

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

2145 { 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 2065 of file z3++.h.

2065 { 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 2066 of file z3++.h.

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

◆ sle() [3/3]

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

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

2067 { 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 2071 of file z3++.h.

2071 { 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 2072 of file z3++.h.

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

◆ slt() [3/3]

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

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

2073 { 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 2129 of file z3++.h.

2129 { 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 2130 of file z3++.h.

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

◆ smod() [3/3]

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

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

2131 { 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 1951 of file z3++.h.

1951  {
1952  check_context(a, rm);
1953  assert(a.is_fpa());
1954  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
1955  a.check_error();
1956  return expr(a.ctx(), r);
1957  }
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 2122 of file z3++.h.

2122 { 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 2123 of file z3++.h.

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

◆ srem() [3/3]

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

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

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

◆ star()

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

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

3792  {
3793  MK_EXPR1(Z3_mk_re_star, re);
3794  }
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 3658 of file z3++.h.

3658  {
3659  check_context(a, i); check_context(a, v);
3660  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3661  a.check_error();
3662  return expr(a.ctx(), r);
3663  }
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 3666 of file z3++.h.

3666 { 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:3670

◆ store() [3/5]

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

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

3670  {
3671  check_context(a, i); check_context(a, v);
3672  array<Z3_ast> idxs(i);
3673  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3674  a.check_error();
3675  return expr(a.ctx(), r);
3676  }
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 3665 of file z3++.h.

3665 { 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 3667 of file z3++.h.

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

◆ suffixof()

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

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

3756  {
3757  check_context(a, b);
3758  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3759  a.check_error();
3760  return expr(a.ctx(), r);
3761  }
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 2374 of file z3++.h.

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

◆ 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 2043 of file z3++.h.

2043  {
2044  c.check_error();
2045  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
2046  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
2047  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
2049  return expr(c, a);
2050  }
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 2057 of file z3++.h.

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

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 3780 of file z3++.h.

3780  {
3782  }
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 3598 of file z3++.h.

3598 { 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 2052 of file z3++.h.

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

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 2215 of file z3++.h.

2215  {
2216  return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
2217  }
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 2997 of file z3++.h.

2997  {
2998  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
2999  t.check_error();
3000  return tactic(t.ctx(), r);
3001  }
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 2004 of file z3++.h.

2004  {
2005  assert(t.is_bv());
2006  Z3_ast r = Z3_mk_fpa_to_fp_unsigned(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2007  t.check_error();
2008  return expr(t.ctx(), r);
2009  }
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 2115 of file z3++.h.

2115 { 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 2116 of file z3++.h.

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

◆ udiv() [3/3]

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

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

2117 { 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 2103 of file z3++.h.

2103 { 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 2104 of file z3++.h.

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

◆ uge() [3/3]

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

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

2105 { 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 2109 of file z3++.h.

2109 { 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 2110 of file z3++.h.

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

◆ ugt() [3/3]

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

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

2111 { 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 2091 of file z3++.h.

2091 { 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 2092 of file z3++.h.

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

◆ ule() [3/3]

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

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

2093 { 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 2097 of file z3++.h.

2097 { 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 2098 of file z3++.h.

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

◆ ult() [3/3]

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

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

2099 { 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 2136 of file z3++.h.

2136 { 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 2137 of file z3++.h.

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

◆ urem() [3/3]

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

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

2138 { 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 3262 of file z3++.h.

3262  {
3263  check_context(p, t);
3264  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
3265  t.check_error();
3266  return tactic(t.ctx(), r);
3267  }
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 2992 of file z3++.h.

2992  {
2993  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2994  t.check_error();
2995  return tactic(t.ctx(), r);
2996  }
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 1888 of file z3++.h.

1888 { 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 2164 of file z3++.h.

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