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 abs (expr const &a)
 
expr sqrt (expr const &a, expr const &rm)
 
expr operator~ (expr const &a)
 
expr fma (expr const &a, expr const &b, expr const &c, expr const &rm)
 
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 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)
 
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

◆ ast_vector

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

◆ expr_vector

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

◆ func_decl_vector

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

◆ sort_vector

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

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

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

131  {
132  unsat, sat, unknown
133  };
Definition: z3++.h:132

◆ rounding_mode

Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

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

Function Documentation

◆ abs()

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

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

Referenced by expr::repeat().

1739  {
1740  Z3_ast r;
1741  if (a.is_int()) {
1742  expr zero = a.ctx().int_val(0);
1743  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, zero), a, -a);
1744  }
1745  else if (a.is_real()) {
1746  expr zero = a.ctx().real_val(0);
1747  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, zero), a, -a);
1748  }
1749  else {
1750  r = Z3_mk_fpa_abs(a.ctx(), a);
1751  }
1752  a.check_error();
1753  return expr(a.ctx(), r);
1754  }
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.
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_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).

◆ as_array()

expr z3::as_array ( func_decl f)
inline

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

3377  {
3378  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3379  f.check_error();
3380  return expr(f.ctx(), r);
3381  }
Z3_ast Z3_API Z3_mk_as_array(Z3_context c, Z3_func_decl f)
Create array with the same interpretation as a function. The array satisfies the property (f x) = (se...

◆ ashr() [1/3]

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

arithmetic shift right operator for bitvectors

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

Referenced by ashr().

1893 { 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:1791

◆ ashr() [2/3]

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

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

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

◆ ashr() [3/3]

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

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

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

◆ atleast()

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

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

Referenced by expr::is_distinct().

2104  {
2105  assert(es.size() > 0);
2106  context& ctx = es[0].ctx();
2107  array<Z3_ast> _es(es);
2108  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2109  ctx.check_error();
2110  return expr(ctx, r);
2111  }
Z3_ast Z3_API Z3_mk_atleast(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ atmost()

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

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

Referenced by expr::is_distinct().

2096  {
2097  assert(es.size() > 0);
2098  context& ctx = es[0].ctx();
2099  array<Z3_ast> _es(es);
2100  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2101  ctx.check_error();
2102  return expr(ctx, r);
2103  }
Z3_ast Z3_API Z3_mk_atmost(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ bv2int()

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

bit-vector and integer conversions.

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

Referenced by expr::is_distinct().

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

◆ bvadd_no_overflow()

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

bit-vector overflow/underflow checks

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

Referenced by expr::is_distinct().

1911  {
1912  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);
1913  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_bvadd_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise addition of t1 and t2 does not overflow.

◆ bvadd_no_underflow()

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

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

Referenced by expr::is_distinct().

1914  {
1915  check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
1916  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_bvadd_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed addition of t1 and t2 does not underflow...

◆ bvmul_no_overflow()

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

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

Referenced by expr::is_distinct().

1929  {
1930  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);
1931  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_bvmul_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise multiplication of t1 and t2 does not overflow...

◆ bvmul_no_underflow()

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

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

Referenced by expr::is_distinct().

1932  {
1933  check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
1934  }
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:422

◆ bvneg_no_overflow()

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

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

Referenced by expr::is_distinct().

1926  {
1927  Z3_ast r = Z3_mk_bvneg_no_overflow(a.ctx(), a); a.check_error(); return expr(a.ctx(), r);
1928  }
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...

◆ bvsdiv_no_overflow()

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

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

Referenced by expr::is_distinct().

1923  {
1924  check_context(a, b); Z3_ast r = Z3_mk_bvsdiv_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
1925  }
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:422

◆ bvsub_no_overflow()

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

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

Referenced by expr::is_distinct().

1917  {
1918  check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
1919  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_bvsub_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed subtraction of t1 and t2 does not overflow...

◆ bvsub_no_underflow()

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

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

Referenced by expr::is_distinct().

1920  {
1921  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);
1922  }
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:422

◆ check_context()

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

◆ concat() [1/2]

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

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

Referenced by expr::is_distinct(), and operator+().

2130  {
2131  check_context(a, b);
2132  Z3_ast r;
2133  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2134  Z3_ast _args[2] = { a, b };
2135  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2136  }
2137  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2138  Z3_ast _args[2] = { a, b };
2139  r = Z3_mk_re_concat(a.ctx(), 2, _args);
2140  }
2141  else {
2142  r = Z3_mk_concat(a.ctx(), a, b);
2143  }
2144  a.ctx().check_error();
2145  return expr(a.ctx(), r);
2146  }
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:422
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

◆ concat() [2/2]

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

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

2148  {
2149  Z3_ast r;
2150  assert(args.size() > 0);
2151  if (args.size() == 1) {
2152  return args[0];
2153  }
2154  context& ctx = args[0].ctx();
2155  array<Z3_ast> _args(args);
2156  if (Z3_is_seq_sort(ctx, args[0].get_sort())) {
2157  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2158  }
2159  else if (Z3_is_re_sort(ctx, args[0].get_sort())) {
2160  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2161  }
2162  else {
2163  r = _args[args.size()-1];
2164  for (unsigned i = args.size()-1; i > 0; ) {
2165  --i;
2166  r = Z3_mk_concat(ctx, _args[i], r);
2167  ctx.check_error();
2168  }
2169  }
2170  ctx.check_error();
2171  return expr(ctx, r);
2172  }
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.

◆ cond()

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

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

2982  {
2983  check_context(p, t1); check_context(p, t2);
2984  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
2985  t1.check_error();
2986  return tactic(t1.ctx(), r);
2987  }
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:422

◆ const_array()

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

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

3394  {
3395  MK_EXPR2(Z3_mk_const_array, d, v);
3396  }
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:3388

◆ distinct()

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

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

Referenced by expr::is_distinct().

2121  {
2122  assert(args.size() > 0);
2123  context& ctx = args[0].ctx();
2124  array<Z3_ast> _args(args);
2125  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2126  ctx.check_error();
2127  return expr(ctx, r);
2128  }
Z3_ast Z3_API Z3_mk_distinct(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing distinct(args[0], ..., args[num_args-1]).

◆ empty()

expr z3::empty ( sort const &  s)
inline

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

3450  {
3451  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3452  s.check_error();
3453  return expr(s.ctx(), r);
3454  }
Z3_ast Z3_API Z3_mk_seq_empty(Z3_context c, Z3_sort seq)
Create an empty sequence of the sequence sort seq.

◆ empty_set()

expr z3::empty_set ( sort const &  s)
inline

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

3398  {
3400  }
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:3383

◆ eq()

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

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

Referenced by ast::to_string().

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

◆ exists() [1/5]

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

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

2023  {
2024  check_context(x, b);
2025  Z3_app vars[] = {(Z3_app) x};
2026  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2027  }
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:422

◆ exists() [2/5]

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

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

2028  {
2029  check_context(x1, b); check_context(x2, b);
2030  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2031  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2032  }
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:422

◆ exists() [3/5]

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

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

2033  {
2034  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2035  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2036  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2037  }
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:422

◆ exists() [4/5]

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

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

2038  {
2039  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2040  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2041  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2042  }
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:422

◆ exists() [5/5]

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

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

2043  {
2044  array<Z3_app> vars(xs);
2045  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);
2046  }
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.

◆ fail_if()

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

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

2971  {
2972  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
2973  p.check_error();
2974  return tactic(p.ctx(), r);
2975  }
Z3_tactic Z3_API Z3_tactic_fail_if(Z3_context c, Z3_probe p)
Return a tactic that fails if the probe p evaluates to false.

◆ fma()

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

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

Referenced by expr::hi().

1764  {
1765  check_context(a, b); check_context(a, c); check_context(a, rm);
1766  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
1767  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
1768  a.check_error();
1769  return expr(a.ctx(), r);
1770  }
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:422

◆ forall() [1/5]

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

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

1999  {
2000  check_context(x, b);
2001  Z3_app vars[] = {(Z3_app) x};
2002  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2003  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...

◆ forall() [2/5]

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

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

2004  {
2005  check_context(x1, b); check_context(x2, b);
2006  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2007  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2008  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...

◆ forall() [3/5]

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

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

2009  {
2010  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2011  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2012  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2013  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...

◆ forall() [4/5]

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

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

2014  {
2015  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2016  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2017  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2018  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...

◆ forall() [5/5]

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

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

2019  {
2020  array<Z3_app> vars(xs);
2021  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);
2022  }
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...

◆ full_set()

expr z3::full_set ( sort const &  s)
inline

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

3402  {
3404  }
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:3383

◆ function() [1/9]

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

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

3299  {
3300  return range.ctx().function(name, arity, domain, range);
3301  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [2/9]

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

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

3302  {
3303  return range.ctx().function(name, arity, domain, range);
3304  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [3/9]

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

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

3305  {
3306  return range.ctx().function(name, domain, range);
3307  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [4/9]

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

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

3308  {
3309  return range.ctx().function(name, d1, d2, range);
3310  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [5/9]

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

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

3311  {
3312  return range.ctx().function(name, d1, d2, d3, range);
3313  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [6/9]

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

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

3314  {
3315  return range.ctx().function(name, d1, d2, d3, d4, range);
3316  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [7/9]

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

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

3317  {
3318  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
3319  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [8/9]

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

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

3320  {
3321  return range.ctx().function(name, domain, range);
3322  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ function() [9/9]

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

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

3323  {
3324  return range.ctx().function(name.c_str(), domain, range);
3325  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3063

◆ implies() [1/3]

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

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

Referenced by expr::body(), and implies().

1387  {
1388  assert(a.is_bool() && b.is_bool());
1389  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1390  }
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:1380

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

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

◆ in_re()

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

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

3482  {
3483  MK_EXPR2(Z3_mk_seq_in_re, s, re);
3484  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3388
Z3_ast Z3_API Z3_mk_seq_in_re(Z3_context c, Z3_ast seq, Z3_ast re)
Check if seq is in the language generated by the regular expression re.

◆ indexof()

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

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

3467  {
3468  check_context(s, substr); check_context(s, offset);
3469  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3470  s.check_error();
3471  return expr(s.ctx(), r);
3472  }
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:422

◆ int2bv()

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

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

Referenced by expr::is_distinct().

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

◆ is_int()

expr z3::is_int ( expr const &  e)
inline

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

Referenced by sort::is_arith(), and expr::is_distinct().

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

◆ ite()

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

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

Precondition
c.is_bool()

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

Referenced by expr::body().

1778  {
1779  check_context(c, t); check_context(c, e);
1780  assert(c.is_bool());
1781  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
1782  c.check_error();
1783  return expr(c.ctx(), r);
1784  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
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).

◆ lambda() [1/5]

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

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

2047  {
2048  check_context(x, b);
2049  Z3_app vars[] = {(Z3_app) x};
2050  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
2051  }
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:422

◆ lambda() [2/5]

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

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

2052  {
2053  check_context(x1, b); check_context(x2, b);
2054  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2055  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
2056  }
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:422

◆ lambda() [3/5]

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

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

2057  {
2058  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2059  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2060  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
2061  }
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:422

◆ lambda() [4/5]

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

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

2062  {
2063  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2064  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2065  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
2066  }
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:422

◆ lambda() [5/5]

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

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

2067  {
2068  array<Z3_app> vars(xs);
2069  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
2070  }
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.

◆ last_indexof()

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

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

3473  {
3474  check_context(s, substr);
3475  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
3476  s.check_error();
3477  return expr(s.ctx(), r);
3478  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_seq_last_index(Z3_context c, Z3_ast, Z3_ast substr)
Return the last occurrence of substr in s. If s does not contain substr, then the value is -1...

◆ linear_order()

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

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

1942  {
1943  return to_func_decl(a.ctx(), Z3_mk_linear_order(a.ctx(), a, index));
1944  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:1805
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...

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

Referenced by lshr().

1886 { 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:1791

◆ lshr() [2/3]

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

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

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

◆ lshr() [3/3]

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

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

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

◆ max()

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

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

Referenced by tactic::help(), expr::is_distinct(), repeat(), Context::repeat(), and Context::Repeat().

1724  {
1725  check_context(a, b);
1726  Z3_ast r;
1727  if (a.is_arith()) {
1728  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
1729  }
1730  else if (a.is_bv()) {
1731  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
1732  }
1733  else {
1734  assert(a.is_fpa());
1735  r = Z3_mk_fpa_max(a.ctx(), a, b);
1736  }
1737  return expr(a.ctx(), r);
1738  }
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:422
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).

◆ min()

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

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

Referenced by expr::is_distinct().

1709  {
1710  check_context(a, b);
1711  Z3_ast r;
1712  if (a.is_arith()) {
1713  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1714  }
1715  else if (a.is_bv()) {
1716  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1717  }
1718  else {
1719  assert(a.is_fpa());
1720  r = Z3_mk_fpa_min(a.ctx(), a, b);
1721  }
1722  return expr(a.ctx(), r);
1723  }
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:422
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.

◆ mk_and()

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

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

Referenced by expr::body().

2180  {
2181  array<Z3_ast> _args(args);
2182  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2183  args.check_error();
2184  return expr(args.ctx(), r);
2185  }
Z3_ast Z3_API Z3_mk_and(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] and ... and args[num_args-1].

◆ mk_or()

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

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

Referenced by expr::body().

2174  {
2175  array<Z3_ast> _args(args);
2176  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2177  args.check_error();
2178  return expr(args.ctx(), r);
2179  }
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].

◆ mod() [1/3]

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

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

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

1399  {
1400  if (a.is_bv()) {
1401  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1402  }
1403  else {
1404  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1405  }
1406  }
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&#39;s complement signed remainder (sign follows divisor).
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1380

◆ mod() [2/3]

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

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

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

◆ mod() [3/3]

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

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

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

◆ nand()

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

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

Referenced by expr::is_distinct().

1706 { 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:422

◆ nor()

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

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

Referenced by expr::is_distinct().

1707 { 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:422

◆ operator &() [1/4]

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

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

Referenced by tactic::help(), and expr::is_distinct().

1694 { 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:422
Z3_ast Z3_API Z3_mk_bvand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise and.

◆ operator &() [2/4]

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

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

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

◆ operator &() [3/4]

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

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

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

◆ operator &() [4/4]

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

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

2701  {
2702  check_context(t1, t2);
2703  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2704  t1.check_error();
2705  return tactic(t1.ctx(), r);
2706  }
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:422

◆ operator &&() [1/4]

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

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

Referenced by expr::body(), and probe::operator()().

1439  {
1440  check_context(a, b);
1441  assert(a.is_bool() && b.is_bool());
1442  Z3_ast args[2] = { a, b };
1443  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1444  a.check_error();
1445  return expr(a.ctx(), r);
1446  }
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:422

◆ operator &&() [2/4]

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

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

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

◆ operator &&() [3/4]

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

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

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

◆ operator &&() [4/4]

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

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

2814  {
2815  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2816  }
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:422

◆ operator!() [1/2]

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

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

Referenced by expr::body(), and probe::operator()().

1433 { assert(a.is_bool()); _Z3_MK_UN_(a, Z3_mk_not); }
#define _Z3_MK_UN_(a, mkun)
Definition: z3++.h:1427
Z3_ast Z3_API Z3_mk_not(Z3_context c, Z3_ast a)
Create an AST node representing not(a).

◆ operator!() [2/2]

probe z3::operator! ( probe const &  p)
inline

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

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

◆ operator!=() [1/5]

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

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

Referenced by expr::is_distinct().

1475  {
1476  check_context(a, b);
1477  Z3_ast args[2] = { a, b };
1478  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1479  a.check_error();
1480  return expr(a.ctx(), r);
1481  }
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:422

◆ operator!=() [2/5]

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

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

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

◆ operator!=() [3/5]

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

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

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

◆ operator!=() [4/5]

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

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

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

◆ operator!=() [5/5]

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

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

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

◆ operator%() [1/3]

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

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

1410 { return mod(a, b); }
expr mod(int a, expr const &b)
Definition: z3++.h:1408

◆ operator%() [2/3]

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

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

1411 { return mod(a, b); }
expr mod(int a, expr const &b)
Definition: z3++.h:1408

◆ operator%() [3/3]

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

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

1412 { return mod(a, b); }
expr mod(int a, expr const &b)
Definition: z3++.h:1408

◆ operator*() [1/3]

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

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

Referenced by expr::is_distinct(), ast_vector_tpl< T >::iterator::operator->(), and solver::cube_iterator::operator->().

1517  {
1518  check_context(a, b);
1519  Z3_ast r = 0;
1520  if (a.is_arith() && b.is_arith()) {
1521  Z3_ast args[2] = { a, b };
1522  r = Z3_mk_mul(a.ctx(), 2, args);
1523  }
1524  else if (a.is_bv() && b.is_bv()) {
1525  r = Z3_mk_bvmul(a.ctx(), a, b);
1526  }
1527  else if (a.is_fpa() && b.is_fpa()) {
1528  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1529  }
1530  else {
1531  // operator is not supported by given arguments.
1532  assert(false);
1533  }
1534  a.check_error();
1535  return expr(a.ctx(), r);
1536  }
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:422
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two&#39;s complement multiplication.

◆ operator*() [2/3]

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

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

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

◆ operator*() [3/3]

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

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

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

◆ operator+() [1/3]

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

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

Referenced by expr::is_distinct().

1487  {
1488  check_context(a, b);
1489  Z3_ast r = 0;
1490  if (a.is_arith() && b.is_arith()) {
1491  Z3_ast args[2] = { a, b };
1492  r = Z3_mk_add(a.ctx(), 2, args);
1493  }
1494  else if (a.is_bv() && b.is_bv()) {
1495  r = Z3_mk_bvadd(a.ctx(), a, b);
1496  }
1497  else if (a.is_seq() && b.is_seq()) {
1498  return concat(a, b);
1499  }
1500  else if (a.is_re() && b.is_re()) {
1501  Z3_ast _args[2] = { a, b };
1502  r = Z3_mk_re_union(a.ctx(), 2, _args);
1503  }
1504  else if (a.is_fpa() && b.is_fpa()) {
1505  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1506  }
1507  else {
1508  // operator is not supported by given arguments.
1509  assert(false);
1510  }
1511  a.check_error();
1512  return expr(a.ctx(), r);
1513  }
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:2148
void check_context(object const &a, object const &b)
Definition: z3++.h:422
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&#39;s complement addition.

◆ operator+() [2/3]

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

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

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

◆ operator+() [3/3]

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

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

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

◆ operator-() [1/4]

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

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

Referenced by expr::is_distinct().

1583  {
1584  Z3_ast r = 0;
1585  if (a.is_arith()) {
1586  r = Z3_mk_unary_minus(a.ctx(), a);
1587  }
1588  else if (a.is_bv()) {
1589  r = Z3_mk_bvneg(a.ctx(), a);
1590  }
1591  else if (a.is_fpa()) {
1592  r = Z3_mk_fpa_neg(a.ctx(), a);
1593  }
1594  else {
1595  // operator is not supported by given arguments.
1596  assert(false);
1597  }
1598  a.check_error();
1599  return expr(a.ctx(), r);
1600  }
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&#39;s complement unary minus.

◆ operator-() [2/4]

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

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

1602  {
1603  check_context(a, b);
1604  Z3_ast r = 0;
1605  if (a.is_arith() && b.is_arith()) {
1606  Z3_ast args[2] = { a, b };
1607  r = Z3_mk_sub(a.ctx(), 2, args);
1608  }
1609  else if (a.is_bv() && b.is_bv()) {
1610  r = Z3_mk_bvsub(a.ctx(), a, b);
1611  }
1612  else if (a.is_fpa() && b.is_fpa()) {
1613  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1614  }
1615  else {
1616  // operator is not supported by given arguments.
1617  assert(false);
1618  }
1619  a.check_error();
1620  return expr(a.ctx(), r);
1621  }
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:422
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two&#39;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.

◆ operator-() [3/4]

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

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

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

◆ operator-() [4/4]

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

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

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

◆ operator/() [1/3]

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

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

Referenced by expr::is_distinct().

1561  {
1562  check_context(a, b);
1563  Z3_ast r = 0;
1564  if (a.is_arith() && b.is_arith()) {
1565  r = Z3_mk_div(a.ctx(), a, b);
1566  }
1567  else if (a.is_bv() && b.is_bv()) {
1568  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1569  }
1570  else if (a.is_fpa() && b.is_fpa()) {
1571  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1572  }
1573  else {
1574  // operator is not supported by given arguments.
1575  assert(false);
1576  }
1577  a.check_error();
1578  return expr(a.ctx(), r);
1579  }
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;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:422

◆ operator/() [2/3]

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

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

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

◆ operator/() [3/3]

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

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

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

◆ operator<() [1/6]

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

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

Referenced by expr::is_distinct(), and probe::operator()().

1650  {
1651  check_context(a, b);
1652  Z3_ast r = 0;
1653  if (a.is_arith() && b.is_arith()) {
1654  r = Z3_mk_lt(a.ctx(), a, b);
1655  }
1656  else if (a.is_bv() && b.is_bv()) {
1657  r = Z3_mk_bvslt(a.ctx(), a, b);
1658  }
1659  else if (a.is_fpa() && b.is_fpa()) {
1660  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1661  }
1662  else {
1663  // operator is not supported by given arguments.
1664  assert(false);
1665  }
1666  a.check_error();
1667  return expr(a.ctx(), r);
1668  }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;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:422
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.

◆ operator<() [2/6]

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

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

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

◆ operator<() [3/6]

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

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

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

◆ operator<() [4/6]

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

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

2799  {
2800  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2801  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_probe Z3_API Z3_probe_lt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than the value returned...

◆ operator<() [5/6]

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

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

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

◆ operator<() [6/6]

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

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

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

◆ operator<<() [1/13]

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

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

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

◆ operator<<() [2/13]

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

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

437  {
438  if (s.kind() == Z3_INT_SYMBOL)
439  out << "k!" << s.to_int();
440  else
441  out << s.str();
442  return out;
443  }

◆ operator<<() [3/13]

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

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

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

◆ operator<<() [4/13]

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

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

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

◆ operator<<() [5/13]

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

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

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

◆ operator<<() [6/13]

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

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

2322 { 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.

◆ operator<<() [7/13]

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

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

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

◆ operator<<() [8/13]

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

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

2354  {
2355  if (r == unsat) out << "unsat";
2356  else if (r == sat) out << "sat";
2357  else out << "unknown";
2358  return out;
2359  }
Definition: z3++.h:132

◆ operator<<() [9/13]

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

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

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

◆ operator<<() [10/13]

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

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

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

◆ operator<<() [11/13]

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

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

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

◆ operator<<() [12/13]

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

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

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

◆ operator<<() [13/13]

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

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

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

◆ operator<=() [1/6]

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

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

Referenced by expr::is_distinct(), and probe::operator()().

1625  {
1626  check_context(a, b);
1627  Z3_ast r = 0;
1628  if (a.is_arith() && b.is_arith()) {
1629  r = Z3_mk_le(a.ctx(), a, b);
1630  }
1631  else if (a.is_bv() && b.is_bv()) {
1632  r = Z3_mk_bvsle(a.ctx(), a, b);
1633  }
1634  else if (a.is_fpa() && b.is_fpa()) {
1635  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1636  }
1637  else {
1638  // operator is not supported by given arguments.
1639  assert(false);
1640  }
1641  a.check_error();
1642  return expr(a.ctx(), r);
1643  }
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&#39;s complement signed less than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.

◆ operator<=() [2/6]

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

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

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

◆ operator<=() [3/6]

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

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

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

◆ operator<=() [4/6]

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

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

2789  {
2790  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2791  }
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:422

◆ operator<=() [5/6]

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

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

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

◆ operator<=() [6/6]

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

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

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

◆ operator==() [1/8]

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

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

Referenced by expr::is_distinct(), and probe::operator()().

1464  {
1465  check_context(a, b);
1466  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1467  a.check_error();
1468  return expr(a.ctx(), r);
1469  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_eq(Z3_context c, Z3_ast l, Z3_ast r)
Create an AST node representing l = r.

◆ operator==() [2/8]

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

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

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

◆ operator==() [3/8]

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

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

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

◆ operator==() [4/8]

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

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

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

◆ operator==() [5/8]

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

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

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

◆ operator==() [6/8]

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

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

2809  {
2810  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2811  }
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:422

◆ operator==() [7/8]

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

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

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

◆ operator==() [8/8]

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

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

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

◆ operator>() [1/6]

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

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

Referenced by expr::is_distinct(), and probe::operator()().

1672  {
1673  check_context(a, b);
1674  Z3_ast r = 0;
1675  if (a.is_arith() && b.is_arith()) {
1676  r = Z3_mk_gt(a.ctx(), a, b);
1677  }
1678  else if (a.is_bv() && b.is_bv()) {
1679  r = Z3_mk_bvsgt(a.ctx(), a, b);
1680  }
1681  else if (a.is_fpa() && b.is_fpa()) {
1682  r = Z3_mk_fpa_gt(a.ctx(), a, b);
1683  }
1684  else {
1685  // operator is not supported by given arguments.
1686  assert(false);
1687  }
1688  a.check_error();
1689  return expr(a.ctx(), r);
1690  }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;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:422
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.

◆ operator>() [2/6]

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

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

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

◆ operator>() [3/6]

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

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

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

◆ operator>() [4/6]

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

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

2804  {
2805  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2806  }
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:422

◆ operator>() [5/6]

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

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

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

◆ operator>() [6/6]

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

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

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

◆ operator>=() [1/6]

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

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

Referenced by expr::is_distinct(), and probe::operator()().

1541  {
1542  check_context(a, b);
1543  Z3_ast r = 0;
1544  if (a.is_arith() && b.is_arith()) {
1545  r = Z3_mk_ge(a.ctx(), a, b);
1546  }
1547  else if (a.is_bv() && b.is_bv()) {
1548  r = Z3_mk_bvsge(a.ctx(), a, b);
1549  }
1550  else if (a.is_fpa() && b.is_fpa()) {
1551  r = Z3_mk_fpa_geq(a.ctx(), a, b);
1552  }
1553  else {
1554  // operator is not supported by given arguments.
1555  assert(false);
1556  }
1557  a.check_error();
1558  return expr(a.ctx(), r);
1559  }
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&#39;s complement signed greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_fpa_geq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than or equal.

◆ operator>=() [2/6]

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

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

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

◆ operator>=() [3/6]

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

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

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

◆ operator>=() [4/6]

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

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

2794  {
2795  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2796  }
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:422

◆ operator>=() [5/6]

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

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

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

◆ operator>=() [6/6]

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

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

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

◆ operator^() [1/3]

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

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

Referenced by expr::is_distinct().

1698 { 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:422
Z3_ast Z3_API Z3_mk_bvxor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise exclusive-or.

◆ operator^() [2/3]

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

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

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

◆ operator^() [3/3]

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

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

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

◆ operator|() [1/4]

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

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

Referenced by tactic::help(), and expr::is_distinct().

1702 { 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:422

◆ operator|() [2/4]

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

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

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

◆ operator|() [3/4]

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

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

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

◆ operator|() [4/4]

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

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

2708  {
2709  check_context(t1, t2);
2710  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2711  t1.check_error();
2712  return tactic(t1.ctx(), r);
2713  }
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:422

◆ operator||() [1/4]

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

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

Referenced by expr::body(), and probe::operator()().

1451  {
1452  check_context(a, b);
1453  assert(a.is_bool() && b.is_bool());
1454  Z3_ast args[2] = { a, b };
1455  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1456  a.check_error();
1457  return expr(a.ctx(), r);
1458  }
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:422

◆ operator||() [2/4]

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

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

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

◆ operator||() [3/4]

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

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

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

◆ operator||() [4/4]

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

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

2817  {
2818  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2819  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_probe Z3_API Z3_probe_or(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 or p2 evaluates to true.

◆ operator~()

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

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

Referenced by expr::repeat().

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

◆ option()

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

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

3488  {
3490  }
Z3_ast Z3_API Z3_mk_re_option(Z3_context c, Z3_ast re)
Create the regular language [re].
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3383

◆ par_and_then()

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

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

Referenced by tactic::help().

2740  {
2741  check_context(t1, t2);
2742  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
2743  t1.check_error();
2744  return tactic(t1.ctx(), r);
2745  }
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:422

◆ par_or()

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

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

Referenced by tactic::help().

2731  {
2732  if (n == 0) {
2733  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
2734  }
2735  array<Z3_tactic> buffer(n);
2736  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
2737  return tactic(tactics[0].ctx(), Z3_tactic_par_or(tactics[0].ctx(), n, buffer.ptr()));
2738  }
#define Z3_THROW(x)
Definition: z3++.h:99
def tactics(ctx=None)
Definition: z3py.py:7943
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.

◆ partial_order()

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

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

1945  {
1946  return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
1947  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:1805
Z3_func_decl Z3_API Z3_mk_partial_order(Z3_context c, Z3_sort a, unsigned id)
create a partial ordering relation over signature a and index id.

◆ pbeq()

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

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

Referenced by expr::is_distinct().

2088  {
2089  assert(es.size() > 0);
2090  context& ctx = es[0].ctx();
2091  array<Z3_ast> _es(es);
2092  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2093  ctx.check_error();
2094  return expr(ctx, r);
2095  }
Z3_ast Z3_API Z3_mk_pbeq(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ pbge()

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

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

Referenced by expr::is_distinct().

2080  {
2081  assert(es.size() > 0);
2082  context& ctx = es[0].ctx();
2083  array<Z3_ast> _es(es);
2084  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2085  ctx.check_error();
2086  return expr(ctx, r);
2087  }
Z3_ast Z3_API Z3_mk_pbge(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ pble()

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

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

Referenced by expr::is_distinct().

2072  {
2073  assert(es.size() > 0);
2074  context& ctx = es[0].ctx();
2075  array<Z3_ast> _es(es);
2076  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2077  ctx.check_error();
2078  return expr(ctx, r);
2079  }
Z3_ast Z3_API Z3_mk_pble(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ piecewise_linear_order()

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

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

1948  {
1949  return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
1950  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:1805
Z3_func_decl Z3_API Z3_mk_piecewise_linear_order(Z3_context c, Z3_sort a, unsigned id)
create a piecewise linear ordering relation over signature a and index id.

◆ plus()

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

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

3485  {
3486  MK_EXPR1(Z3_mk_re_plus, re);
3487  }
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3383

◆ prefixof()

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

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

3461  {
3462  check_context(a, b);
3463  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3464  a.check_error();
3465  return expr(a.ctx(), r);
3466  }
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:422

◆ pw() [1/3]

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

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

Referenced by expr::is_distinct(), and pw().

1395 { _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:1380

◆ pw() [2/3]

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

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

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

◆ pw() [3/3]

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

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

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

◆ range()

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

◆ re_complement()

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

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

3512  {
3514  }
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:3383

◆ re_empty()

expr z3::re_empty ( sort const &  s)
inline

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

3494  {
3495  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3496  s.check_error();
3497  return expr(s.ctx(), r);
3498  }
Z3_ast Z3_API Z3_mk_re_empty(Z3_context c, Z3_sort re)
Create an empty regular expression of sort re.

◆ re_full()

expr z3::re_full ( sort const &  s)
inline

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

3499  {
3500  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3501  s.check_error();
3502  return expr(s.ctx(), r);
3503  }
Z3_ast Z3_API Z3_mk_re_full(Z3_context c, Z3_sort re)
Create an universal regular expression of sort re.

◆ re_intersect()

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

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

3504  {
3505  assert(args.size() > 0);
3506  context& ctx = args[0].ctx();
3507  array<Z3_ast> _args(args);
3508  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3509  ctx.check_error();
3510  return expr(ctx, r);
3511  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.

◆ recfun() [1/4]

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

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

Referenced by context::interrupt(), and context::recfun().

3327  {
3328  return range.ctx().recfun(name, arity, domain, range);
3329  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3134

◆ recfun() [2/4]

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

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

3330  {
3331  return range.ctx().recfun(name, arity, domain, range);
3332  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3134

◆ recfun() [3/4]

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

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

3333  {
3334  return range.ctx().recfun(name, d1, range);
3335  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3134

◆ recfun() [4/4]

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

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

3336  {
3337  return range.ctx().recfun(name, d1, d2, range);
3338  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3515
context & ctx() const
Definition: z3++.h:418
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3134

◆ rem() [1/3]

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

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

Referenced by expr::is_distinct(), and rem().

1415  {
1416  if (a.is_fpa() && b.is_fpa()) {
1417  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1418  } else {
1419  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1420  }
1421  }
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:1380

◆ rem() [2/3]

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

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

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

◆ rem() [3/3]

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

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

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

◆ repeat()

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

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

Referenced by tactic::help().

2715  {
2716  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
2717  t.check_error();
2718  return tactic(t.ctx(), r);
2719  }
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:1724

◆ reset_params()

void z3::reset_params ( )
inline

Definition at line 79 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...

◆ select() [1/3]

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

forward declarations

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

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

3340  {
3341  check_context(a, i);
3342  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3343  a.check_error();
3344  return expr(a.ctx(), r);
3345  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
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...

◆ select() [2/3]

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

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

3349  {
3350  check_context(a, i);
3351  array<Z3_ast> idxs(i);
3352  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3353  a.check_error();
3354  return expr(a.ctx(), r);
3355  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_select_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs)
n-ary Array read. The argument a is the array and idxs are the indices of the array that gets read...

◆ select() [3/3]

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

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

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

◆ set_add()

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

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

3406  {
3407  MK_EXPR2(Z3_mk_set_add, s, e);
3408  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3388
Z3_ast Z3_API Z3_mk_set_add(Z3_context c, Z3_ast set, Z3_ast elem)
Add an element to a set.

◆ set_complement()

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

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

3434  {
3436  }
Z3_ast Z3_API Z3_mk_set_complement(Z3_context c, Z3_ast arg)
Take the complement of a set.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3383

◆ set_del()

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

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

3410  {
3411  MK_EXPR2(Z3_mk_set_del, s, e);
3412  }
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:3388

◆ set_difference()

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

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

3430  {
3432  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3388
Z3_ast Z3_API Z3_mk_set_difference(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Take the set difference between two sets.

◆ set_intersect()

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

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

3422  {
3423  check_context(a, b);
3424  Z3_ast es[2] = { a, b };
3425  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3426  a.check_error();
3427  return expr(a.ctx(), r);
3428  }
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:422

◆ set_member()

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

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

3438  {
3439  MK_EXPR2(Z3_mk_set_member, s, e);
3440  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3388
Z3_ast Z3_API Z3_mk_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check for set membership.

◆ set_param() [1/3]

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

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

76 { 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.

◆ set_param() [2/3]

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

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

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

◆ set_param() [3/3]

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

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

78 { 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.

◆ set_subset()

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

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

3442  {
3443  MK_EXPR2(Z3_mk_set_subset, a, b);
3444  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3388
Z3_ast Z3_API Z3_mk_set_subset(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Check for subsetness of sets.

◆ set_union()

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

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

3414  {
3415  check_context(a, b);
3416  Z3_ast es[2] = { a, b };
3417  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
3418  a.check_error();
3419  return expr(a.ctx(), r);
3420  }
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:422

◆ sext()

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

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

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

1940 { 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:1791

◆ shl() [1/3]

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

shift left operator for bitvectors

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

Referenced by shl().

1879 { 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:1791

◆ shl() [2/3]

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

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

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

◆ shl() [3/3]

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

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

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

◆ sle() [1/3]

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

signed less than or equal to operator for bitvectors.

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

Referenced by sle().

1813 { 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&#39;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:1791

◆ sle() [2/3]

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

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

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

◆ sle() [3/3]

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

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

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

◆ slt() [1/3]

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

signed less than operator for bitvectors.

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

Referenced by slt().

1819 { 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&#39;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:1791

◆ slt() [2/3]

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

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

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

◆ slt() [3/3]

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

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

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

◆ smod() [1/3]

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

signed modulus operator for bitvectors

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

Referenced by smod().

1865 { 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&#39;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:1791

◆ smod() [2/3]

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

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

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

◆ smod() [3/3]

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

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

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

◆ sqrt()

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

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

Referenced by expr::repeat().

1755  {
1756  check_context(a, rm);
1757  assert(a.is_fpa());
1758  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
1759  a.check_error();
1760  return expr(a.ctx(), r);
1761  }
void check_context(object const &a, object const &b)
Definition: z3++.h:422
Z3_ast Z3_API Z3_mk_fpa_sqrt(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point square root.

◆ srem() [1/3]

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

signed remainder operator for bitvectors

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

Referenced by srem().

1858 { 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&#39;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:1791

◆ srem() [2/3]

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

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

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

◆ srem() [3/3]

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

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

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

◆ star()

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

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

3491  {
3492  MK_EXPR1(Z3_mk_re_star, re);
3493  }
Z3_ast Z3_API Z3_mk_re_star(Z3_context c, Z3_ast re)
Create the regular language re*.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3383

◆ store() [1/5]

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

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

Referenced by store().

3357  {
3358  check_context(a, i); check_context(a, v);
3359  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3360  a.check_error();
3361  return expr(a.ctx(), r);
3362  }
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:422

◆ store() [2/5]

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

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

3364 { 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:3369

◆ store() [3/5]

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

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

3365 { 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:3369

◆ store() [4/5]

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

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

3366  {
3367  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
3368  }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:3369

◆ store() [5/5]

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

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

3369  {
3370  check_context(a, i); check_context(a, v);
3371  array<Z3_ast> idxs(i);
3372  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3373  a.check_error();
3374  return expr(a.ctx(), r);
3375  }
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:422

◆ suffixof()

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

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

3455  {
3456  check_context(a, b);
3457  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3458  a.check_error();
3459  return expr(a.ctx(), r);
3460  }
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:422

◆ sum()

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

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

Referenced by expr::is_distinct().

2112  {
2113  assert(args.size() > 0);
2114  context& ctx = args[0].ctx();
2115  array<Z3_ast> _args(args);
2116  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
2117  ctx.check_error();
2118  return expr(ctx, r);
2119  }
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].

◆ to_check_result()

check_result z3::to_check_result ( Z3_lbool  l)
inline

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

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

143  {
144  if (l == Z3_L_TRUE) return sat;
145  else if (l == Z3_L_FALSE) return unsat;
146  return unknown;
147  }
Definition: z3++.h:132

◆ to_expr()

expr z3::to_expr ( context c,
Z3_ast  a 
)
inline

Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the whole C API with the C++ layer defined in this file.

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

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

1791  {
1792  c.check_error();
1793  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
1794  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
1795  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
1797  return expr(c, a);
1798  }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.

◆ to_func_decl()

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

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

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

1805  {
1806  c.check_error();
1807  return func_decl(c, f);
1808  }

◆ to_re()

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

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

3479  {
3481  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3383
Z3_ast Z3_API Z3_mk_seq_to_re(Z3_context c, Z3_ast seq)
Create a regular expression that accepts the sequence seq.

◆ to_real()

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

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

3297 { Z3_ast r = Z3_mk_int2real(a.ctx(), a); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_int2real(Z3_context c, Z3_ast t1)
Coerce an integer to a real.

◆ to_sort()

sort z3::to_sort ( context c,
Z3_sort  s 
)
inline

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

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

1800  {
1801  c.check_error();
1802  return sort(c, s);
1803  }

◆ tree_order()

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

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

1951  {
1952  return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
1953  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:1805
Z3_func_decl Z3_API Z3_mk_tree_order(Z3_context c, Z3_sort a, unsigned id)
create a tree ordering relation over signature a identified using index id.

◆ try_for()

tactic z3::try_for ( tactic const &  t,
unsigned  ms 
)
inline

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

Referenced by tactic::help().

2726  {
2727  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
2728  t.check_error();
2729  return tactic(t.ctx(), r);
2730  }
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...

◆ udiv() [1/3]

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

unsigned division operator for bitvectors.

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

Referenced by udiv().

1851 { 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:1791

◆ udiv() [2/3]

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

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

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

◆ udiv() [3/3]

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

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

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

◆ uge() [1/3]

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

unsigned greater than or equal to operator for bitvectors.

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

Referenced by uge().

1839 { 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:1791

◆ uge() [2/3]

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

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

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

◆ uge() [3/3]

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

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

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

◆ ugt() [1/3]

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

unsigned greater than operator for bitvectors.

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

Referenced by ugt().

1845 { 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:1791

◆ ugt() [2/3]

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

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

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

◆ ugt() [3/3]

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

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

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

◆ ule() [1/3]

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

unsigned less than or equal to operator for bitvectors.

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

Referenced by ule().

1827 { 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:1791

◆ ule() [2/3]

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

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

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

◆ ule() [3/3]

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

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

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

◆ ult() [1/3]

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

unsigned less than operator for bitvectors.

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

Referenced by ult().

1833 { 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:1791

◆ ult() [2/3]

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

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

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

◆ ult() [3/3]

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

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

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

◆ urem() [1/3]

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

unsigned reminder operator for bitvectors

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

Referenced by urem().

1872 { 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:1791

◆ urem() [2/3]

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

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

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

◆ urem() [3/3]

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

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

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

◆ when()

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

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

2976  {
2977  check_context(p, t);
2978  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
2979  t.check_error();
2980  return tactic(t.ctx(), r);
2981  }
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:422

◆ with()

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

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

Referenced by tactic::help().

2721  {
2722  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2723  t.check_error();
2724  return tactic(t.ctx(), r);
2725  }
Z3_tactic Z3_API Z3_tactic_using_params(Z3_context c, Z3_tactic t, Z3_params p)
Return a tactic that applies t using the given set of parameters.

◆ xnor()

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

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

Referenced by expr::is_distinct().

1708 { 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:422

◆ zext()

expr z3::zext ( expr const &  a,
unsigned  i 
)
inline

Extend the given bit-vector with zeros to the (unsigned) equivalent bitvector of size m+i, where m is the size of the given bit-vector.

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

1900 { 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:1791
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...