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

Z3 C++ namespace. More...

Data Structures

class  cast_ast
 
class  ast_vector_tpl
 
class  exception
 Exception used to sign API usage errors. More...
 
class  config
 Z3 global configuration object. More...
 
class  context
 A Context manages all other Z3 objects, global configuration options, etc. More...
 
class  array
 
class  object
 
class  symbol
 
class  param_descrs
 
class  params
 
class  ast
 
class  sort
 A Z3 sort (aka type). Every expression (i.e., formula or term) in Z3 has a sort. More...
 
class  func_decl
 Function declaration (aka function definition). It is the signature of interpreted and uninterpreted functions in Z3. The basic building block in Z3 is the function application. More...
 
class  expr
 A Z3 expression is used to represent formulas and terms. For Z3, a formula is any expression of sort Boolean. Every expression has a sort. More...
 
class  cast_ast< ast >
 
class  cast_ast< expr >
 
class  cast_ast< sort >
 
class  cast_ast< func_decl >
 
class  func_entry
 
class  func_interp
 
class  model
 
class  stats
 
class  solver
 
class  goal
 
class  apply_result
 
class  tactic
 
class  probe
 
class  optimize
 
class  fixedpoint
 
class  constructor_list
 
class  constructors
 
class  on_clause
 
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
 
typedef std::function< void(expr const &proof, expr_vector const &clause)> on_clause_eh_t
 

Enumerations

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

Functions

void set_param (char const *param, char const *value)
 
void set_param (char const *param, bool value)
 
void set_param (char const *param, int value)
 
void reset_params ()
 
std::ostream & operator<< (std::ostream &out, exception const &e)
 
check_result to_check_result (Z3_lbool l)
 
void check_context (object const &a, object const &b)
 
std::ostream & operator<< (std::ostream &out, symbol const &s)
 
std::ostream & operator<< (std::ostream &out, param_descrs const &d)
 
std::ostream & operator<< (std::ostream &out, params const &p)
 
std::ostream & operator<< (std::ostream &out, ast const &n)
 
bool eq (ast const &a, ast const &b)
 
expr select (expr const &a, expr const &i)
 forward declarations More...
 
expr select (expr const &a, expr_vector const &i)
 
expr implies (expr const &a, expr const &b)
 
expr implies (expr const &a, bool b)
 
expr implies (bool a, expr const &b)
 
expr pw (expr const &a, expr const &b)
 
expr pw (expr const &a, int b)
 
expr pw (int a, expr const &b)
 
expr mod (expr const &a, expr const &b)
 
expr mod (expr const &a, int b)
 
expr mod (int a, expr const &b)
 
expr operator% (expr const &a, expr const &b)
 
expr operator% (expr const &a, int b)
 
expr operator% (int a, expr const &b)
 
expr rem (expr const &a, expr const &b)
 
expr rem (expr const &a, int b)
 
expr rem (int a, expr const &b)
 
expr operator! (expr const &a)
 
expr is_int (expr const &e)
 
expr operator&& (expr const &a, expr const &b)
 
expr operator&& (expr const &a, bool b)
 
expr operator&& (bool a, expr const &b)
 
expr operator|| (expr const &a, expr const &b)
 
expr operator|| (expr const &a, bool b)
 
expr operator|| (bool a, expr const &b)
 
expr operator== (expr const &a, expr const &b)
 
expr operator== (expr const &a, int b)
 
expr operator== (int a, expr const &b)
 
expr operator== (expr const &a, double b)
 
expr operator== (double a, expr const &b)
 
expr operator!= (expr const &a, expr const &b)
 
expr operator!= (expr const &a, int b)
 
expr operator!= (int a, expr const &b)
 
expr operator!= (expr const &a, double b)
 
expr operator!= (double a, expr const &b)
 
expr operator+ (expr const &a, expr const &b)
 
expr operator+ (expr const &a, int b)
 
expr operator+ (int a, expr const &b)
 
expr operator* (expr const &a, expr const &b)
 
expr operator* (expr const &a, int b)
 
expr operator* (int a, expr const &b)
 
expr operator>= (expr const &a, expr const &b)
 
expr operator/ (expr const &a, expr const &b)
 
expr operator/ (expr const &a, int b)
 
expr operator/ (int a, expr const &b)
 
expr operator- (expr const &a)
 
expr operator- (expr const &a, expr const &b)
 
expr operator- (expr const &a, int b)
 
expr operator- (int a, expr const &b)
 
expr operator<= (expr const &a, expr const &b)
 
expr operator<= (expr const &a, int b)
 
expr operator<= (int a, expr const &b)
 
expr operator>= (expr const &a, int b)
 
expr operator>= (int a, expr const &b)
 
expr operator< (expr const &a, expr const &b)
 
expr operator< (expr const &a, int b)
 
expr operator< (int a, expr const &b)
 
expr operator> (expr const &a, expr const &b)
 
expr operator> (expr const &a, int b)
 
expr operator> (int a, expr const &b)
 
expr operator& (expr const &a, expr const &b)
 
expr operator& (expr const &a, int b)
 
expr operator& (int a, expr const &b)
 
expr operator^ (expr const &a, expr const &b)
 
expr operator^ (expr const &a, int b)
 
expr operator^ (int a, expr const &b)
 
expr operator| (expr const &a, expr const &b)
 
expr operator| (expr const &a, int b)
 
expr operator| (int a, expr const &b)
 
expr nand (expr const &a, expr const &b)
 
expr nor (expr const &a, expr const &b)
 
expr xnor (expr const &a, expr const &b)
 
expr min (expr const &a, expr const &b)
 
expr max (expr const &a, expr const &b)
 
expr bvredor (expr const &a)
 
expr bvredand (expr const &a)
 
expr abs (expr const &a)
 
expr sqrt (expr const &a, expr const &rm)
 
expr fp_eq (expr const &a, expr const &b)
 
expr operator~ (expr const &a)
 
expr fma (expr const &a, expr const &b, expr const &c, expr const &rm)
 
expr fpa_fp (expr const &sgn, expr const &exp, expr const &sig)
 
expr fpa_to_sbv (expr const &t, unsigned sz)
 
expr fpa_to_ubv (expr const &t, unsigned sz)
 
expr sbv_to_fpa (expr const &t, sort s)
 
expr ubv_to_fpa (expr const &t, sort s)
 
expr fpa_to_fpa (expr const &t, sort s)
 
expr round_fpa_to_closest_integer (expr const &t)
 
expr ite (expr const &c, expr const &t, expr const &e)
 Create the if-then-else expression ite(c, t, e) More...
 
expr to_expr (context &c, Z3_ast a)
 Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the whole C API with the C++ layer defined in this file. More...
 
sort to_sort (context &c, Z3_sort s)
 
func_decl to_func_decl (context &c, Z3_func_decl f)
 
expr sle (expr const &a, expr const &b)
 signed less than or equal to operator for bitvectors. More...
 
expr sle (expr const &a, int b)
 
expr sle (int a, expr const &b)
 
expr slt (expr const &a, expr const &b)
 signed less than operator for bitvectors. More...
 
expr slt (expr const &a, int b)
 
expr slt (int a, expr const &b)
 
expr sge (expr const &a, expr const &b)
 signed greater than or equal to operator for bitvectors. More...
 
expr sge (expr const &a, int b)
 
expr sge (int a, expr const &b)
 
expr sgt (expr const &a, expr const &b)
 signed greater than operator for bitvectors. More...
 
expr sgt (expr const &a, int b)
 
expr sgt (int a, expr const &b)
 
expr ule (expr const &a, expr const &b)
 unsigned less than or equal to operator for bitvectors. More...
 
expr ule (expr const &a, int b)
 
expr ule (int a, expr const &b)
 
expr ult (expr const &a, expr const &b)
 unsigned less than operator for bitvectors. More...
 
expr ult (expr const &a, int b)
 
expr ult (int a, expr const &b)
 
expr uge (expr const &a, expr const &b)
 unsigned greater than or equal to operator for bitvectors. More...
 
expr uge (expr const &a, int b)
 
expr uge (int a, expr const &b)
 
expr ugt (expr const &a, expr const &b)
 unsigned greater than operator for bitvectors. More...
 
expr ugt (expr const &a, int b)
 
expr ugt (int a, expr const &b)
 
expr udiv (expr const &a, expr const &b)
 unsigned division operator for bitvectors. More...
 
expr udiv (expr const &a, int b)
 
expr udiv (int a, expr const &b)
 
expr srem (expr const &a, expr const &b)
 signed remainder operator for bitvectors More...
 
expr srem (expr const &a, int b)
 
expr srem (int a, expr const &b)
 
expr smod (expr const &a, expr const &b)
 signed modulus operator for bitvectors More...
 
expr smod (expr const &a, int b)
 
expr smod (int a, expr const &b)
 
expr urem (expr const &a, expr const &b)
 unsigned reminder operator for bitvectors More...
 
expr urem (expr const &a, int b)
 
expr urem (int a, expr const &b)
 
expr shl (expr const &a, expr const &b)
 shift left operator for bitvectors More...
 
expr shl (expr const &a, int b)
 
expr shl (int a, expr const &b)
 
expr lshr (expr const &a, expr const &b)
 logic shift right operator for bitvectors More...
 
expr lshr (expr const &a, int b)
 
expr lshr (int a, expr const &b)
 
expr ashr (expr const &a, expr const &b)
 arithmetic shift right operator for bitvectors More...
 
expr ashr (expr const &a, int b)
 
expr ashr (int a, expr const &b)
 
expr zext (expr const &a, unsigned i)
 Extend the given bit-vector with zeros to the (unsigned) equivalent bitvector of size m+i, where m is the size of the given bit-vector. More...
 
expr bv2int (expr const &a, bool is_signed)
 bit-vector and integer conversions. More...
 
expr int2bv (unsigned n, expr const &a)
 
expr bvadd_no_overflow (expr const &a, expr const &b, bool is_signed)
 bit-vector overflow/underflow checks More...
 
expr bvadd_no_underflow (expr const &a, expr const &b)
 
expr bvsub_no_overflow (expr const &a, expr const &b)
 
expr bvsub_no_underflow (expr const &a, expr const &b, bool is_signed)
 
expr bvsdiv_no_overflow (expr const &a, expr const &b)
 
expr bvneg_no_overflow (expr const &a)
 
expr bvmul_no_overflow (expr const &a, expr const &b, bool is_signed)
 
expr bvmul_no_underflow (expr const &a, expr const &b)
 
expr sext (expr const &a, unsigned i)
 Sign-extend of the given bit-vector to the (signed) equivalent bitvector of size m+i, where m is the size of the given bit-vector. More...
 
func_decl linear_order (sort const &a, unsigned index)
 
func_decl partial_order (sort const &a, unsigned index)
 
func_decl piecewise_linear_order (sort const &a, unsigned index)
 
func_decl tree_order (sort const &a, unsigned index)
 
expr forall (expr const &x, expr const &b)
 
expr forall (expr const &x1, expr const &x2, expr const &b)
 
expr forall (expr const &x1, expr const &x2, expr const &x3, expr const &b)
 
expr forall (expr const &x1, expr const &x2, expr const &x3, expr const &x4, expr const &b)
 
expr forall (expr_vector const &xs, expr const &b)
 
expr exists (expr const &x, expr const &b)
 
expr exists (expr const &x1, expr const &x2, expr const &b)
 
expr exists (expr const &x1, expr const &x2, expr const &x3, expr const &b)
 
expr exists (expr const &x1, expr const &x2, expr const &x3, expr const &x4, expr const &b)
 
expr exists (expr_vector const &xs, expr const &b)
 
expr lambda (expr const &x, expr const &b)
 
expr lambda (expr const &x1, expr const &x2, expr const &b)
 
expr lambda (expr const &x1, expr const &x2, expr const &x3, expr const &b)
 
expr lambda (expr const &x1, expr const &x2, expr const &x3, expr const &x4, expr const &b)
 
expr lambda (expr_vector const &xs, expr const &b)
 
expr pble (expr_vector const &es, int const *coeffs, int bound)
 
expr pbge (expr_vector const &es, int const *coeffs, int bound)
 
expr pbeq (expr_vector const &es, int const *coeffs, int bound)
 
expr atmost (expr_vector const &es, unsigned bound)
 
expr atleast (expr_vector const &es, unsigned bound)
 
expr sum (expr_vector const &args)
 
expr distinct (expr_vector const &args)
 
expr concat (expr const &a, expr const &b)
 
expr concat (expr_vector const &args)
 
expr mk_or (expr_vector const &args)
 
expr mk_and (expr_vector const &args)
 
expr mk_xor (expr_vector const &args)
 
std::ostream & operator<< (std::ostream &out, model const &m)
 
std::ostream & operator<< (std::ostream &out, stats const &s)
 
std::ostream & operator<< (std::ostream &out, check_result r)
 
std::ostream & operator<< (std::ostream &out, solver const &s)
 
std::ostream & operator<< (std::ostream &out, goal const &g)
 
std::ostream & operator<< (std::ostream &out, apply_result const &r)
 
tactic operator& (tactic const &t1, tactic const &t2)
 
tactic operator| (tactic const &t1, tactic const &t2)
 
tactic repeat (tactic const &t, unsigned max=UINT_MAX)
 
tactic with (tactic const &t, params const &p)
 
tactic try_for (tactic const &t, unsigned ms)
 
tactic par_or (unsigned n, tactic const *tactics)
 
tactic par_and_then (tactic const &t1, tactic const &t2)
 
probe operator<= (probe const &p1, probe const &p2)
 
probe operator<= (probe const &p1, double p2)
 
probe operator<= (double p1, probe const &p2)
 
probe operator>= (probe const &p1, probe const &p2)
 
probe operator>= (probe const &p1, double p2)
 
probe operator>= (double p1, probe const &p2)
 
probe operator< (probe const &p1, probe const &p2)
 
probe operator< (probe const &p1, double p2)
 
probe operator< (double p1, probe const &p2)
 
probe operator> (probe const &p1, probe const &p2)
 
probe operator> (probe const &p1, double p2)
 
probe operator> (double p1, probe const &p2)
 
probe operator== (probe const &p1, probe const &p2)
 
probe operator== (probe const &p1, double p2)
 
probe operator== (double p1, probe const &p2)
 
probe operator&& (probe const &p1, probe const &p2)
 
probe operator|| (probe const &p1, probe const &p2)
 
probe operator! (probe const &p)
 
std::ostream & operator<< (std::ostream &out, optimize const &s)
 
std::ostream & operator<< (std::ostream &out, fixedpoint const &f)
 
tactic fail_if (probe const &p)
 
tactic when (probe const &p, tactic const &t)
 
tactic cond (probe const &p, tactic const &t1, tactic const &t2)
 
expr to_real (expr const &a)
 
func_decl function (symbol const &name, unsigned arity, sort const *domain, sort const &range)
 
func_decl function (char const *name, unsigned arity, sort const *domain, sort const &range)
 
func_decl function (char const *name, sort const &domain, sort const &range)
 
func_decl function (char const *name, sort const &d1, sort const &d2, sort const &range)
 
func_decl function (char const *name, sort const &d1, sort const &d2, sort const &d3, sort const &range)
 
func_decl function (char const *name, sort const &d1, sort const &d2, sort const &d3, sort const &d4, sort const &range)
 
func_decl function (char const *name, sort const &d1, sort const &d2, sort const &d3, sort const &d4, sort const &d5, sort const &range)
 
func_decl function (char const *name, sort_vector const &domain, sort const &range)
 
func_decl function (std::string const &name, sort_vector const &domain, sort const &range)
 
func_decl recfun (symbol const &name, unsigned arity, sort const *domain, sort const &range)
 
func_decl recfun (char const *name, unsigned arity, sort const *domain, sort const &range)
 
func_decl recfun (char const *name, sort const &d1, sort const &range)
 
func_decl recfun (char const *name, sort const &d1, sort const &d2, sort const &range)
 
expr select (expr const &a, int i)
 
expr store (expr const &a, expr const &i, expr const &v)
 
expr store (expr const &a, int i, expr const &v)
 
expr store (expr const &a, expr i, int v)
 
expr store (expr const &a, int i, int v)
 
expr store (expr const &a, expr_vector const &i, expr const &v)
 
expr as_array (func_decl &f)
 
expr const_array (sort const &d, expr const &v)
 
expr empty_set (sort const &s)
 
expr full_set (sort const &s)
 
expr set_add (expr const &s, expr const &e)
 
expr set_del (expr const &s, expr const &e)
 
expr set_union (expr const &a, expr const &b)
 
expr set_intersect (expr const &a, expr const &b)
 
expr set_difference (expr const &a, expr const &b)
 
expr set_complement (expr const &a)
 
expr set_member (expr const &s, expr const &e)
 
expr set_subset (expr const &a, expr const &b)
 
expr empty (sort const &s)
 
expr suffixof (expr const &a, expr const &b)
 
expr prefixof (expr const &a, expr const &b)
 
expr indexof (expr const &s, expr const &substr, expr const &offset)
 
expr last_indexof (expr const &s, expr const &substr)
 
expr to_re (expr const &s)
 
expr in_re (expr const &s, expr const &re)
 
expr plus (expr const &re)
 
expr option (expr const &re)
 
expr star (expr const &re)
 
expr re_empty (sort const &s)
 
expr re_full (sort const &s)
 
expr re_intersect (expr_vector const &args)
 
expr re_diff (expr const &a, expr const &b)
 
expr re_complement (expr const &a)
 
expr range (expr const &lo, expr const &hi)
 

Detailed Description

Z3 C++ namespace.

Typedef Documentation

◆ ast_vector

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

◆ expr_vector

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

◆ func_decl_vector

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

◆ on_clause_eh_t

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

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

◆ sort_vector

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

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

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

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

◆ rounding_mode

Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

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

Function Documentation

◆ abs()

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

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

1981  {
1982  Z3_ast r;
1983  if (a.is_int()) {
1984  expr zero = a.ctx().int_val(0);
1985  expr ge = a >= zero;
1986  expr na = -a;
1987  r = Z3_mk_ite(a.ctx(), ge, a, na);
1988  }
1989  else if (a.is_real()) {
1990  expr zero = a.ctx().real_val(0);
1991  expr ge = a >= zero;
1992  expr na = -a;
1993  r = Z3_mk_ite(a.ctx(), ge, a, na);
1994  }
1995  else {
1996  r = Z3_mk_fpa_abs(a.ctx(), a);
1997  }
1998  a.check_error();
1999  return expr(a.ctx(), r);
2000  }
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.
System.IntPtr Z3_ast

◆ as_array()

expr z3::as_array ( func_decl f)
inline

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

3825  {
3826  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3827  f.check_error();
3828  return expr(f.ctx(), r);
3829  }
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 2207 of file z3++.h.

2207 { 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:2093

Referenced by ashr().

◆ ashr() [2/3]

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

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

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

◆ ashr() [3/3]

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

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

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

◆ atleast()

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

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

2416  {
2417  assert(es.size() > 0);
2418  context& ctx = es[0u].ctx();
2419  array<Z3_ast> _es(es);
2420  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2421  ctx.check_error();
2422  return expr(ctx, r);
2423  }
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 2408 of file z3++.h.

2408  {
2409  assert(es.size() > 0);
2410  context& ctx = es[0u].ctx();
2411  array<Z3_ast> _es(es);
2412  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2413  ctx.check_error();
2414  return expr(ctx, r);
2415  }
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 2219 of file z3++.h.

2219 { 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 2225 of file z3++.h.

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

◆ bvadd_no_underflow()

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

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

2228  {
2229  check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2230  }
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 2243 of file z3++.h.

2243  {
2244  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);
2245  }
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 2246 of file z3++.h.

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

◆ bvneg_no_overflow()

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

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

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

◆ bvredand()

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

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

1975  {
1976  assert(a.is_bv());
1977  Z3_ast r = Z3_mk_bvredand(a.ctx(), a);
1978  a.check_error();
1979  return expr(a.ctx(), r);
1980  }
Z3_ast Z3_API Z3_mk_bvredand(Z3_context c, Z3_ast t1)
Take conjunction of bits in vector, return vector of length 1.

◆ bvredor()

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

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

1969  {
1970  assert(a.is_bv());
1971  Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
1972  a.check_error();
1973  return expr(a.ctx(), r);
1974  }
Z3_ast Z3_API Z3_mk_bvredor(Z3_context c, Z3_ast t1)
Take disjunction of bits in vector, return vector of length 1.

◆ bvsdiv_no_overflow()

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

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

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

◆ bvsub_no_overflow()

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

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

2231  {
2232  check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2233  }
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 2234 of file z3++.h.

2234  {
2235  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);
2236  }
Z3_ast Z3_API Z3_mk_bvsub_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise subtraction of t1 and t2 does not underflow.

◆ check_context()

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

◆ concat() [1/2]

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

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

2442  {
2443  check_context(a, b);
2444  Z3_ast r;
2445  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2446  Z3_ast _args[2] = { a, b };
2447  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2448  }
2449  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2450  Z3_ast _args[2] = { a, b };
2451  r = Z3_mk_re_concat(a.ctx(), 2, _args);
2452  }
2453  else {
2454  r = Z3_mk_concat(a.ctx(), a, b);
2455  }
2456  a.ctx().check_error();
2457  return expr(a.ctx(), r);
2458  }
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

◆ concat() [2/2]

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

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

2460  {
2461  Z3_ast r;
2462  assert(args.size() > 0);
2463  if (args.size() == 1) {
2464  return args[0u];
2465  }
2466  context& ctx = args[0u].ctx();
2467  array<Z3_ast> _args(args);
2468  if (Z3_is_seq_sort(ctx, args[0u].get_sort())) {
2469  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2470  }
2471  else if (Z3_is_re_sort(ctx, args[0u].get_sort())) {
2472  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2473  }
2474  else {
2475  r = _args[args.size()-1];
2476  for (unsigned i = args.size()-1; i > 0; ) {
2477  --i;
2478  r = Z3_mk_concat(ctx, _args[i], r);
2479  ctx.check_error();
2480  }
2481  }
2482  ctx.check_error();
2483  return expr(ctx, r);
2484  }

◆ cond()

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

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

3318  {
3319  check_context(p, t1); check_context(p, t2);
3320  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
3321  t1.check_error();
3322  return tactic(t1.ctx(), r);
3323  }
Z3_tactic Z3_API Z3_tactic_cond(Z3_context c, Z3_probe p, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal if the probe p evaluates to true, and t2 if p evaluat...

◆ const_array()

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

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

3842  {
3843  MK_EXPR2(Z3_mk_const_array, d, v);
3844  }
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:3836

◆ distinct()

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

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

2433  {
2434  assert(args.size() > 0);
2435  context& ctx = args[0u].ctx();
2436  array<Z3_ast> _args(args);
2437  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2438  ctx.check_error();
2439  return expr(ctx, r);
2440  }
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 3898 of file z3++.h.

3898  {
3899  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3900  s.check_error();
3901  return expr(s.ctx(), r);
3902  }
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 3846 of file z3++.h.

3846  {
3848  }
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:3831

◆ eq()

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

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

573 { 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 2335 of file z3++.h.

2335  {
2336  check_context(x, b);
2337  Z3_app vars[] = {(Z3_app) x};
2338  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2339  }
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.
System.IntPtr Z3_app

◆ exists() [2/5]

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

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

2340  {
2341  check_context(x1, b); check_context(x2, b);
2342  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2343  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2344  }

◆ exists() [3/5]

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

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

2345  {
2346  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2347  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2348  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2349  }

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

2350  {
2351  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2352  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2353  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2354  }

◆ exists() [5/5]

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

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

2355  {
2356  array<Z3_app> vars(xs);
2357  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);
2358  }

◆ fail_if()

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

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

3307  {
3308  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
3309  p.check_error();
3310  return tactic(p.ctx(), r);
3311  }
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 2017 of file z3++.h.

2017  {
2018  check_context(a, b); check_context(a, c); check_context(a, rm);
2019  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
2020  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
2021  a.check_error();
2022  return expr(a.ctx(), r);
2023  }
Z3_ast Z3_API Z3_mk_fpa_fma(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Floating-point fused multiply-add.

◆ forall() [1/5]

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

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

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

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

◆ forall() [3/5]

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

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

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

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

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

◆ forall() [5/5]

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

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

2331  {
2332  array<Z3_app> vars(xs);
2333  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);
2334  }

◆ fp_eq()

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

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

2008  {
2009  check_context(a, b);
2010  assert(a.is_fpa());
2011  Z3_ast r = Z3_mk_fpa_eq(a.ctx(), a, b);
2012  a.check_error();
2013  return expr(a.ctx(), r);
2014  }
Z3_ast Z3_API Z3_mk_fpa_eq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point equality.

◆ fpa_fp()

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

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

2025  {
2026  check_context(sgn, exp); check_context(exp, sig);
2027  assert(sgn.is_bv() && exp.is_bv() && sig.is_bv());
2028  Z3_ast r = Z3_mk_fpa_fp(sgn.ctx(), sgn, exp, sig);
2029  sgn.check_error();
2030  return expr(sgn.ctx(), r);
2031  }
Z3_ast Z3_API Z3_mk_fpa_fp(Z3_context c, Z3_ast sgn, Z3_ast exp, Z3_ast sig)
Create an expression of FloatingPoint sort from three bit-vector expressions.

◆ fpa_to_fpa()

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

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

2061  {
2062  assert(t.is_fpa());
2063  Z3_ast r = Z3_mk_fpa_to_fp_float(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2064  t.check_error();
2065  return expr(t.ctx(), r);
2066  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_float(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a FloatingPoint term into another term of different FloatingPoint sort.

◆ fpa_to_sbv()

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

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

2033  {
2034  assert(t.is_fpa());
2035  Z3_ast r = Z3_mk_fpa_to_sbv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
2036  t.check_error();
2037  return expr(t.ctx(), r);
2038  }
Z3_ast Z3_API Z3_mk_fpa_to_sbv(Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz)
Conversion of a floating-point term into a signed bit-vector.

◆ fpa_to_ubv()

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

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

2040  {
2041  assert(t.is_fpa());
2042  Z3_ast r = Z3_mk_fpa_to_ubv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
2043  t.check_error();
2044  return expr(t.ctx(), r);
2045  }
Z3_ast Z3_API Z3_mk_fpa_to_ubv(Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz)
Conversion of a floating-point term into an unsigned bit-vector.

◆ full_set()

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

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

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

◆ function() [1/9]

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

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

3765  {
3766  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
3767  }
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3481
context & ctx() const
Definition: z3++.h:463
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3970

◆ function() [2/9]

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

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

3762  {
3763  return range.ctx().function(name, d1, d2, d3, d4, range);
3764  }

◆ function() [3/9]

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

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

3759  {
3760  return range.ctx().function(name, d1, d2, d3, range);
3761  }

◆ function() [4/9]

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

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

3756  {
3757  return range.ctx().function(name, d1, d2, range);
3758  }

◆ function() [5/9]

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

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

3753  {
3754  return range.ctx().function(name, domain, range);
3755  }

◆ function() [6/9]

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

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

3768  {
3769  return range.ctx().function(name, domain, range);
3770  }

◆ function() [7/9]

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

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

3750  {
3751  return range.ctx().function(name, arity, domain, range);
3752  }

◆ function() [8/9]

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

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

3771  {
3772  return range.ctx().function(name.c_str(), domain, range);
3773  }

◆ function() [9/9]

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

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

3747  {
3748  return range.ctx().function(name, arity, domain, range);
3749  }

◆ implies() [1/3]

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

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

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

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

1615  {
1616  assert(a.is_bool() && b.is_bool());
1617  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1618  }
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:1608

◆ in_re()

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

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

3930  {
3931  MK_EXPR2(Z3_mk_seq_in_re, s, re);
3932  }
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 3915 of file z3++.h.

3915  {
3916  check_context(s, substr); check_context(s, offset);
3917  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3918  s.check_error();
3919  return expr(s.ctx(), r);
3920  }
Z3_ast Z3_API Z3_mk_seq_index(Z3_context c, Z3_ast s, Z3_ast substr, Z3_ast offset)
Return index of the first occurrence of substr in s starting from offset offset. If s does not contai...

◆ int2bv()

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

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

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

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

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

2080  {
2081  check_context(c, t); check_context(c, e);
2082  assert(c.is_bool());
2083  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
2084  c.check_error();
2085  return expr(c.ctx(), r);
2086  }

◆ lambda() [1/5]

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

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

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

◆ lambda() [2/5]

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

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

2364  {
2365  check_context(x1, b); check_context(x2, b);
2366  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2367  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
2368  }

◆ lambda() [3/5]

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

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

2369  {
2370  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2371  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2372  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
2373  }

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

2374  {
2375  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2376  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2377  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
2378  }

◆ lambda() [5/5]

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

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

2379  {
2380  array<Z3_app> vars(xs);
2381  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
2382  }

◆ last_indexof()

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

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

3921  {
3922  check_context(s, substr);
3923  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
3924  s.check_error();
3925  return expr(s.ctx(), r);
3926  }
Z3_ast Z3_API Z3_mk_seq_last_index(Z3_context c, Z3_ast s, Z3_ast substr)
Return index of the last occurrence of substr in s. If s does not contain substr, then the value is -...

◆ linear_order()

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

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

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

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

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

Referenced by lshr().

◆ lshr() [2/3]

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

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

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

◆ lshr() [3/3]

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

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

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

◆ max()

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

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

1953  {
1954  check_context(a, b);
1955  Z3_ast r;
1956  if (a.is_arith()) {
1957  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
1958  }
1959  else if (a.is_bv()) {
1960  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
1961  }
1962  else {
1963  assert(a.is_fpa());
1964  r = Z3_mk_fpa_max(a.ctx(), a, b);
1965  }
1966  a.check_error();
1967  return expr(a.ctx(), r);
1968  }
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
Z3_ast Z3_API Z3_mk_fpa_max(Z3_context c, Z3_ast t1, Z3_ast t2)
Maximum of floating-point numbers.
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.

Referenced by Context::repeat(), and Context::Repeat().

◆ min()

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

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

1937  {
1938  check_context(a, b);
1939  Z3_ast r;
1940  if (a.is_arith()) {
1941  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1942  }
1943  else if (a.is_bv()) {
1944  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1945  }
1946  else {
1947  assert(a.is_fpa());
1948  r = Z3_mk_fpa_min(a.ctx(), a, b);
1949  }
1950  a.check_error();
1951  return expr(a.ctx(), r);
1952  }
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 2492 of file z3++.h.

2492  {
2493  array<Z3_ast> _args(args);
2494  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2495  args.check_error();
2496  return expr(args.ctx(), r);
2497  }
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 2486 of file z3++.h.

2486  {
2487  array<Z3_ast> _args(args);
2488  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2489  args.check_error();
2490  return expr(args.ctx(), r);
2491  }
Z3_ast Z3_API Z3_mk_or(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] or ... or args[num_args-1].

◆ mk_xor()

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

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

2498  {
2499  if (args.empty())
2500  return args.ctx().bool_val(false);
2501  expr r = args[0u];
2502  for (unsigned i = 1; i < args.size(); ++i)
2503  r = r ^ args[i];
2504  return r;
2505  }

◆ mod() [1/3]

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

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

1627  {
1628  if (a.is_bv()) {
1629  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1630  }
1631  else {
1632  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1633  }
1634  }
Z3_ast Z3_API Z3_mk_mod(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 mod arg2.
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows divisor).

Referenced by operator%().

◆ mod() [2/3]

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

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

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

◆ mod() [3/3]

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

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

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

◆ nand()

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

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

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

◆ nor()

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

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

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

◆ operator!() [1/2]

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

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

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

◆ operator!() [2/2]

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

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

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

◆ operator!=() [1/5]

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

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

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

◆ operator!=() [2/5]

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

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

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

◆ operator!=() [3/5]

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

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

1703  {
1704  check_context(a, b);
1705  Z3_ast args[2] = { a, b };
1706  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1707  a.check_error();
1708  return expr(a.ctx(), r);
1709  }

◆ operator!=() [4/5]

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

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

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

◆ operator!=() [5/5]

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

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

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

◆ operator%() [1/3]

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

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

1638 { return mod(a, b); }

◆ operator%() [2/3]

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

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

1639 { return mod(a, b); }

◆ operator%() [3/3]

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

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

1640 { return mod(a, b); }

◆ operator&() [1/4]

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

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

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

◆ operator&() [2/4]

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

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

1923 { 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 1924 of file z3++.h.

1924 { 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 3022 of file z3++.h.

3022  {
3023  check_context(t1, t2);
3024  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
3025  t1.check_error();
3026  return tactic(t1.ctx(), r);
3027  }
Z3_tactic Z3_API Z3_tactic_and_then(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal and t2 to every subgoal produced by t1.

◆ operator&&() [1/4]

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

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

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

◆ operator&&() [2/4]

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

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

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

◆ operator&&() [3/4]

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

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

1667  {
1668  check_context(a, b);
1669  assert(a.is_bool() && b.is_bool());
1670  Z3_ast args[2] = { a, b };
1671  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1672  a.check_error();
1673  return expr(a.ctx(), r);
1674  }

◆ operator&&() [4/4]

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

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

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

◆ operator*() [1/3]

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

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

1745  {
1746  check_context(a, b);
1747  Z3_ast r = 0;
1748  if (a.is_arith() && b.is_arith()) {
1749  Z3_ast args[2] = { a, b };
1750  r = Z3_mk_mul(a.ctx(), 2, args);
1751  }
1752  else if (a.is_bv() && b.is_bv()) {
1753  r = Z3_mk_bvmul(a.ctx(), a, b);
1754  }
1755  else if (a.is_fpa() && b.is_fpa()) {
1756  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1757  }
1758  else {
1759  // operator is not supported by given arguments.
1760  assert(false);
1761  }
1762  a.check_error();
1763  return expr(a.ctx(), r);
1764  }
Z3_ast Z3_API Z3_mk_mul(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] * ... * args[num_args-1].
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement multiplication.
Z3_ast Z3_API Z3_mk_fpa_mul(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point multiplication.

◆ operator*() [2/3]

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

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

1765 { 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 1766 of file z3++.h.

1766 { 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 1715 of file z3++.h.

1715  {
1716  check_context(a, b);
1717  Z3_ast r = 0;
1718  if (a.is_arith() && b.is_arith()) {
1719  Z3_ast args[2] = { a, b };
1720  r = Z3_mk_add(a.ctx(), 2, args);
1721  }
1722  else if (a.is_bv() && b.is_bv()) {
1723  r = Z3_mk_bvadd(a.ctx(), a, b);
1724  }
1725  else if (a.is_seq() && b.is_seq()) {
1726  return concat(a, b);
1727  }
1728  else if (a.is_re() && b.is_re()) {
1729  Z3_ast _args[2] = { a, b };
1730  r = Z3_mk_re_union(a.ctx(), 2, _args);
1731  }
1732  else if (a.is_fpa() && b.is_fpa()) {
1733  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1734  }
1735  else {
1736  // operator is not supported by given arguments.
1737  assert(false);
1738  }
1739  a.check_error();
1740  return expr(a.ctx(), r);
1741  }
Z3_ast Z3_API Z3_mk_re_union(Z3_context c, unsigned n, Z3_ast const args[])
Create the union of the regular languages.
Z3_ast Z3_API Z3_mk_bvadd(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement addition.
Z3_ast Z3_API Z3_mk_fpa_add(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point addition.
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].
expr concat(expr_vector const &args)
Definition: z3++.h:2460

◆ operator+() [2/3]

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

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

1742 { 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 1743 of file z3++.h.

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

◆ operator-() [1/4]

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

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

1811  {
1812  Z3_ast r = 0;
1813  if (a.is_arith()) {
1814  r = Z3_mk_unary_minus(a.ctx(), a);
1815  }
1816  else if (a.is_bv()) {
1817  r = Z3_mk_bvneg(a.ctx(), a);
1818  }
1819  else if (a.is_fpa()) {
1820  r = Z3_mk_fpa_neg(a.ctx(), a);
1821  }
1822  else {
1823  // operator is not supported by given arguments.
1824  assert(false);
1825  }
1826  a.check_error();
1827  return expr(a.ctx(), r);
1828  }
Z3_ast Z3_API Z3_mk_unary_minus(Z3_context c, Z3_ast arg)
Create an AST node representing - arg.
Z3_ast Z3_API Z3_mk_fpa_neg(Z3_context c, Z3_ast t)
Floating-point negation.
Z3_ast Z3_API Z3_mk_bvneg(Z3_context c, Z3_ast t1)
Standard two's complement unary minus.

◆ operator-() [2/4]

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

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

1830  {
1831  check_context(a, b);
1832  Z3_ast r = 0;
1833  if (a.is_arith() && b.is_arith()) {
1834  Z3_ast args[2] = { a, b };
1835  r = Z3_mk_sub(a.ctx(), 2, args);
1836  }
1837  else if (a.is_bv() && b.is_bv()) {
1838  r = Z3_mk_bvsub(a.ctx(), a, b);
1839  }
1840  else if (a.is_fpa() && b.is_fpa()) {
1841  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1842  }
1843  else {
1844  // operator is not supported by given arguments.
1845  assert(false);
1846  }
1847  a.check_error();
1848  return expr(a.ctx(), r);
1849  }
Z3_ast Z3_API Z3_mk_fpa_sub(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point subtraction.
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement subtraction.
Z3_ast Z3_API Z3_mk_sub(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] - ... - args[num_args - 1].

◆ operator-() [3/4]

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

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

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

1851 { 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 1789 of file z3++.h.

1789  {
1790  check_context(a, b);
1791  Z3_ast r = 0;
1792  if (a.is_arith() && b.is_arith()) {
1793  r = Z3_mk_div(a.ctx(), a, b);
1794  }
1795  else if (a.is_bv() && b.is_bv()) {
1796  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1797  }
1798  else if (a.is_fpa() && b.is_fpa()) {
1799  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1800  }
1801  else {
1802  // operator is not supported by given arguments.
1803  assert(false);
1804  }
1805  a.check_error();
1806  return expr(a.ctx(), r);
1807  }
Z3_ast Z3_API Z3_mk_div(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 div arg2.
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed division.
Z3_ast Z3_API Z3_mk_fpa_div(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point division.

◆ operator/() [2/3]

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

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

1808 { 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 1809 of file z3++.h.

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

◆ operator<() [1/6]

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

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

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

◆ operator<() [2/6]

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

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

1878  {
1879  check_context(a, b);
1880  Z3_ast r = 0;
1881  if (a.is_arith() && b.is_arith()) {
1882  r = Z3_mk_lt(a.ctx(), a, b);
1883  }
1884  else if (a.is_bv() && b.is_bv()) {
1885  r = Z3_mk_bvslt(a.ctx(), a, b);
1886  }
1887  else if (a.is_fpa() && b.is_fpa()) {
1888  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1889  }
1890  else {
1891  // operator is not supported by given arguments.
1892  assert(false);
1893  }
1894  a.check_error();
1895  return expr(a.ctx(), r);
1896  }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than.
Z3_ast Z3_API Z3_mk_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than.
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.

◆ operator<() [3/6]

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

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

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

◆ operator<() [4/6]

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

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

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

◆ operator<() [5/6]

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

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

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

◆ operator<() [6/6]

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

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

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

◆ operator<<() [1/13]

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

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

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

◆ operator<<() [2/13]

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

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

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

◆ operator<<() [3/13]

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

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

2674  {
2675  if (r == unsat) out << "unsat";
2676  else if (r == sat) out << "sat";
2677  else out << "unknown";
2678  return out;
2679  }

◆ operator<<() [4/13]

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

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

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

◆ operator<<() [5/13]

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

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

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

◆ operator<<() [6/13]

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

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

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

◆ operator<<() [7/13]

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

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

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

◆ operator<<() [8/13]

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

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

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

◆ operator<<() [9/13]

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

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

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

◆ operator<<() [10/13]

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

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

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

◆ operator<<() [11/13]

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

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

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

◆ operator<<() [12/13]

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

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

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

◆ operator<<() [13/13]

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

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

480  {
481  if (s.kind() == Z3_INT_SYMBOL)
482  out << "k!" << s.to_int();
483  else
484  out << s.str();
485  return out;
486  }
@ Z3_INT_SYMBOL
Definition: z3_api.h:75

◆ operator<=() [1/6]

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

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

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

◆ operator<=() [2/6]

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

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

1853  {
1854  check_context(a, b);
1855  Z3_ast r = 0;
1856  if (a.is_arith() && b.is_arith()) {
1857  r = Z3_mk_le(a.ctx(), a, b);
1858  }
1859  else if (a.is_bv() && b.is_bv()) {
1860  r = Z3_mk_bvsle(a.ctx(), a, b);
1861  }
1862  else if (a.is_fpa() && b.is_fpa()) {
1863  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1864  }
1865  else {
1866  // operator is not supported by given arguments.
1867  assert(false);
1868  }
1869  a.check_error();
1870  return expr(a.ctx(), r);
1871  }
Z3_ast Z3_API Z3_mk_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than or equal to.
Z3_ast Z3_API Z3_mk_le(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than or equal to.
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.

◆ operator<=() [3/6]

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

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

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

◆ operator<=() [4/6]

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

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

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

◆ operator<=() [5/6]

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

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

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

◆ operator<=() [6/6]

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

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

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

◆ operator==() [1/8]

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

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

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

◆ operator==() [2/8]

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

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

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

◆ operator==() [3/8]

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

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

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

◆ operator==() [4/8]

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

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

1692  {
1693  check_context(a, b);
1694  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1695  a.check_error();
1696  return expr(a.ctx(), r);
1697  }
Z3_ast Z3_API Z3_mk_eq(Z3_context c, Z3_ast l, Z3_ast r)
Create an AST node representing l = r.

◆ operator==() [5/8]

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

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

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

◆ operator==() [6/8]

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

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

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

◆ operator==() [7/8]

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

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

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

◆ operator==() [8/8]

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

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

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

◆ operator>() [1/6]

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

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

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

◆ operator>() [2/6]

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

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

1900  {
1901  check_context(a, b);
1902  Z3_ast r = 0;
1903  if (a.is_arith() && b.is_arith()) {
1904  r = Z3_mk_gt(a.ctx(), a, b);
1905  }
1906  else if (a.is_bv() && b.is_bv()) {
1907  r = Z3_mk_bvsgt(a.ctx(), a, b);
1908  }
1909  else if (a.is_fpa() && b.is_fpa()) {
1910  r = Z3_mk_fpa_gt(a.ctx(), a, b);
1911  }
1912  else {
1913  // operator is not supported by given arguments.
1914  assert(false);
1915  }
1916  a.check_error();
1917  return expr(a.ctx(), r);
1918  }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than.
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.
Z3_ast Z3_API Z3_mk_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than.

◆ operator>() [3/6]

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

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

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

◆ operator>() [4/6]

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

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

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

◆ operator>() [5/6]

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

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

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

◆ operator>() [6/6]

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

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

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

◆ operator>=() [1/6]

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

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

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

◆ operator>=() [2/6]

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

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

1769  {
1770  check_context(a, b);
1771  Z3_ast r = 0;
1772  if (a.is_arith() && b.is_arith()) {
1773  r = Z3_mk_ge(a.ctx(), a, b);
1774  }
1775  else if (a.is_bv() && b.is_bv()) {
1776  r = Z3_mk_bvsge(a.ctx(), a, b);
1777  }
1778  else if (a.is_fpa() && b.is_fpa()) {
1779  r = Z3_mk_fpa_geq(a.ctx(), a, b);
1780  }
1781  else {
1782  // operator is not supported by given arguments.
1783  assert(false);
1784  }
1785  a.check_error();
1786  return expr(a.ctx(), r);
1787  }
Z3_ast Z3_API Z3_mk_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than or equal to.
Z3_ast Z3_API Z3_mk_fpa_geq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than or equal.

◆ operator>=() [3/6]

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

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

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

◆ operator>=() [4/6]

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

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

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

◆ operator>=() [5/6]

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

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

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

◆ operator>=() [6/6]

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

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

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

◆ operator^() [1/3]

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

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

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

◆ operator^() [2/3]

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

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

1927 { 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 1928 of file z3++.h.

1928 { 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 1930 of file z3++.h.

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

◆ operator|() [2/4]

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

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

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

1932 { 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 3029 of file z3++.h.

3029  {
3030  check_context(t1, t2);
3031  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
3032  t1.check_error();
3033  return tactic(t1.ctx(), r);
3034  }
Z3_tactic Z3_API Z3_tactic_or_else(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that first applies t1 to a given goal, if it fails then returns the result of t2 appl...

◆ operator||() [1/4]

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

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

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

◆ operator||() [2/4]

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

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

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

◆ operator||() [3/4]

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

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

1679  {
1680  check_context(a, b);
1681  assert(a.is_bool() && b.is_bool());
1682  Z3_ast args[2] = { a, b };
1683  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1684  a.check_error();
1685  return expr(a.ctx(), r);
1686  }

◆ operator||() [4/4]

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

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

3138  {
3139  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3140  }
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 2015 of file z3++.h.

2015 { 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 3936 of file z3++.h.

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

◆ par_and_then()

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

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

3061  {
3062  check_context(t1, t2);
3063  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
3064  t1.check_error();
3065  return tactic(t1.ctx(), r);
3066  }
Z3_tactic Z3_API Z3_tactic_par_and_then(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal and then t2 to every subgoal produced by t1....

◆ par_or()

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

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

3052  {
3053  if (n == 0) {
3054  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
3055  }
3056  array<Z3_tactic> buffer(n);
3057  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
3058  return tactic(tactics[0u].ctx(), Z3_tactic_par_or(tactics[0u].ctx(), n, buffer.ptr()));
3059  }
Z3_tactic Z3_API Z3_tactic_par_or(Z3_context c, unsigned num, Z3_tactic const ts[])
Return a tactic that applies the given tactics in parallel.
def tactics(ctx=None)
Definition: z3py.py:8449
#define Z3_THROW(x)
Definition: z3++.h:102

◆ partial_order()

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

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

2259  {
2260  return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
2261  }
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 2400 of file z3++.h.

2400  {
2401  assert(es.size() > 0);
2402  context& ctx = es[0u].ctx();
2403  array<Z3_ast> _es(es);
2404  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2405  ctx.check_error();
2406  return expr(ctx, r);
2407  }
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 2392 of file z3++.h.

2392  {
2393  assert(es.size() > 0);
2394  context& ctx = es[0u].ctx();
2395  array<Z3_ast> _es(es);
2396  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2397  ctx.check_error();
2398  return expr(ctx, r);
2399  }
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 2384 of file z3++.h.

2384  {
2385  assert(es.size() > 0);
2386  context& ctx = es[0u].ctx();
2387  array<Z3_ast> _es(es);
2388  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2389  ctx.check_error();
2390  return expr(ctx, r);
2391  }
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 2262 of file z3++.h.

2262  {
2263  return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
2264  }
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 3933 of file z3++.h.

3933  {
3934  MK_EXPR1(Z3_mk_re_plus, re);
3935  }
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.

◆ prefixof()

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

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

3909  {
3910  check_context(a, b);
3911  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3912  a.check_error();
3913  return expr(a.ctx(), r);
3914  }
Z3_ast Z3_API Z3_mk_seq_prefix(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if prefix is a prefix of s.

◆ pw() [1/3]

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

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

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

◆ pw() [2/3]

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

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

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

◆ pw() [3/3]

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

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

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

◆ range()

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

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

3970  {
3971  check_context(lo, hi);
3972  Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
3973  lo.check_error();
3974  return expr(lo.ctx(), r);
3975  }
Z3_ast Z3_API Z3_mk_re_range(Z3_context c, Z3_ast lo, Z3_ast hi)
Create the range regular expression over two sequences of length 1.

Referenced by AstVector::__getitem__(), z3py::AndThen(), z3py::ArraySort(), Goal::as_expr(), ApplyResult::as_expr(), FuncEntry::as_list(), FuncInterp::as_list(), NativeSolver::AssertInjective(), z3py::AtLeast(), z3py::BoolVector(), Solver::check(), Optimize::check(), ExprRef::children(), z3py::Concat(), Solver::consequences(), z3py::CreateDatatypes(), ModelRef::decls(), z3py::describe_probes(), z3py::DisjointSum(), z3py::EnumSort(), z3py::eq(), z3py::FreshFunction(), z3py::Function(), context::function(), function(), Statistics::get_key_value(), z3py::Intersect(), z3py::IntVector(), z3py::is_quantifier(), Statistics::keys(), z3py::Lambda(), Context::MkArrayConst(), Context::MkArraySort(), NativeContext::MkArraySort(), NativeContext::MkConst(), Context::MkConst(), NativeContext::MkConstDecl(), Context::MkConstDecl(), Context::MkFreshConst(), Context::MkFreshConstDecl(), Context::MkFreshFuncDecl(), NativeContext::MkFreshFuncDecl(), NativeContext::MkFuncDecl(), Context::MkFuncDecl(), Context::MkRecFuncDecl(), Context::MkUserPropagatorFuncDecl(), z3py::OrElse(), z3py::ParOr(), z3py::probes(), z3py::PropagateFunction(), z3py::RealVarVector(), z3py::RealVector(), z3py::RecAddDefinition(), context::recfun(), recfun(), z3py::RecFunction(), z3py::set_default_fp_sort(), Fixedpoint::set_predicate_representation(), ModelRef::sorts(), z3py::substitute(), z3py::substitute_funs(), z3py::substitute_vars(), z3py::tactics(), Solver::to_smt2(), z3py::TupleSort(), z3py::Union(), z3py::Update(), ModelRef::update_value(), and context::user_propagate_function().

◆ re_complement()

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

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

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

◆ re_diff()

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

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

3960  {
3961  check_context(a, b);
3962  context& ctx = a.ctx();
3963  Z3_ast r = Z3_mk_re_diff(ctx, a, b);
3964  ctx.check_error();
3965  return expr(ctx, r);
3966  }
Z3_ast Z3_API Z3_mk_re_diff(Z3_context c, Z3_ast re1, Z3_ast re2)
Create the difference of regular expressions.

◆ re_empty()

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

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

3942  {
3943  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3944  s.check_error();
3945  return expr(s.ctx(), r);
3946  }
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 3947 of file z3++.h.

3947  {
3948  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3949  s.check_error();
3950  return expr(s.ctx(), r);
3951  }
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 3952 of file z3++.h.

3952  {
3953  assert(args.size() > 0);
3954  context& ctx = args[0u].ctx();
3955  array<Z3_ast> _args(args);
3956  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3957  ctx.check_error();
3958  return expr(ctx, r);
3959  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.

◆ recfun() [1/4]

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

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

3784  {
3785  return range.ctx().recfun(name, d1, d2, range);
3786  }
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3552

◆ recfun() [2/4]

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

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

3781  {
3782  return range.ctx().recfun(name, d1, range);
3783  }

◆ recfun() [3/4]

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

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

3778  {
3779  return range.ctx().recfun(name, arity, domain, range);
3780  }

◆ recfun() [4/4]

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

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

3775  {
3776  return range.ctx().recfun(name, arity, domain, range);
3777  }

◆ rem() [1/3]

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

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

1643  {
1644  if (a.is_fpa() && b.is_fpa()) {
1645  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1646  } else {
1647  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1648  }
1649  }
Z3_ast Z3_API Z3_mk_fpa_rem(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point remainder.
Z3_ast Z3_API Z3_mk_rem(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 rem arg2.

◆ rem() [2/3]

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

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

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

◆ rem() [3/3]

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

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

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

◆ repeat()

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

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

3036  {
3037  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
3038  t.check_error();
3039  return tactic(t.ctx(), r);
3040  }
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:1953

◆ reset_params()

void z3::reset_params ( )
inline

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

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

◆ round_fpa_to_closest_integer()

expr z3::round_fpa_to_closest_integer ( expr const &  t)
inline

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

2068  {
2069  assert(t.is_fpa());
2070  Z3_ast r = Z3_mk_fpa_round_to_integral(t.ctx(), t.ctx().fpa_rounding_mode(), t);
2071  t.check_error();
2072  return expr(t.ctx(), r);
2073  }
Z3_ast Z3_API Z3_mk_fpa_round_to_integral(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point roundToIntegral. Rounds a floating-point number to the closest integer,...

◆ sbv_to_fpa()

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

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

2047  {
2048  assert(t.is_bv());
2049  Z3_ast r = Z3_mk_fpa_to_fp_signed(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2050  t.check_error();
2051  return expr(t.ctx(), r);
2052  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_signed(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.

◆ select() [1/3]

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

forward declarations

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

3788  {
3789  check_context(a, i);
3790  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3791  a.check_error();
3792  return expr(a.ctx(), r);
3793  }
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i)
Array read. The argument a is the array and i is the index of the array that gets read.

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

◆ select() [2/3]

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

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

3797  {
3798  check_context(a, i);
3799  array<Z3_ast> idxs(i);
3800  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3801  a.check_error();
3802  return expr(a.ctx(), r);
3803  }
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 3794 of file z3++.h.

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

◆ set_add()

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

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

3854  {
3855  MK_EXPR2(Z3_mk_set_add, s, e);
3856  }
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 3882 of file z3++.h.

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

◆ set_del()

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

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

3858  {
3859  MK_EXPR2(Z3_mk_set_del, s, e);
3860  }
Z3_ast Z3_API Z3_mk_set_del(Z3_context c, Z3_ast set, Z3_ast elem)
Remove an element to a set.

◆ set_difference()

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

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

3878  {
3880  }
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 3870 of file z3++.h.

3870  {
3871  check_context(a, b);
3872  Z3_ast es[2] = { a, b };
3873  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3874  a.check_error();
3875  return expr(a.ctx(), r);
3876  }
Z3_ast Z3_API Z3_mk_set_intersect(Z3_context c, unsigned num_args, Z3_ast const args[])
Take the intersection of a list of sets.

◆ set_member()

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

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

3886  {
3887  MK_EXPR2(Z3_mk_set_member, s, e);
3888  }
Z3_ast Z3_API Z3_mk_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check for set membership.

◆ set_param() [1/3]

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

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

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

◆ set_param() [2/3]

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

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

79 { Z3_global_param_set(param, value); }

◆ set_param() [3/3]

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

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

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

◆ set_subset()

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

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

3890  {
3891  MK_EXPR2(Z3_mk_set_subset, a, b);
3892  }
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 3862 of file z3++.h.

3862  {
3863  check_context(a, b);
3864  Z3_ast es[2] = { a, b };
3865  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
3866  a.check_error();
3867  return expr(a.ctx(), r);
3868  }
Z3_ast Z3_API Z3_mk_set_union(Z3_context c, unsigned num_args, Z3_ast const args[])
Take the union of a list of sets.

◆ sext()

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

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

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

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

◆ sge() [1/3]

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

signed greater than or equal to operator for bitvectors.

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

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

Referenced by sge().

◆ sge() [2/3]

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

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

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

◆ sge() [3/3]

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

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

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

◆ sgt() [1/3]

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

signed greater than operator for bitvectors.

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

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

Referenced by sgt().

◆ sgt() [2/3]

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

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

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

◆ sgt() [3/3]

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

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

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

◆ shl() [1/3]

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

shift left operator for bitvectors

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

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

Referenced by shl().

◆ shl() [2/3]

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

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

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

◆ shl() [3/3]

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

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

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

◆ sle() [1/3]

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

signed less than or equal to operator for bitvectors.

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

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

Referenced by sle().

◆ sle() [2/3]

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

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

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

◆ sle() [3/3]

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

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

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

◆ slt() [1/3]

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

signed less than operator for bitvectors.

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

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

Referenced by slt().

◆ slt() [2/3]

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

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

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

◆ slt() [3/3]

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

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

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

◆ smod() [1/3]

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

signed modulus operator for bitvectors

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

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

Referenced by smod().

◆ smod() [2/3]

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

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

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

◆ smod() [3/3]

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

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

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

◆ sqrt()

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

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

2001  {
2002  check_context(a, rm);
2003  assert(a.is_fpa());
2004  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
2005  a.check_error();
2006  return expr(a.ctx(), r);
2007  }
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 2172 of file z3++.h.

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

Referenced by srem().

◆ srem() [2/3]

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

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

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

◆ srem() [3/3]

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

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

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

◆ star()

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

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

3939  {
3940  MK_EXPR1(Z3_mk_re_star, re);
3941  }
Z3_ast Z3_API Z3_mk_re_star(Z3_context c, Z3_ast re)
Create the regular language re*.

◆ store() [1/5]

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

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

3805  {
3806  check_context(a, i); check_context(a, v);
3807  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3808  a.check_error();
3809  return expr(a.ctx(), r);
3810  }
Z3_ast Z3_API Z3_mk_store(Z3_context c, Z3_ast a, Z3_ast i, Z3_ast v)
Array update.

Referenced by store().

◆ store() [2/5]

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

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

3813 { 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:3817

◆ store() [3/5]

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

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

3817  {
3818  check_context(a, i); check_context(a, v);
3819  array<Z3_ast> idxs(i);
3820  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3821  a.check_error();
3822  return expr(a.ctx(), r);
3823  }
Z3_ast Z3_API Z3_mk_store_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs, Z3_ast v)
n-ary Array update.

◆ store() [4/5]

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

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

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

◆ store() [5/5]

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

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

3814  {
3815  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
3816  }

◆ suffixof()

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

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

3903  {
3904  check_context(a, b);
3905  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3906  a.check_error();
3907  return expr(a.ctx(), r);
3908  }
Z3_ast Z3_API Z3_mk_seq_suffix(Z3_context c, Z3_ast suffix, Z3_ast s)
Check if suffix is a suffix of s.

◆ sum()

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

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

2424  {
2425  assert(args.size() > 0);
2426  context& ctx = args[0u].ctx();
2427  array<Z3_ast> _args(args);
2428  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
2429  ctx.check_error();
2430  return expr(ctx, r);
2431  }

◆ to_check_result()

check_result z3::to_check_result ( Z3_lbool  l)
inline

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

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

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

◆ to_expr()

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

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

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

2093  {
2094  c.check_error();
2095  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
2096  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
2097  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
2099  return expr(c, a);
2100  }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.
@ Z3_APP_AST
Definition: z3_api.h:141
@ Z3_VAR_AST
Definition: z3_api.h:142
@ Z3_NUMERAL_AST
Definition: z3_api.h:140
@ Z3_QUANTIFIER_AST
Definition: z3_api.h:143

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

◆ to_func_decl()

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

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

2107  {
2108  c.check_error();
2109  return func_decl(c, f);
2110  }

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

◆ to_re()

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

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

3927  {
3929  }
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 3745 of file z3++.h.

3745 { 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 2102 of file z3++.h.

2102  {
2103  c.check_error();
2104  return sort(c, s);
2105  }

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

◆ tree_order()

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

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

2265  {
2266  return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
2267  }
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 3047 of file z3++.h.

3047  {
3048  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
3049  t.check_error();
3050  return tactic(t.ctx(), r);
3051  }
Z3_tactic Z3_API Z3_tactic_try_for(Z3_context c, Z3_tactic t, unsigned ms)
Return a tactic that applies t to a given goal for ms milliseconds. If t does not terminate in ms mil...

◆ ubv_to_fpa()

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

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

2054  {
2055  assert(t.is_bv());
2056  Z3_ast r = Z3_mk_fpa_to_fp_unsigned(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2057  t.check_error();
2058  return expr(t.ctx(), r);
2059  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_unsigned(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a 2's complement unsigned bit-vector term into a term of FloatingPoint sort.

◆ udiv() [1/3]

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

unsigned division operator for bitvectors.

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

2165 { return to_expr(a.ctx(), Z3_mk_bvudiv(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvudiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned division.

Referenced by udiv().

◆ udiv() [2/3]

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

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

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

◆ udiv() [3/3]

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

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

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

◆ uge() [1/3]

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

unsigned greater than or equal to operator for bitvectors.

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

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

Referenced by uge().

◆ uge() [2/3]

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

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

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

◆ uge() [3/3]

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

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

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

◆ ugt() [1/3]

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

unsigned greater than operator for bitvectors.

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

2159 { return to_expr(a.ctx(), Z3_mk_bvugt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvugt(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than.

Referenced by ugt().

◆ ugt() [2/3]

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

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

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

◆ ugt() [3/3]

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

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

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

◆ ule() [1/3]

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

unsigned less than or equal to operator for bitvectors.

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

2141 { return to_expr(a.ctx(), Z3_mk_bvule(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvule(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned less than or equal to.

Referenced by ule().

◆ ule() [2/3]

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

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

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

◆ ule() [3/3]

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

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

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

◆ ult() [1/3]

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

unsigned less than operator for bitvectors.

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

2147 { return to_expr(a.ctx(), Z3_mk_bvult(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvult(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned less than.

Referenced by ult().

◆ ult() [2/3]

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

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

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

◆ ult() [3/3]

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

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

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

◆ urem() [1/3]

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

unsigned reminder operator for bitvectors

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

2186 { return to_expr(a.ctx(), Z3_mk_bvurem(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvurem(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned remainder.

Referenced by urem().

◆ urem() [2/3]

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

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

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

◆ urem() [3/3]

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

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

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

◆ when()

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

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

3312  {
3313  check_context(p, t);
3314  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
3315  t.check_error();
3316  return tactic(t.ctx(), r);
3317  }
Z3_tactic Z3_API Z3_tactic_when(Z3_context c, Z3_probe p, Z3_tactic t)
Return a tactic that applies t to a given goal is the probe p evaluates to true. If p evaluates to fa...

◆ with()

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

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

3042  {
3043  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
3044  t.check_error();
3045  return tactic(t.ctx(), r);
3046  }
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 1936 of file z3++.h.

1936 { if (a.is_bool()) return !(a ^ b); check_context(a, b); Z3_ast r = Z3_mk_bvxnor(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvxnor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise xnor.

◆ zext()

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

2214 { return to_expr(a.ctx(), Z3_mk_zero_ext(a.ctx(), i, a)); }
Z3_ast Z3_API Z3_mk_zero_ext(Z3_context c, unsigned i, Z3_ast t1)
Extend the given bit-vector with zeros to the (unsigned) equivalent bit-vector of size m+i,...