Z3
Data Structures | Typedefs | Enumerations | Functions
z3 Namespace Reference

Z3 C++ namespace. More...

Data Structures

class  apply_result
 
class  array
 
class  ast
 
class  ast_vector_tpl
 
class  cast_ast
 
class  cast_ast< ast >
 
class  cast_ast< expr >
 
class  cast_ast< func_decl >
 
class  cast_ast< sort >
 
class  config
 Z3 global configuration object. More...
 
class  context
 A Context manages all other Z3 objects, global configuration options, etc. More...
 
class  exception
 Exception used to sign API usage errors. 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  fixedpoint
 
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  func_entry
 
class  func_interp
 
class  goal
 
class  model
 
class  object
 
class  optimize
 
class  param_descrs
 
class  params
 
class  probe
 
class  scoped_context
 
class  solver
 
class  sort
 A Z3 sort (aka type). Every expression (i.e., formula or term) in Z3 has a sort. More...
 
class  stats
 
class  symbol
 
class  tactic
 
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_complement (expr const &a)
 
expr range (expr const &lo, expr const &hi)
 

Detailed Description

Z3 C++ namespace.

Typedef Documentation

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

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

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

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

Enumeration Type Documentation

Enumerator
unsat 
sat 
unknown 

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

132  {
133  unsat, sat, unknown
134  };
Definition: z3++.h:133
Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

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

Function Documentation

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

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

1918  {
1919  Z3_ast r;
1920  if (a.is_int()) {
1921  expr zero = a.ctx().int_val(0);
1922  expr ge = a >= zero;
1923  expr na = -a;
1924  r = Z3_mk_ite(a.ctx(), ge, a, na);
1925  }
1926  else if (a.is_real()) {
1927  expr zero = a.ctx().real_val(0);
1928  expr ge = a >= zero;
1929  expr na = -a;
1930  r = Z3_mk_ite(a.ctx(), ge, a, na);
1931  }
1932  else {
1933  r = Z3_mk_fpa_abs(a.ctx(), a);
1934  }
1935  a.check_error();
1936  return expr(a.ctx(), r);
1937  }
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.
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).
expr z3::as_array ( func_decl f)
inline

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

3656  {
3657  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3658  f.check_error();
3659  return expr(f.ctx(), r);
3660  }
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...
expr z3::ashr ( expr const &  a,
expr const &  b 
)
inline

arithmetic shift right operator for bitvectors

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

Referenced by ashr().

2144 { 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:2030
expr z3::ashr ( expr const &  a,
int  b 
)
inline

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

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

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

2146 { return ashr(b.ctx().num_val(a, b.get_sort()), b); }
expr ashr(int a, expr const &b)
Definition: z3++.h:2146
expr z3::atleast ( expr_vector const &  es,
unsigned  bound 
)
inline

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

2353  {
2354  assert(es.size() > 0);
2355  context& ctx = es[0].ctx();
2356  array<Z3_ast> _es(es);
2357  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2358  ctx.check_error();
2359  return expr(ctx, r);
2360  }
Z3_ast Z3_API Z3_mk_atleast(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.
expr z3::atmost ( expr_vector const &  es,
unsigned  bound 
)
inline

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

2345  {
2346  assert(es.size() > 0);
2347  context& ctx = es[0].ctx();
2348  array<Z3_ast> _es(es);
2349  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2350  ctx.check_error();
2351  return expr(ctx, r);
2352  }
Z3_ast Z3_API Z3_mk_atmost(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.
expr z3::bv2int ( expr const &  a,
bool  is_signed 
)
inline

bit-vector and integer conversions.

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

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

bit-vector overflow/underflow checks

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

2162  {
2163  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);
2164  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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.
expr z3::bvadd_no_underflow ( expr const &  a,
expr const &  b 
)
inline

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

2165  {
2166  check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2167  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::bvmul_no_overflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

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

2180  {
2181  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);
2182  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::bvmul_no_underflow ( expr const &  a,
expr const &  b 
)
inline

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

2183  {
2184  check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2185  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::bvneg_no_overflow ( expr const &  a)
inline

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

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

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

1912  {
1913  assert(a.is_bv());
1914  Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
1915  a.check_error();
1916  return expr(a.ctx(), r);
1917  }
Z3_ast Z3_API Z3_mk_bvredor(Z3_context c, Z3_ast t1)
Take disjunction of bits in vector, return vector of length 1.
expr z3::bvredor ( expr const &  a)
inline

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

1906  {
1907  assert(a.is_bv());
1908  Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
1909  a.check_error();
1910  return expr(a.ctx(), r);
1911  }
Z3_ast Z3_API Z3_mk_bvredor(Z3_context c, Z3_ast t1)
Take disjunction of bits in vector, return vector of length 1.
expr z3::bvsdiv_no_overflow ( expr const &  a,
expr const &  b 
)
inline

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

2174  {
2175  check_context(a, b); Z3_ast r = Z3_mk_bvsdiv_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2176  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::bvsub_no_overflow ( expr const &  a,
expr const &  b 
)
inline

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

2168  {
2169  check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2170  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::bvsub_no_underflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

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

2171  {
2172  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);
2173  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
void z3::check_context ( object const &  a,
object const &  b 
)
inline
expr z3::concat ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by operator+().

2379  {
2380  check_context(a, b);
2381  Z3_ast r;
2382  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2383  Z3_ast _args[2] = { a, b };
2384  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2385  }
2386  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2387  Z3_ast _args[2] = { a, b };
2388  r = Z3_mk_re_concat(a.ctx(), 2, _args);
2389  }
2390  else {
2391  r = Z3_mk_concat(a.ctx(), a, b);
2392  }
2393  a.ctx().check_error();
2394  return expr(a.ctx(), r);
2395  }
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_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.
expr z3::concat ( expr_vector const &  args)
inline

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

2397  {
2398  Z3_ast r;
2399  assert(args.size() > 0);
2400  if (args.size() == 1) {
2401  return args[0];
2402  }
2403  context& ctx = args[0].ctx();
2404  array<Z3_ast> _args(args);
2405  if (Z3_is_seq_sort(ctx, args[0].get_sort())) {
2406  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2407  }
2408  else if (Z3_is_re_sort(ctx, args[0].get_sort())) {
2409  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2410  }
2411  else {
2412  r = _args[args.size()-1];
2413  for (unsigned i = args.size()-1; i > 0; ) {
2414  --i;
2415  r = Z3_mk_concat(ctx, _args[i], r);
2416  ctx.check_error();
2417  }
2418  }
2419  ctx.check_error();
2420  return expr(ctx, r);
2421  }
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_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.
tactic z3::cond ( probe const &  p,
tactic const &  t1,
tactic const &  t2 
)
inline

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

3254  {
3255  check_context(p, t1); check_context(p, t2);
3256  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
3257  t1.check_error();
3258  return tactic(t1.ctx(), r);
3259  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::const_array ( sort const &  d,
expr const &  v 
)
inline

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

3673  {
3674  MK_EXPR2(Z3_mk_const_array, d, v);
3675  }
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:3667
expr z3::distinct ( expr_vector const &  args)
inline

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

2370  {
2371  assert(args.size() > 0);
2372  context& ctx = args[0].ctx();
2373  array<Z3_ast> _args(args);
2374  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2375  ctx.check_error();
2376  return expr(ctx, r);
2377  }
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]).
expr z3::empty ( sort const &  s)
inline

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

3729  {
3730  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3731  s.check_error();
3732  return expr(s.ctx(), r);
3733  }
Z3_ast Z3_API Z3_mk_seq_empty(Z3_context c, Z3_sort seq)
Create an empty sequence of the sequence sort seq.
expr z3::empty_set ( sort const &  s)
inline

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

3677  {
3679  }
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:3662
bool z3::eq ( ast const &  a,
ast const &  b 
)
inline

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

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

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

2272  {
2273  check_context(x, b);
2274  Z3_app vars[] = {(Z3_app) x};
2275  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2276  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2277  {
2278  check_context(x1, b); check_context(x2, b);
2279  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2280  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2281  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  b 
)
inline

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

2282  {
2283  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2284  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2285  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2286  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  x4,
expr const &  b 
)
inline

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

2287  {
2288  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2289  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2290  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2291  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::exists ( expr_vector const &  xs,
expr const &  b 
)
inline

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

2292  {
2293  array<Z3_app> vars(xs);
2294  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);
2295  }
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.
tactic z3::fail_if ( probe const &  p)
inline

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

3243  {
3244  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
3245  p.check_error();
3246  return tactic(p.ctx(), r);
3247  }
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.
expr z3::fma ( expr const &  a,
expr const &  b,
expr const &  c,
expr const &  rm 
)
inline

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

1954  {
1955  check_context(a, b); check_context(a, c); check_context(a, rm);
1956  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
1957  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
1958  a.check_error();
1959  return expr(a.ctx(), r);
1960  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::forall ( expr const &  x,
expr const &  b 
)
inline

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

2248  {
2249  check_context(x, b);
2250  Z3_app vars[] = {(Z3_app) x};
2251  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2252  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::forall ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2253  {
2254  check_context(x1, b); check_context(x2, b);
2255  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2256  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2257  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::forall ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  b 
)
inline

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

2258  {
2259  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2260  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2261  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2262  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::forall ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  x4,
expr const &  b 
)
inline

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

2263  {
2264  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2265  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2266  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2267  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::forall ( expr_vector const &  xs,
expr const &  b 
)
inline

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

2268  {
2269  array<Z3_app> vars(xs);
2270  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);
2271  }
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...
expr z3::fp_eq ( expr const &  a,
expr const &  b 
)
inline

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

1945  {
1946  check_context(a, b);
1947  assert(a.is_fpa());
1948  Z3_ast r = Z3_mk_fpa_eq(a.ctx(), a, b);
1949  a.check_error();
1950  return expr(a.ctx(), r);
1951  }
Z3_ast Z3_API Z3_mk_fpa_eq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point equality.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::fpa_fp ( expr const &  sgn,
expr const &  exp,
expr const &  sig 
)
inline

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

1962  {
1963  check_context(sgn, exp); check_context(exp, sig);
1964  assert(sgn.is_bv() && exp.is_bv() && sig.is_bv());
1965  Z3_ast r = Z3_mk_fpa_fp(sgn.ctx(), sgn, exp, sig);
1966  sgn.check_error();
1967  return expr(sgn.ctx(), r);
1968  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::fpa_to_fpa ( expr const &  t,
sort  s 
)
inline

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

1998  {
1999  assert(t.is_fpa());
2000  Z3_ast r = Z3_mk_fpa_to_fp_float(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2001  t.check_error();
2002  return expr(t.ctx(), r);
2003  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_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.
expr z3::fpa_to_sbv ( expr const &  t,
unsigned  sz 
)
inline

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

1970  {
1971  assert(t.is_fpa());
1972  Z3_ast r = Z3_mk_fpa_to_sbv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
1973  t.check_error();
1974  return expr(t.ctx(), r);
1975  }
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.
expr z3::fpa_to_ubv ( expr const &  t,
unsigned  sz 
)
inline

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

1977  {
1978  assert(t.is_fpa());
1979  Z3_ast r = Z3_mk_fpa_to_ubv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
1980  t.check_error();
1981  return expr(t.ctx(), r);
1982  }
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.
expr z3::full_set ( sort const &  s)
inline

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

3681  {
3683  }
Z3_ast Z3_API Z3_mk_full_set(Z3_context c, Z3_sort domain)
Create the full set.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
func_decl z3::function ( symbol const &  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

3578  {
3579  return range.ctx().function(name, arity, domain, range);
3580  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
func_decl z3::function ( char const *  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

3581  {
3582  return range.ctx().function(name, arity, domain, range);
3583  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
func_decl z3::function ( char const *  name,
sort const &  domain,
sort const &  range 
)
inline

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

3584  {
3585  return range.ctx().function(name, domain, range);
3586  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
func_decl z3::function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  range 
)
inline

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

3587  {
3588  return range.ctx().function(name, d1, d2, range);
3589  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
func_decl z3::function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  d3,
sort const &  range 
)
inline

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

3590  {
3591  return range.ctx().function(name, d1, d2, d3, range);
3592  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
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 3593 of file z3++.h.

3593  {
3594  return range.ctx().function(name, d1, d2, d3, d4, range);
3595  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
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 3596 of file z3++.h.

3596  {
3597  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
3598  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
func_decl z3::function ( char const *  name,
sort_vector const &  domain,
sort const &  range 
)
inline

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

3599  {
3600  return range.ctx().function(name, domain, range);
3601  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
func_decl z3::function ( std::string const &  name,
sort_vector const &  domain,
sort const &  range 
)
inline

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

3602  {
3603  return range.ctx().function(name.c_str(), domain, range);
3604  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3325
expr z3::implies ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by implies().

1554  {
1555  assert(a.is_bool() && b.is_bool());
1556  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1557  }
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:1547
expr z3::implies ( expr const &  a,
bool  b 
)
inline

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

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

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

1559 { return implies(b.ctx().bool_val(a), b); }
expr implies(bool a, expr const &b)
Definition: z3++.h:1559
expr z3::in_re ( expr const &  s,
expr const &  re 
)
inline

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

3761  {
3762  MK_EXPR2(Z3_mk_seq_in_re, s, re);
3763  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3667
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.
expr z3::indexof ( expr const &  s,
expr const &  substr,
expr const &  offset 
)
inline

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

3746  {
3747  check_context(s, substr); check_context(s, offset);
3748  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3749  s.check_error();
3750  return expr(s.ctx(), r);
3751  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::int2bv ( unsigned  n,
expr const &  a 
)
inline

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

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

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

1602 { _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:1594
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 2017 of file z3++.h.

2017  {
2018  check_context(c, t); check_context(c, e);
2019  assert(c.is_bool());
2020  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
2021  c.check_error();
2022  return expr(c.ctx(), r);
2023  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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).
expr z3::lambda ( expr const &  x,
expr const &  b 
)
inline

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

2296  {
2297  check_context(x, b);
2298  Z3_app vars[] = {(Z3_app) x};
2299  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
2300  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2301  {
2302  check_context(x1, b); check_context(x2, b);
2303  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2304  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
2305  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  b 
)
inline

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

2306  {
2307  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2308  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2309  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
2310  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  x4,
expr const &  b 
)
inline

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

2311  {
2312  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2313  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2314  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
2315  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::lambda ( expr_vector const &  xs,
expr const &  b 
)
inline

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

2316  {
2317  array<Z3_app> vars(xs);
2318  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
2319  }
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.
expr z3::last_indexof ( expr const &  s,
expr const &  substr 
)
inline

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

3752  {
3753  check_context(s, substr);
3754  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
3755  s.check_error();
3756  return expr(s.ctx(), r);
3757  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
func_decl z3::linear_order ( sort const &  a,
unsigned  index 
)
inline

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

2193  {
2194  return to_func_decl(a.ctx(), Z3_mk_linear_order(a.ctx(), a, index));
2195  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2044
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...
expr z3::lshr ( expr const &  a,
expr const &  b 
)
inline

logic shift right operator for bitvectors

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

Referenced by lshr().

2137 { 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.
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:2030
expr z3::lshr ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

Referenced by repeat().

1891  {
1892  check_context(a, b);
1893  Z3_ast r;
1894  if (a.is_arith()) {
1895  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
1896  }
1897  else if (a.is_bv()) {
1898  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
1899  }
1900  else {
1901  assert(a.is_fpa());
1902  r = Z3_mk_fpa_max(a.ctx(), a, b);
1903  }
1904  return expr(a.ctx(), r);
1905  }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned 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_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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).
expr z3::min ( expr const &  a,
expr const &  b 
)
inline

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

1876  {
1877  check_context(a, b);
1878  Z3_ast r;
1879  if (a.is_arith()) {
1880  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1881  }
1882  else if (a.is_bv()) {
1883  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1884  }
1885  else {
1886  assert(a.is_fpa());
1887  r = Z3_mk_fpa_min(a.ctx(), a, b);
1888  }
1889  return expr(a.ctx(), r);
1890  }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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_min(Z3_context c, Z3_ast t1, Z3_ast t2)
Minimum of floating-point numbers.
expr z3::mk_and ( expr_vector const &  args)
inline

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

2429  {
2430  array<Z3_ast> _args(args);
2431  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2432  args.check_error();
2433  return expr(args.ctx(), r);
2434  }
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].
expr z3::mk_or ( expr_vector const &  args)
inline

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

2423  {
2424  array<Z3_ast> _args(args);
2425  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2426  args.check_error();
2427  return expr(args.ctx(), r);
2428  }
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].
expr z3::mk_xor ( expr_vector const &  args)
inline

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

2435  {
2436  if (args.empty())
2437  return args.ctx().bool_val(false);
2438  expr r = args[0];
2439  for (unsigned i = 1; i < args.size(); ++i)
2440  r = r ^ args[i];
2441  return r;
2442  }
expr z3::mod ( expr const &  a,
expr const &  b 
)
inline

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

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

1566  {
1567  if (a.is_bv()) {
1568  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1569  }
1570  else {
1571  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1572  }
1573  }
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).
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1547
expr z3::mod ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

1873 { 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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::nor ( 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_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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator! ( expr const &  a)
inline
Precondition
a.is_bool()

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

1600 { 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).
#define _Z3_MK_UN_(a, mkun)
Definition: z3++.h:1594
probe z3::operator! ( probe const &  p)
inline

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

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

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

1642  {
1643  check_context(a, b);
1644  Z3_ast args[2] = { a, b };
1645  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1646  a.check_error();
1647  return expr(a.ctx(), r);
1648  }
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]).
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator!= ( expr const &  a,
int  b 
)
inline

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

1649 { assert(a.is_arith() || a.is_bv() || a.is_fpa()); return a != a.ctx().num_val(b, a.get_sort()); }
expr z3::operator!= ( int  a,
expr const &  b 
)
inline

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

1650 { assert(b.is_arith() || b.is_bv() || b.is_fpa()); return b.ctx().num_val(a, b.get_sort()) != b; }
expr z3::operator!= ( expr const &  a,
double  b 
)
inline

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

1651 { assert(a.is_fpa()); return a != a.ctx().fpa_val(b); }
expr z3::operator!= ( double  a,
expr const &  b 
)
inline

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

1652 { assert(b.is_fpa()); return b.ctx().fpa_val(a) != b; }
expr z3::operator% ( expr const &  a,
expr const &  b 
)
inline

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

1577 { return mod(a, b); }
expr mod(int a, expr const &b)
Definition: z3++.h:1575
expr z3::operator% ( expr const &  a,
int  b 
)
inline

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

1578 { return mod(a, b); }
expr mod(int a, expr const &b)
Definition: z3++.h:1575
expr z3::operator% ( int  a,
expr const &  b 
)
inline

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

1579 { return mod(a, b); }
expr mod(int a, expr const &b)
Definition: z3++.h:1575
expr z3::operator& ( expr const &  a,
expr const &  b 
)
inline

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

1861 { 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); }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_bvand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise and.
expr z3::operator& ( expr const &  a,
int  b 
)
inline

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

1862 { return a & a.ctx().num_val(b, a.get_sort()); }
expr z3::operator& ( int  a,
expr const &  b 
)
inline

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

1863 { return b.ctx().num_val(a, b.get_sort()) & b; }
tactic z3::operator& ( tactic const &  t1,
tactic const &  t2 
)
inline

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

2958  {
2959  check_context(t1, t2);
2960  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2961  t1.check_error();
2962  return tactic(t1.ctx(), r);
2963  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator&& ( expr const &  a,
expr const &  b 
)
inline
Precondition
a.is_bool()
b.is_bool()

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

1606  {
1607  check_context(a, b);
1608  assert(a.is_bool() && b.is_bool());
1609  Z3_ast args[2] = { a, b };
1610  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1611  a.check_error();
1612  return expr(a.ctx(), r);
1613  }
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].
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator&& ( expr const &  a,
bool  b 
)
inline
Precondition
a.is_bool()

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

1615 { return a && a.ctx().bool_val(b); }
expr z3::operator&& ( bool  a,
expr const &  b 
)
inline
Precondition
b.is_bool()

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

1616 { return b.ctx().bool_val(a) && b; }
probe z3::operator&& ( probe const &  p1,
probe const &  p2 
)
inline

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

3071  {
3072  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3073  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator* ( expr const &  a,
expr const &  b 
)
inline

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

1684  {
1685  check_context(a, b);
1686  Z3_ast r = 0;
1687  if (a.is_arith() && b.is_arith()) {
1688  Z3_ast args[2] = { a, b };
1689  r = Z3_mk_mul(a.ctx(), 2, args);
1690  }
1691  else if (a.is_bv() && b.is_bv()) {
1692  r = Z3_mk_bvmul(a.ctx(), a, b);
1693  }
1694  else if (a.is_fpa() && b.is_fpa()) {
1695  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1696  }
1697  else {
1698  // operator is not supported by given arguments.
1699  assert(false);
1700  }
1701  a.check_error();
1702  return expr(a.ctx(), r);
1703  }
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_fpa_mul(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point multiplication.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement multiplication.
expr z3::operator* ( expr const &  a,
int  b 
)
inline

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

1704 { return a * a.ctx().num_val(b, a.get_sort()); }
expr z3::operator* ( int  a,
expr const &  b 
)
inline

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

1705 { return b.ctx().num_val(a, b.get_sort()) * b; }
expr z3::operator+ ( expr const &  a,
expr const &  b 
)
inline

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

1654  {
1655  check_context(a, b);
1656  Z3_ast r = 0;
1657  if (a.is_arith() && b.is_arith()) {
1658  Z3_ast args[2] = { a, b };
1659  r = Z3_mk_add(a.ctx(), 2, args);
1660  }
1661  else if (a.is_bv() && b.is_bv()) {
1662  r = Z3_mk_bvadd(a.ctx(), a, b);
1663  }
1664  else if (a.is_seq() && b.is_seq()) {
1665  return concat(a, b);
1666  }
1667  else if (a.is_re() && b.is_re()) {
1668  Z3_ast _args[2] = { a, b };
1669  r = Z3_mk_re_union(a.ctx(), 2, _args);
1670  }
1671  else if (a.is_fpa() && b.is_fpa()) {
1672  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1673  }
1674  else {
1675  // operator is not supported by given arguments.
1676  assert(false);
1677  }
1678  a.check_error();
1679  return expr(a.ctx(), r);
1680  }
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].
Z3_ast Z3_API Z3_mk_fpa_add(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point addition.
expr concat(expr_vector const &args)
Definition: z3++.h:2397
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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.
expr z3::operator+ ( expr const &  a,
int  b 
)
inline

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

1681 { return a + a.ctx().num_val(b, a.get_sort()); }
expr z3::operator+ ( int  a,
expr const &  b 
)
inline

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

1682 { return b.ctx().num_val(a, b.get_sort()) + b; }
expr z3::operator- ( expr const &  a)
inline

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

1750  {
1751  Z3_ast r = 0;
1752  if (a.is_arith()) {
1753  r = Z3_mk_unary_minus(a.ctx(), a);
1754  }
1755  else if (a.is_bv()) {
1756  r = Z3_mk_bvneg(a.ctx(), a);
1757  }
1758  else if (a.is_fpa()) {
1759  r = Z3_mk_fpa_neg(a.ctx(), a);
1760  }
1761  else {
1762  // operator is not supported by given arguments.
1763  assert(false);
1764  }
1765  a.check_error();
1766  return expr(a.ctx(), r);
1767  }
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.
expr z3::operator- ( expr const &  a,
expr const &  b 
)
inline

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

1769  {
1770  check_context(a, b);
1771  Z3_ast r = 0;
1772  if (a.is_arith() && b.is_arith()) {
1773  Z3_ast args[2] = { a, b };
1774  r = Z3_mk_sub(a.ctx(), 2, args);
1775  }
1776  else if (a.is_bv() && b.is_bv()) {
1777  r = Z3_mk_bvsub(a.ctx(), a, b);
1778  }
1779  else if (a.is_fpa() && b.is_fpa()) {
1780  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1781  }
1782  else {
1783  // operator is not supported by given arguments.
1784  assert(false);
1785  }
1786  a.check_error();
1787  return expr(a.ctx(), r);
1788  }
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].
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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_fpa_sub(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point subtraction.
expr z3::operator- ( expr const &  a,
int  b 
)
inline

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

1789 { return a - a.ctx().num_val(b, a.get_sort()); }
expr z3::operator- ( int  a,
expr const &  b 
)
inline

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

1790 { return b.ctx().num_val(a, b.get_sort()) - b; }
expr z3::operator/ ( expr const &  a,
expr const &  b 
)
inline

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

1728  {
1729  check_context(a, b);
1730  Z3_ast r = 0;
1731  if (a.is_arith() && b.is_arith()) {
1732  r = Z3_mk_div(a.ctx(), a, b);
1733  }
1734  else if (a.is_bv() && b.is_bv()) {
1735  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1736  }
1737  else if (a.is_fpa() && b.is_fpa()) {
1738  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1739  }
1740  else {
1741  // operator is not supported by given arguments.
1742  assert(false);
1743  }
1744  a.check_error();
1745  return expr(a.ctx(), r);
1746  }
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_div(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 div arg2.
Z3_ast Z3_API Z3_mk_fpa_div(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point division.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator/ ( expr const &  a,
int  b 
)
inline

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

1747 { return a / a.ctx().num_val(b, a.get_sort()); }
expr z3::operator/ ( int  a,
expr const &  b 
)
inline

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

1748 { return b.ctx().num_val(a, b.get_sort()) / b; }
expr z3::operator< ( expr const &  a,
expr const &  b 
)
inline

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

1817  {
1818  check_context(a, b);
1819  Z3_ast r = 0;
1820  if (a.is_arith() && b.is_arith()) {
1821  r = Z3_mk_lt(a.ctx(), a, b);
1822  }
1823  else if (a.is_bv() && b.is_bv()) {
1824  r = Z3_mk_bvslt(a.ctx(), a, b);
1825  }
1826  else if (a.is_fpa() && b.is_fpa()) {
1827  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1828  }
1829  else {
1830  // operator is not supported by given arguments.
1831  assert(false);
1832  }
1833  a.check_error();
1834  return expr(a.ctx(), r);
1835  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.
expr z3::operator< ( expr const &  a,
int  b 
)
inline

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

1836 { return a < a.ctx().num_val(b, a.get_sort()); }
expr z3::operator< ( int  a,
expr const &  b 
)
inline

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

1837 { return b.ctx().num_val(a, b.get_sort()) < b; }
probe z3::operator< ( probe const &  p1,
probe const &  p2 
)
inline

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

3056  {
3057  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3058  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
probe z3::operator< ( probe const &  p1,
double  p2 
)
inline

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

3059 { return p1 < probe(p1.ctx(), p2); }
probe z3::operator< ( double  p1,
probe const &  p2 
)
inline

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

3060 { return probe(p2.ctx(), p1) < p2; }
std::ostream& z3::operator<< ( std::ostream &  out,
exception const &  e 
)
inline

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

94 { out << e.msg(); return out; }
std::ostream& z3::operator<< ( std::ostream &  out,
symbol const &  s 
)
inline

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

445  {
446  if (s.kind() == Z3_INT_SYMBOL)
447  out << "k!" << s.to_int();
448  else
449  out << s.str();
450  return out;
451  }
std::ostream& z3::operator<< ( std::ostream &  out,
param_descrs const &  d 
)
inline

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

476 { return out << d.to_string(); }
std::ostream& z3::operator<< ( std::ostream &  out,
params const &  p 
)
inline

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

500  {
501  out << Z3_params_to_string(p.ctx(), p); return out;
502  }
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...
std::ostream& z3::operator<< ( std::ostream &  out,
ast const &  n 
)
inline

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

533  {
534  out << Z3_ast_to_string(n.ctx(), n.m_ast); return out;
535  }
Z3_string Z3_API Z3_ast_to_string(Z3_context c, Z3_ast a)
Convert the given AST node into a string.
std::ostream& z3::operator<< ( std::ostream &  out,
model const &  m 
)
inline

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

2579 { out << Z3_model_to_string(m.ctx(), m); return out; }
Z3_string Z3_API Z3_model_to_string(Z3_context c, Z3_model m)
Convert the given model into a string.
std::ostream& z3::operator<< ( std::ostream &  out,
stats const &  s 
)
inline

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

2608 { 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.
std::ostream& z3::operator<< ( std::ostream &  out,
check_result  r 
)
inline

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

2611  {
2612  if (r == unsat) out << "unsat";
2613  else if (r == sat) out << "sat";
2614  else out << "unknown";
2615  return out;
2616  }
Definition: z3++.h:133
std::ostream& z3::operator<< ( std::ostream &  out,
solver const &  s 
)
inline

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

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

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

2892 { 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.
std::ostream& z3::operator<< ( std::ostream &  out,
apply_result const &  r 
)
inline

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

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

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

3183 { 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.
std::ostream& z3::operator<< ( std::ostream &  out,
fixedpoint const &  f 
)
inline

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

3241 { 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.
expr z3::operator<= ( expr const &  a,
expr const &  b 
)
inline

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

1792  {
1793  check_context(a, b);
1794  Z3_ast r = 0;
1795  if (a.is_arith() && b.is_arith()) {
1796  r = Z3_mk_le(a.ctx(), a, b);
1797  }
1798  else if (a.is_bv() && b.is_bv()) {
1799  r = Z3_mk_bvsle(a.ctx(), a, b);
1800  }
1801  else if (a.is_fpa() && b.is_fpa()) {
1802  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1803  }
1804  else {
1805  // operator is not supported by given arguments.
1806  assert(false);
1807  }
1808  a.check_error();
1809  return expr(a.ctx(), r);
1810  }
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_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.
expr z3::operator<= ( expr const &  a,
int  b 
)
inline

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

1811 { return a <= a.ctx().num_val(b, a.get_sort()); }
expr z3::operator<= ( int  a,
expr const &  b 
)
inline

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

1812 { return b.ctx().num_val(a, b.get_sort()) <= b; }
probe z3::operator<= ( probe const &  p1,
probe const &  p2 
)
inline

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

3046  {
3047  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3048  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe z3::operator<= ( probe const &  p1,
double  p2 
)
inline

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

3049 { return p1 <= probe(p1.ctx(), p2); }
probe z3::operator<= ( double  p1,
probe const &  p2 
)
inline

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

3050 { return probe(p2.ctx(), p1) <= p2; }
expr z3::operator== ( expr const &  a,
expr const &  b 
)
inline

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

1631  {
1632  check_context(a, b);
1633  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1634  a.check_error();
1635  return expr(a.ctx(), r);
1636  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_eq(Z3_context c, Z3_ast l, Z3_ast r)
Create an AST node representing l = r.
expr z3::operator== ( expr const &  a,
int  b 
)
inline

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

1637 { assert(a.is_arith() || a.is_bv() || a.is_fpa()); return a == a.ctx().num_val(b, a.get_sort()); }
expr z3::operator== ( int  a,
expr const &  b 
)
inline

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

1638 { assert(b.is_arith() || b.is_bv() || b.is_fpa()); return b.ctx().num_val(a, b.get_sort()) == b; }
expr z3::operator== ( expr const &  a,
double  b 
)
inline

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

1639 { assert(a.is_fpa()); return a == a.ctx().fpa_val(b); }
expr z3::operator== ( double  a,
expr const &  b 
)
inline

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

1640 { assert(b.is_fpa()); return b.ctx().fpa_val(a) == b; }
probe z3::operator== ( probe const &  p1,
probe const &  p2 
)
inline

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

3066  {
3067  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3068  }
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 ...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe z3::operator== ( probe const &  p1,
double  p2 
)
inline

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

3069 { return p1 == probe(p1.ctx(), p2); }
probe z3::operator== ( double  p1,
probe const &  p2 
)
inline

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

3070 { return probe(p2.ctx(), p1) == p2; }
expr z3::operator> ( expr const &  a,
expr const &  b 
)
inline

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

1839  {
1840  check_context(a, b);
1841  Z3_ast r = 0;
1842  if (a.is_arith() && b.is_arith()) {
1843  r = Z3_mk_gt(a.ctx(), a, b);
1844  }
1845  else if (a.is_bv() && b.is_bv()) {
1846  r = Z3_mk_bvsgt(a.ctx(), a, b);
1847  }
1848  else if (a.is_fpa() && b.is_fpa()) {
1849  r = Z3_mk_fpa_gt(a.ctx(), a, b);
1850  }
1851  else {
1852  // operator is not supported by given arguments.
1853  assert(false);
1854  }
1855  a.check_error();
1856  return expr(a.ctx(), r);
1857  }
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_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.
expr z3::operator> ( expr const &  a,
int  b 
)
inline

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

1858 { return a > a.ctx().num_val(b, a.get_sort()); }
expr z3::operator> ( int  a,
expr const &  b 
)
inline

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

1859 { return b.ctx().num_val(a, b.get_sort()) > b; }
probe z3::operator> ( probe const &  p1,
probe const &  p2 
)
inline

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

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

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

3064 { return p1 > probe(p1.ctx(), p2); }
probe z3::operator> ( double  p1,
probe const &  p2 
)
inline

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

3065 { return probe(p2.ctx(), p1) > p2; }
expr z3::operator>= ( expr const &  a,
expr const &  b 
)
inline

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

1708  {
1709  check_context(a, b);
1710  Z3_ast r = 0;
1711  if (a.is_arith() && b.is_arith()) {
1712  r = Z3_mk_ge(a.ctx(), a, b);
1713  }
1714  else if (a.is_bv() && b.is_bv()) {
1715  r = Z3_mk_bvsge(a.ctx(), a, b);
1716  }
1717  else if (a.is_fpa() && b.is_fpa()) {
1718  r = Z3_mk_fpa_geq(a.ctx(), a, b);
1719  }
1720  else {
1721  // operator is not supported by given arguments.
1722  assert(false);
1723  }
1724  a.check_error();
1725  return expr(a.ctx(), r);
1726  }
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_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_fpa_geq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than or equal.
expr z3::operator>= ( expr const &  a,
int  b 
)
inline

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

1814 { return a >= a.ctx().num_val(b, a.get_sort()); }
expr z3::operator>= ( int  a,
expr const &  b 
)
inline

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

1815 { return b.ctx().num_val(a, b.get_sort()) >= b; }
probe z3::operator>= ( probe const &  p1,
probe const &  p2 
)
inline

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

3051  {
3052  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3053  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe z3::operator>= ( probe const &  p1,
double  p2 
)
inline

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

3054 { return p1 >= probe(p1.ctx(), p2); }
probe z3::operator>= ( double  p1,
probe const &  p2 
)
inline

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

3055 { return probe(p2.ctx(), p1) >= p2; }
expr z3::operator^ ( expr const &  a,
expr const &  b 
)
inline

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

1865 { 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_xor(Z3_context c, Z3_ast t1, Z3_ast t2)
Create an AST node representing t1 xor t2.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_bvxor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise exclusive-or.
expr z3::operator^ ( expr const &  a,
int  b 
)
inline

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

1866 { return a ^ a.ctx().num_val(b, a.get_sort()); }
expr z3::operator^ ( int  a,
expr const &  b 
)
inline

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

1867 { return b.ctx().num_val(a, b.get_sort()) ^ b; }
expr z3::operator| ( expr const &  a,
expr const &  b 
)
inline

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

1869 { 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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator| ( expr const &  a,
int  b 
)
inline

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

1870 { return a | a.ctx().num_val(b, a.get_sort()); }
expr z3::operator| ( int  a,
expr const &  b 
)
inline

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

1871 { return b.ctx().num_val(a, b.get_sort()) | b; }
tactic z3::operator| ( tactic const &  t1,
tactic const &  t2 
)
inline

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

2965  {
2966  check_context(t1, t2);
2967  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2968  t1.check_error();
2969  return tactic(t1.ctx(), r);
2970  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator|| ( expr const &  a,
expr const &  b 
)
inline
Precondition
a.is_bool()
b.is_bool()

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

1618  {
1619  check_context(a, b);
1620  assert(a.is_bool() && b.is_bool());
1621  Z3_ast args[2] = { a, b };
1622  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1623  a.check_error();
1624  return expr(a.ctx(), r);
1625  }
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].
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::operator|| ( expr const &  a,
bool  b 
)
inline
Precondition
a.is_bool()

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

1627 { return a || a.ctx().bool_val(b); }
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; }
probe z3::operator|| ( probe const &  p1,
probe const &  p2 
)
inline

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

3074  {
3075  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3076  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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.
expr z3::operator~ ( expr const &  a)
inline

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

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

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

3767  {
3769  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
Z3_ast Z3_API Z3_mk_re_option(Z3_context c, Z3_ast re)
Create the regular language [re].
tactic z3::par_and_then ( tactic const &  t1,
tactic const &  t2 
)
inline

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

2997  {
2998  check_context(t1, t2);
2999  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
3000  t1.check_error();
3001  return tactic(t1.ctx(), r);
3002  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
tactic z3::par_or ( unsigned  n,
tactic const *  tactics 
)
inline

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

2988  {
2989  if (n == 0) {
2990  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
2991  }
2992  array<Z3_tactic> buffer(n);
2993  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
2994  return tactic(tactics[0].ctx(), Z3_tactic_par_or(tactics[0].ctx(), n, buffer.ptr()));
2995  }
#define Z3_THROW(x)
Definition: z3++.h:100
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
Definition: z3py.py:8334
func_decl z3::partial_order ( sort const &  a,
unsigned  index 
)
inline

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

2196  {
2197  return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
2198  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2044
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.
expr z3::pbeq ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2337  {
2338  assert(es.size() > 0);
2339  context& ctx = es[0].ctx();
2340  array<Z3_ast> _es(es);
2341  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2342  ctx.check_error();
2343  return expr(ctx, r);
2344  }
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.
expr z3::pbge ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2329  {
2330  assert(es.size() > 0);
2331  context& ctx = es[0].ctx();
2332  array<Z3_ast> _es(es);
2333  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2334  ctx.check_error();
2335  return expr(ctx, r);
2336  }
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.
expr z3::pble ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2321  {
2322  assert(es.size() > 0);
2323  context& ctx = es[0].ctx();
2324  array<Z3_ast> _es(es);
2325  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2326  ctx.check_error();
2327  return expr(ctx, r);
2328  }
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.
func_decl z3::piecewise_linear_order ( sort const &  a,
unsigned  index 
)
inline

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

2199  {
2200  return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
2201  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2044
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.
expr z3::plus ( expr const &  re)
inline

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

3764  {
3765  MK_EXPR1(Z3_mk_re_plus, re);
3766  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.
expr z3::prefixof ( expr const &  a,
expr const &  b 
)
inline

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

3740  {
3741  check_context(a, b);
3742  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3743  a.check_error();
3744  return expr(a.ctx(), r);
3745  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::pw ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by pw().

1562 { _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.
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1547
expr z3::pw ( expr const &  a,
int  b 
)
inline

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

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

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

1564 { return pw(b.ctx().num_val(a, b.get_sort()), b); }
expr pw(int a, expr const &b)
Definition: z3++.h:1564
expr z3::range ( expr const &  lo,
expr const &  hi 
)
inline

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

Referenced by z3py::AndThen(), ApplyResult::as_expr(), z3py::AtLeast(), Optimize::check(), ExprRef::children(), z3py::describe_probes(), z3py::eq(), z3py::FreshFunction(), context::function(), z3py::Function(), function(), z3py::OrElse(), z3py::ParOr(), z3py::probes(), z3py::RealVarVector(), z3py::RecAddDefinition(), context::recfun(), z3py::RecFunction(), AstVector::resize(), Fixedpoint::set_predicate_representation(), z3py::substitute(), z3py::substitute_vars(), z3py::tactics(), and Solver::to_smt2().

3794  {
3795  check_context(lo, hi);
3796  Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
3797  lo.check_error();
3798  return expr(lo.ctx(), r);
3799  }
Z3_ast Z3_API Z3_mk_re_range(Z3_context c, Z3_ast lo, Z3_ast hi)
Create the range regular expression over two sequences of length 1.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::re_complement ( expr const &  a)
inline

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

3791  {
3793  }
Z3_ast Z3_API Z3_mk_re_complement(Z3_context c, Z3_ast re)
Create the complement of the regular language re.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
expr z3::re_empty ( sort const &  s)
inline

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

3773  {
3774  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3775  s.check_error();
3776  return expr(s.ctx(), r);
3777  }
Z3_ast Z3_API Z3_mk_re_empty(Z3_context c, Z3_sort re)
Create an empty regular expression of sort re.
expr z3::re_full ( sort const &  s)
inline

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

3778  {
3779  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3780  s.check_error();
3781  return expr(s.ctx(), r);
3782  }
Z3_ast Z3_API Z3_mk_re_full(Z3_context c, Z3_sort re)
Create an universal regular expression of sort re.
expr z3::re_intersect ( expr_vector const &  args)
inline

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

3783  {
3784  assert(args.size() > 0);
3785  context& ctx = args[0].ctx();
3786  array<Z3_ast> _args(args);
3787  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3788  ctx.check_error();
3789  return expr(ctx, r);
3790  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.
func_decl z3::recfun ( symbol const &  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

3606  {
3607  return range.ctx().recfun(name, arity, domain, range);
3608  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3396
func_decl z3::recfun ( char const *  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

3609  {
3610  return range.ctx().recfun(name, arity, domain, range);
3611  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3396
func_decl z3::recfun ( char const *  name,
sort const &  d1,
sort const &  range 
)
inline

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

3612  {
3613  return range.ctx().recfun(name, d1, range);
3614  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3396
func_decl z3::recfun ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  range 
)
inline

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

3615  {
3616  return range.ctx().recfun(name, d1, d2, range);
3617  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
context & ctx() const
Definition: z3++.h:428
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3396
expr z3::rem ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by rem().

1582  {
1583  if (a.is_fpa() && b.is_fpa()) {
1584  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1585  } else {
1586  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1587  }
1588  }
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.
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1547
expr z3::rem ( expr const &  a,
int  b 
)
inline

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

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

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

1590 { return rem(b.ctx().num_val(a, b.get_sort()), b); }
expr rem(int a, expr const &b)
Definition: z3++.h:1590
tactic z3::repeat ( tactic const &  t,
unsigned  max = UINT_MAX 
)
inline

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

2972  {
2973  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
2974  t.check_error();
2975  return tactic(t.ctx(), r);
2976  }
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:1891
void z3::reset_params ( )
inline

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

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

2005  {
2006  assert(t.is_fpa());
2007  Z3_ast r = Z3_mk_fpa_round_to_integral(t.ctx(), t.ctx().fpa_rounding_mode(), t);
2008  t.check_error();
2009  return expr(t.ctx(), r);
2010  }
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, again represented as a floating-point number.
expr z3::sbv_to_fpa ( expr const &  t,
sort  s 
)
inline

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

1984  {
1985  assert(t.is_bv());
1986  Z3_ast r = Z3_mk_fpa_to_fp_signed(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
1987  t.check_error();
1988  return expr(t.ctx(), r);
1989  }
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...
expr select ( expr const &  a,
expr const &  i 
)
inline

forward declarations

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

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

3619  {
3620  check_context(a, i);
3621  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3622  a.check_error();
3623  return expr(a.ctx(), r);
3624  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr select ( expr const &  a,
expr_vector const &  i 
)
inline

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

3628  {
3629  check_context(a, i);
3630  array<Z3_ast> idxs(i);
3631  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3632  a.check_error();
3633  return expr(a.ctx(), r);
3634  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
expr z3::select ( expr const &  a,
int  i 
)
inline

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

3625  {
3626  return select(a, a.ctx().num_val(i, a.get_sort().array_domain()));
3627  }
expr select(expr const &a, int i)
Definition: z3++.h:3625
expr z3::set_add ( expr const &  s,
expr const &  e 
)
inline

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

3685  {
3686  MK_EXPR2(Z3_mk_set_add, s, e);
3687  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3667
Z3_ast Z3_API Z3_mk_set_add(Z3_context c, Z3_ast set, Z3_ast elem)
Add an element to a set.
expr z3::set_complement ( expr const &  a)
inline

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

3713  {
3715  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
Z3_ast Z3_API Z3_mk_set_complement(Z3_context c, Z3_ast arg)
Take the complement of a set.
expr z3::set_del ( expr const &  s,
expr const &  e 
)
inline

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

3689  {
3690  MK_EXPR2(Z3_mk_set_del, s, e);
3691  }
Z3_ast Z3_API Z3_mk_set_del(Z3_context c, Z3_ast set, Z3_ast elem)
Remove an element to a set.
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3667
expr z3::set_difference ( expr const &  a,
expr const &  b 
)
inline

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

3709  {
3711  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3667
Z3_ast Z3_API Z3_mk_set_difference(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Take the set difference between two sets.
expr z3::set_intersect ( expr const &  a,
expr const &  b 
)
inline

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

3701  {
3702  check_context(a, b);
3703  Z3_ast es[2] = { a, b };
3704  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3705  a.check_error();
3706  return expr(a.ctx(), r);
3707  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::set_member ( expr const &  s,
expr const &  e 
)
inline

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

3717  {
3718  MK_EXPR2(Z3_mk_set_member, s, e);
3719  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3667
Z3_ast Z3_API Z3_mk_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check for set membership.
void z3::set_param ( char const *  param,
char const *  value 
)
inline

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

77 { Z3_global_param_set(param, value); }
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.
void z3::set_param ( char const *  param,
bool  value 
)
inline

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

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

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

79 { auto str = std::to_string(value); Z3_global_param_set(param, str.c_str()); }
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.
expr z3::set_subset ( expr const &  a,
expr const &  b 
)
inline

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

3721  {
3722  MK_EXPR2(Z3_mk_set_subset, a, b);
3723  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3667
Z3_ast Z3_API Z3_mk_set_subset(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Check for subsetness of sets.
expr z3::set_union ( expr const &  a,
expr const &  b 
)
inline

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

3693  {
3694  check_context(a, b);
3695  Z3_ast es[2] = { a, b };
3696  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
3697  a.check_error();
3698  return expr(a.ctx(), r);
3699  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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 2191 of file z3++.h.

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

signed greater than or equal to operator for bitvectors.

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

Referenced by sge().

2064 { return to_expr(a.ctx(), Z3_mk_bvsge(a.ctx(), a, b)); }
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.
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:2030
expr z3::sge ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed greater than operator for bitvectors.

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

Referenced by sgt().

2070 { return to_expr(a.ctx(), Z3_mk_bvsgt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than.
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:2030
expr z3::sgt ( expr const &  a,
int  b 
)
inline

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

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

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

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

shift left operator for bitvectors

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

Referenced by shl().

2130 { 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.
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:2030
expr z3::shl ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed less than or equal to operator for bitvectors.

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

Referenced by sle().

2052 { return to_expr(a.ctx(), Z3_mk_bvsle(a.ctx(), a, b)); }
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.
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:2030
expr z3::sle ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed less than operator for bitvectors.

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

Referenced by slt().

2058 { return to_expr(a.ctx(), Z3_mk_bvslt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than.
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:2030
expr z3::slt ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed modulus operator for bitvectors

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

Referenced by smod().

2116 { return to_expr(a.ctx(), Z3_mk_bvsmod(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows divisor).
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:2030
expr z3::smod ( expr const &  a,
int  b 
)
inline

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

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

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

2118 { return smod(b.ctx().num_val(a, b.get_sort()), b); }
expr smod(int a, expr const &b)
Definition: z3++.h:2118
expr z3::sqrt ( expr const &  a,
expr const &  rm 
)
inline

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

1938  {
1939  check_context(a, rm);
1940  assert(a.is_fpa());
1941  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
1942  a.check_error();
1943  return expr(a.ctx(), r);
1944  }
void check_context(object const &a, object const &b)
Definition: z3++.h:432
Z3_ast Z3_API Z3_mk_fpa_sqrt(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point square root.
expr z3::srem ( expr const &  a,
expr const &  b 
)
inline

signed remainder operator for bitvectors

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

Referenced by srem().

2109 { 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).
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:2030
expr z3::srem ( expr const &  a,
int  b 
)
inline

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

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

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

2111 { return srem(b.ctx().num_val(a, b.get_sort()), b); }
expr srem(int a, expr const &b)
Definition: z3++.h:2111
expr z3::star ( expr const &  re)
inline

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

3770  {
3771  MK_EXPR1(Z3_mk_re_star, re);
3772  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
Z3_ast Z3_API Z3_mk_re_star(Z3_context c, Z3_ast re)
Create the regular language re*.
expr z3::store ( expr const &  a,
expr const &  i,
expr const &  v 
)
inline

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

Referenced by store().

3636  {
3637  check_context(a, i); check_context(a, v);
3638  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3639  a.check_error();
3640  return expr(a.ctx(), r);
3641  }
Z3_ast Z3_API Z3_mk_store(Z3_context c, Z3_ast a, Z3_ast i, Z3_ast v)
Array update.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::store ( expr const &  a,
int  i,
expr const &  v 
)
inline

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

3643 { return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), v); }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:3648
expr z3::store ( expr const &  a,
expr  i,
int  v 
)
inline

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

3644 { 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:3648
expr z3::store ( expr const &  a,
int  i,
int  v 
)
inline

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

3645  {
3646  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
3647  }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:3648
expr z3::store ( expr const &  a,
expr_vector const &  i,
expr const &  v 
)
inline

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

3648  {
3649  check_context(a, i); check_context(a, v);
3650  array<Z3_ast> idxs(i);
3651  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3652  a.check_error();
3653  return expr(a.ctx(), r);
3654  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::suffixof ( expr const &  a,
expr const &  b 
)
inline

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

3734  {
3735  check_context(a, b);
3736  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3737  a.check_error();
3738  return expr(a.ctx(), r);
3739  }
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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
expr z3::sum ( expr_vector const &  args)
inline

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

2361  {
2362  assert(args.size() > 0);
2363  context& ctx = args[0].ctx();
2364  array<Z3_ast> _args(args);
2365  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
2366  ctx.check_error();
2367  return expr(ctx, r);
2368  }
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].
check_result z3::to_check_result ( Z3_lbool  l)
inline

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

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

144  {
145  if (l == Z3_L_TRUE) return sat;
146  else if (l == Z3_L_FALSE) return unsat;
147  return unknown;
148  }
Definition: z3++.h:133
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 2030 of file z3++.h.

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

2030  {
2031  c.check_error();
2032  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
2033  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
2034  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
2036  return expr(c, a);
2037  }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.
func_decl z3::to_func_decl ( context c,
Z3_func_decl  f 
)
inline

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

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

2044  {
2045  c.check_error();
2046  return func_decl(c, f);
2047  }
expr z3::to_re ( expr const &  s)
inline

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

3758  {
3760  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3662
Z3_ast Z3_API Z3_mk_seq_to_re(Z3_context c, Z3_ast seq)
Create a regular expression that accepts the sequence seq.
expr z3::to_real ( expr const &  a)
inline

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

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

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

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

2039  {
2040  c.check_error();
2041  return sort(c, s);
2042  }
func_decl z3::tree_order ( sort const &  a,
unsigned  index 
)
inline

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

2202  {
2203  return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
2204  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2044
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.
tactic z3::try_for ( tactic const &  t,
unsigned  ms 
)
inline

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

2983  {
2984  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
2985  t.check_error();
2986  return tactic(t.ctx(), r);
2987  }
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...
expr z3::ubv_to_fpa ( expr const &  t,
sort  s 
)
inline

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

1991  {
1992  assert(t.is_bv());
1993  Z3_ast r = Z3_mk_fpa_to_fp_unsigned(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
1994  t.check_error();
1995  return expr(t.ctx(), r);
1996  }
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...
expr z3::udiv ( expr const &  a,
expr const &  b 
)
inline

unsigned division operator for bitvectors.

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

Referenced by udiv().

2102 { 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.
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:2030
expr z3::udiv ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned greater than or equal to operator for bitvectors.

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

Referenced by uge().

2090 { return to_expr(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
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:2030
expr z3::uge ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned greater than operator for bitvectors.

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

Referenced by ugt().

2096 { 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.
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:2030
expr z3::ugt ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned less than or equal to operator for bitvectors.

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

Referenced by ule().

2078 { 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.
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:2030
expr z3::ule ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned less than operator for bitvectors.

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

Referenced by ult().

2084 { 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.
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:2030
expr z3::ult ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned reminder operator for bitvectors

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

Referenced by urem().

2123 { 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.
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:2030
expr z3::urem ( expr const &  a,
int  b 
)
inline

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

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

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

2125 { return urem(b.ctx().num_val(a, b.get_sort()), b); }
expr urem(int a, expr const &b)
Definition: z3++.h:2125
tactic z3::when ( probe const &  p,
tactic const &  t 
)
inline

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

3248  {
3249  check_context(p, t);
3250  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
3251  t.check_error();
3252  return tactic(t.ctx(), r);
3253  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:432
tactic z3::with ( tactic const &  t,
params const &  p 
)
inline

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

2978  {
2979  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2980  t.check_error();
2981  return tactic(t.ctx(), r);
2982  }
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.
expr z3::xnor ( expr const &  a,
expr const &  b 
)
inline

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

1875 { if (a.is_bool()) return !(a ^ b); check_context(a, b); Z3_ast r = Z3_mk_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.
void check_context(object const &a, object const &b)
Definition: z3++.h:432
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 2151 of file z3++.h.

2151 { return to_expr(a.ctx(), Z3_mk_zero_ext(a.ctx(), i, a)); }
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:2030
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...