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

Z3 C++ namespace. More...

Data Structures

class  apply_result
 
class  array
 
class  ast
 
class  ast_vector_tpl
 
class  cast_ast
 
class  cast_ast< ast >
 
class  cast_ast< expr >
 
class  cast_ast< func_decl >
 
class  cast_ast< sort >
 
class  config
 Z3 global configuration object. More...
 
class  constructor_list
 
class  constructors
 
class  context
 A Context manages all other Z3 objects, global configuration options, etc. More...
 
class  exception
 Exception used to sign API usage errors. More...
 
class  expr
 A Z3 expression is used to represent formulas and terms. For Z3, a formula is any expression of sort Boolean. Every expression has a sort. More...
 
class  fixedpoint
 
class  func_decl
 Function declaration (aka function definition). It is the signature of interpreted and uninterpreted functions in Z3. The basic building block in Z3 is the function application. More...
 
class  func_entry
 
class  func_interp
 
class  goal
 
class  model
 
class  object
 
class  on_clause
 
class  optimize
 
class  param_descrs
 
class  parameter
 class for auxiliary parameters associated with func_decl The class is initialized with a func_decl or application expression and an index The accessor get_expr, get_sort, ... is available depending on the value of kind(). The caller is responsible to check that the kind of the parameter aligns with the call (get_expr etc). More...
 
class  params
 
class  probe
 
class  rcf_num
 Wrapper for Z3 Real Closed Field (RCF) numerals. More...
 
class  simplifier
 
class  solver
 
class  sort
 A Z3 sort (aka type). Every expression (i.e., formula or term) in Z3 has a sort. More...
 
class  stats
 
class  symbol
 
class  tactic
 
class  user_propagator_base
 

Typedefs

typedef ast_vector_tpl< astast_vector
 
typedef ast_vector_tpl< exprexpr_vector
 
typedef ast_vector_tpl< sortsort_vector
 
typedef ast_vector_tpl< func_declfunc_decl_vector
 
typedef std::function< void(expr const &proof, std::vector< unsigned > const &deps, 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 ()
 
void get_version (unsigned &major, unsigned &minor, unsigned &build_number, unsigned &revision_number)
 Return Z3 version number information. More...
 
std::string get_full_version ()
 Return a string that fully describes the version of Z3 in use. More...
 
void enable_trace (char const *tag)
 Enable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise. More...
 
void disable_trace (char const *tag)
 Disable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise. More...
 
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 sdiv (expr const &a, expr const &b)
 signed division operator for bitvectors. More...
 
expr sdiv (expr const &a, int b)
 
expr sdiv (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_vector polynomial_subresultants (expr const &p, expr const &q, expr const &x)
 Return the nonzero subresultants of p and q with respect to the "variable" x. More...
 
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 map (expr const &f, expr const &list)
 
expr mapi (expr const &f, expr const &i, expr const &list)
 
expr foldl (expr const &f, expr const &a, expr const &list)
 
expr foldli (expr const &f, expr const &i, expr const &a, expr const &list)
 
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)
 
simplifier operator& (simplifier const &t1, simplifier const &t2)
 
simplifier with (simplifier const &t, params const &p)
 
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 array_default (expr const &a)
 
expr array_ext (expr const &a, expr const &b)
 
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)
 
rcf_num rcf_pi (context &c)
 Create an RCF numeral representing pi. More...
 
rcf_num rcf_e (context &c)
 Create an RCF numeral representing e (Euler's constant). More...
 
rcf_num rcf_infinitesimal (context &c)
 Create an RCF numeral representing an infinitesimal. More...
 
std::vector< rcf_numrcf_roots (context &c, std::vector< rcf_num > const &coeffs)
 Find roots of a polynomial with given coefficients. More...
 

Detailed Description

Z3 C++ namespace.

Typedef Documentation

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

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

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

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

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

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

Enumeration Type Documentation

Enumerator
unsat 
sat 
unknown 

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

166  {
167  unsat, sat, unknown
168  };
Definition: z3++.h:167
Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

170  {
171  RNA,
172  RNE,
173  RTP,
174  RTN,
175  RTZ
176  };
Definition: z3++.h:174
Definition: z3++.h:171
Definition: z3++.h:175
Definition: z3++.h:173
Definition: z3++.h:172

Function Documentation

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

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

Referenced by ArithRef::__abs__().

2082  {
2083  Z3_ast r;
2084  if (a.is_int()) {
2085  expr zero = a.ctx().int_val(0);
2086  expr ge = a >= zero;
2087  expr na = -a;
2088  r = Z3_mk_ite(a.ctx(), ge, a, na);
2089  }
2090  else if (a.is_real()) {
2091  expr zero = a.ctx().real_val(0);
2092  expr ge = a >= zero;
2093  expr na = -a;
2094  r = Z3_mk_ite(a.ctx(), ge, a, na);
2095  }
2096  else {
2097  r = Z3_mk_fpa_abs(a.ctx(), a);
2098  }
2099  a.check_error();
2100  return expr(a.ctx(), r);
2101  }
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
expr z3::array_default ( expr const &  a)
inline

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

4191  {
4192  Z3_ast r = Z3_mk_array_default(a.ctx(), a);
4193  a.check_error();
4194  return expr(a.ctx(), r);
4195  }
Z3_ast Z3_API Z3_mk_array_default(Z3_context c, Z3_ast array)
Access the array default value. Produces the default range value, for arrays that can be represented ...
expr z3::array_ext ( expr const &  a,
expr const &  b 
)
inline

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

4197  {
4198  check_context(a, b);
4199  Z3_ast r = Z3_mk_array_ext(a.ctx(), a, b);
4200  a.check_error();
4201  return expr(a.ctx(), r);
4202  }
Z3_ast Z3_API Z3_mk_array_ext(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create array extensionality index given two arrays with the same sort. The meaning is given by the ax...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::as_array ( func_decl f)
inline

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

4185  {
4186  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
4187  f.check_error();
4188  return expr(f.ctx(), r);
4189  }
Z3_ast Z3_API Z3_mk_as_array(Z3_context c, Z3_func_decl f)
Create array with the same interpretation as a function. The array satisfies the property (f x) = (se...
expr z3::ashr ( expr const &  a,
expr const &  b 
)
inline

arithmetic shift right operator for bitvectors

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

Referenced by ashr().

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

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

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

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

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

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

2538  {
2539  assert(es.size() > 0);
2540  context& ctx = es[0u].ctx();
2541  array<Z3_ast> _es(es);
2542  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
2543  ctx.check_error();
2544  return expr(ctx, r);
2545  }
Z3_ast Z3_API Z3_mk_atleast(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.
expr z3::atmost ( expr_vector const &  es,
unsigned  bound 
)
inline

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

2530  {
2531  assert(es.size() > 0);
2532  context& ctx = es[0u].ctx();
2533  array<Z3_ast> _es(es);
2534  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
2535  ctx.check_error();
2536  return expr(ctx, r);
2537  }
Z3_ast Z3_API Z3_mk_atmost(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.
expr z3::bv2int ( expr const &  a,
bool  is_signed 
)
inline

bit-vector and integer conversions.

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

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

bit-vector overflow/underflow checks

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

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

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

2337  {
2338  check_context(a, b); Z3_ast r = Z3_mk_bvadd_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2339  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_bvadd_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed addition of t1 and t2 does not underflow...
expr z3::bvmul_no_overflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

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

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

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

2355  {
2356  check_context(a, b); Z3_ast r = Z3_mk_bvmul_no_underflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2357  }
Z3_ast Z3_API Z3_mk_bvmul_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed multiplication of t1 and t2 does not underflo...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::bvneg_no_overflow ( expr const &  a)
inline

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

2349  {
2350  Z3_ast r = Z3_mk_bvneg_no_overflow(a.ctx(), a); a.check_error(); return expr(a.ctx(), r);
2351  }
Z3_ast Z3_API Z3_mk_bvneg_no_overflow(Z3_context c, Z3_ast t1)
Check that bit-wise negation does not overflow when t1 is interpreted as a signed bit-vector...
expr z3::bvredand ( expr const &  a)
inline

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

2076  {
2077  assert(a.is_bv());
2078  Z3_ast r = Z3_mk_bvredand(a.ctx(), a);
2079  a.check_error();
2080  return expr(a.ctx(), r);
2081  }
Z3_ast Z3_API Z3_mk_bvredand(Z3_context c, Z3_ast t1)
Take conjunction of bits in vector, return vector of length 1.
expr z3::bvredor ( expr const &  a)
inline

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

2070  {
2071  assert(a.is_bv());
2072  Z3_ast r = Z3_mk_bvredor(a.ctx(), a);
2073  a.check_error();
2074  return expr(a.ctx(), r);
2075  }
Z3_ast Z3_API Z3_mk_bvredor(Z3_context c, Z3_ast t1)
Take disjunction of bits in vector, return vector of length 1.
expr z3::bvsdiv_no_overflow ( expr const &  a,
expr const &  b 
)
inline

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

2346  {
2347  check_context(a, b); Z3_ast r = Z3_mk_bvsdiv_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2348  }
Z3_ast Z3_API Z3_mk_bvsdiv_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed division of t1 and t2 does not overflow...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::bvsub_no_overflow ( expr const &  a,
expr const &  b 
)
inline

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

2340  {
2341  check_context(a, b); Z3_ast r = Z3_mk_bvsub_no_overflow(a.ctx(), a, b); a.check_error(); return expr(a.ctx(), r);
2342  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_bvsub_no_overflow(Z3_context c, Z3_ast t1, Z3_ast t2)
Create a predicate that checks that the bit-wise signed subtraction of t1 and t2 does not overflow...
expr z3::bvsub_no_underflow ( expr const &  a,
expr const &  b,
bool  is_signed 
)
inline

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

2343  {
2344  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);
2345  }
Z3_ast Z3_API Z3_mk_bvsub_no_underflow(Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed)
Create a predicate that checks that the bit-wise subtraction of t1 and t2 does not underflow...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
void z3::check_context ( object const &  a,
object const &  b 
)
inline
expr z3::concat ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by operator+().

2564  {
2565  check_context(a, b);
2566  Z3_ast r;
2567  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2568  Z3_ast _args[2] = { a, b };
2569  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2570  }
2571  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2572  Z3_ast _args[2] = { a, b };
2573  r = Z3_mk_re_concat(a.ctx(), 2, _args);
2574  }
2575  else {
2576  r = Z3_mk_concat(a.ctx(), a, b);
2577  }
2578  a.ctx().check_error();
2579  return expr(a.ctx(), r);
2580  }
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.
expr z3::concat ( expr_vector const &  args)
inline

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

2582  {
2583  Z3_ast r;
2584  assert(args.size() > 0);
2585  if (args.size() == 1) {
2586  return args[0u];
2587  }
2588  context& ctx = args[0u].ctx();
2589  array<Z3_ast> _args(args);
2590  if (Z3_is_seq_sort(ctx, args[0u].get_sort())) {
2591  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2592  }
2593  else if (Z3_is_re_sort(ctx, args[0u].get_sort())) {
2594  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2595  }
2596  else {
2597  r = _args[args.size()-1];
2598  for (unsigned i = args.size()-1; i > 0; ) {
2599  --i;
2600  r = Z3_mk_concat(ctx, _args[i], r);
2601  ctx.check_error();
2602  }
2603  }
2604  ctx.check_error();
2605  return expr(ctx, r);
2606  }
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.
tactic z3::cond ( probe const &  p,
tactic const &  t1,
tactic const &  t2 
)
inline

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

3648  {
3649  check_context(p, t1); check_context(p, t2);
3650  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
3651  t1.check_error();
3652  return tactic(t1.ctx(), r);
3653  }
Z3_tactic Z3_API Z3_tactic_cond(Z3_context c, Z3_probe p, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal if the probe p evaluates to true, and t2 if p evaluat...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::const_array ( sort const &  d,
expr const &  v 
)
inline

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

4215  {
4216  MK_EXPR2(Z3_mk_const_array, d, v);
4217  }
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:4209
void z3::disable_trace ( char const *  tag)
inline

Disable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.

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

112  {
113  Z3_disable_trace(tag);
114  }
void Z3_API Z3_disable_trace(Z3_string tag)
Disable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise...
expr z3::distinct ( expr_vector const &  args)
inline

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

2555  {
2556  assert(args.size() > 0);
2557  context& ctx = args[0u].ctx();
2558  array<Z3_ast> _args(args);
2559  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2560  ctx.check_error();
2561  return expr(ctx, r);
2562  }
Z3_ast Z3_API Z3_mk_distinct(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing distinct(args[0], ..., args[num_args-1]).
expr z3::empty ( sort const &  s)
inline

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

4271  {
4272  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
4273  s.check_error();
4274  return expr(s.ctx(), r);
4275  }
Z3_ast Z3_API Z3_mk_seq_empty(Z3_context c, Z3_sort seq)
Create an empty sequence of the sequence sort seq.
expr z3::empty_set ( sort const &  s)
inline

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

4219  {
4221  }
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:4204
void z3::enable_trace ( char const *  tag)
inline

Enable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise.

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

104  {
105  Z3_enable_trace(tag);
106  }
void Z3_API Z3_enable_trace(Z3_string tag)
Enable tracing messages tagged as tag when Z3 is compiled in debug mode. It is a NOOP otherwise...
bool z3::eq ( ast const &  a,
ast const &  b 
)
inline

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

650 { return Z3_is_eq_ast(a.ctx(), a, b); }
bool Z3_API Z3_is_eq_ast(Z3_context c, Z3_ast t1, Z3_ast t2)
Compare terms.
expr z3::exists ( expr const &  x,
expr const &  b 
)
inline

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

2457  {
2458  check_context(x, b);
2459  Z3_app vars[] = {(Z3_app) x};
2460  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2461  }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2462  {
2463  check_context(x1, b); check_context(x2, b);
2464  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2465  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2466  }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  b 
)
inline

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

2467  {
2468  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2469  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2470  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2471  }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::exists ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  x4,
expr const &  b 
)
inline

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

2472  {
2473  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2474  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2475  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2476  }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::exists ( expr_vector const &  xs,
expr const &  b 
)
inline

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

2477  {
2478  array<Z3_app> vars(xs);
2479  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);
2480  }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.
tactic z3::fail_if ( probe const &  p)
inline

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

3637  {
3638  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
3639  p.check_error();
3640  return tactic(p.ctx(), r);
3641  }
Z3_tactic Z3_API Z3_tactic_fail_if(Z3_context c, Z3_probe p)
Return a tactic that fails if the probe p evaluates to false.
expr z3::fma ( expr const &  a,
expr const &  b,
expr const &  c,
expr const &  rm 
)
inline

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

2118  {
2119  check_context(a, b); check_context(a, c); check_context(a, rm);
2120  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
2121  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
2122  a.check_error();
2123  return expr(a.ctx(), r);
2124  }
Z3_ast Z3_API Z3_mk_fpa_fma(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Floating-point fused multiply-add.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::foldl ( expr const &  f,
expr const &  a,
expr const &  list 
)
inline

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

2622  {
2623  context& ctx = f.ctx();
2624  Z3_ast r = Z3_mk_seq_foldl(ctx, f, a, list);
2625  ctx.check_error();
2626  return expr(ctx, r);
2627  }
Z3_ast Z3_API Z3_mk_seq_foldl(Z3_context c, Z3_ast f, Z3_ast a, Z3_ast s)
Create a fold of the function f over the sequence s with accumulator a.
expr z3::foldli ( expr const &  f,
expr const &  i,
expr const &  a,
expr const &  list 
)
inline

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

2629  {
2630  context& ctx = f.ctx();
2631  Z3_ast r = Z3_mk_seq_foldli(ctx, f, i, a, list);
2632  ctx.check_error();
2633  return expr(ctx, r);
2634  }
Z3_ast Z3_API Z3_mk_seq_foldli(Z3_context c, Z3_ast f, Z3_ast i, Z3_ast a, Z3_ast s)
Create a fold with index tracking of the function f over the sequence s with accumulator a starting a...
expr z3::forall ( expr const &  x,
expr const &  b 
)
inline

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

2433  {
2434  check_context(x, b);
2435  Z3_app vars[] = {(Z3_app) x};
2436  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2437  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...
expr z3::forall ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2438  {
2439  check_context(x1, b); check_context(x2, b);
2440  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2441  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2442  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...
expr z3::forall ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  b 
)
inline

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

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

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

2448  {
2449  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2450  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2451  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
2452  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...
expr z3::forall ( expr_vector const &  xs,
expr const &  b 
)
inline

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

2453  {
2454  array<Z3_app> vars(xs);
2455  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);
2456  }
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables...
expr z3::fp_eq ( expr const &  a,
expr const &  b 
)
inline

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

2109  {
2110  check_context(a, b);
2111  assert(a.is_fpa());
2112  Z3_ast r = Z3_mk_fpa_eq(a.ctx(), a, b);
2113  a.check_error();
2114  return expr(a.ctx(), r);
2115  }
Z3_ast Z3_API Z3_mk_fpa_eq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point equality.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::fpa_fp ( expr const &  sgn,
expr const &  exp,
expr const &  sig 
)
inline

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

2126  {
2127  check_context(sgn, exp); check_context(exp, sig);
2128  assert(sgn.is_bv() && exp.is_bv() && sig.is_bv());
2129  Z3_ast r = Z3_mk_fpa_fp(sgn.ctx(), sgn, exp, sig);
2130  sgn.check_error();
2131  return expr(sgn.ctx(), r);
2132  }
Z3_ast Z3_API Z3_mk_fpa_fp(Z3_context c, Z3_ast sgn, Z3_ast exp, Z3_ast sig)
Create an expression of FloatingPoint sort from three bit-vector expressions.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::fpa_to_fpa ( expr const &  t,
sort  s 
)
inline

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

2162  {
2163  assert(t.is_fpa());
2164  Z3_ast r = Z3_mk_fpa_to_fp_float(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2165  t.check_error();
2166  return expr(t.ctx(), r);
2167  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_float(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a FloatingPoint term into another term of different FloatingPoint sort.
expr z3::fpa_to_sbv ( expr const &  t,
unsigned  sz 
)
inline

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

2134  {
2135  assert(t.is_fpa());
2136  Z3_ast r = Z3_mk_fpa_to_sbv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
2137  t.check_error();
2138  return expr(t.ctx(), r);
2139  }
Z3_ast Z3_API Z3_mk_fpa_to_sbv(Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz)
Conversion of a floating-point term into a signed bit-vector.
expr z3::fpa_to_ubv ( expr const &  t,
unsigned  sz 
)
inline

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

2141  {
2142  assert(t.is_fpa());
2143  Z3_ast r = Z3_mk_fpa_to_ubv(t.ctx(), t.ctx().fpa_rounding_mode(), t, sz);
2144  t.check_error();
2145  return expr(t.ctx(), r);
2146  }
Z3_ast Z3_API Z3_mk_fpa_to_ubv(Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz)
Conversion of a floating-point term into an unsigned bit-vector.
expr z3::full_set ( sort const &  s)
inline

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

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

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

4107  {
4108  return range.ctx().function(name, arity, domain, range);
4109  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
func_decl z3::function ( char const *  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

4110  {
4111  return range.ctx().function(name, arity, domain, range);
4112  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
func_decl z3::function ( char const *  name,
sort const &  domain,
sort const &  range 
)
inline

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

4113  {
4114  return range.ctx().function(name, domain, range);
4115  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
func_decl z3::function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  range 
)
inline

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

4116  {
4117  return range.ctx().function(name, d1, d2, range);
4118  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
func_decl z3::function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  d3,
sort const &  range 
)
inline

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

4119  {
4120  return range.ctx().function(name, d1, d2, d3, range);
4121  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
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 4122 of file z3++.h.

4122  {
4123  return range.ctx().function(name, d1, d2, d3, d4, range);
4124  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
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 4125 of file z3++.h.

4125  {
4126  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
4127  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
func_decl z3::function ( char const *  name,
sort_vector const &  domain,
sort const &  range 
)
inline

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

4128  {
4129  return range.ctx().function(name, domain, range);
4130  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
func_decl z3::function ( std::string const &  name,
sort_vector const &  domain,
sort const &  range 
)
inline

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

4131  {
4132  return range.ctx().function(name.c_str(), domain, range);
4133  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3828
std::string z3::get_full_version ( )
inline

Return a string that fully describes the version of Z3 in use.

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

96  {
97  return std::string(Z3_get_full_version());
98  }
Z3_string Z3_API Z3_get_full_version(void)
Return a string that fully describes the version of Z3 in use.
void z3::get_version ( unsigned &  major,
unsigned &  minor,
unsigned &  build_number,
unsigned &  revision_number 
)
inline

Return Z3 version number information.

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

89  {
90  Z3_get_version(&major, &minor, &build_number, &revision_number);
91  }
void Z3_API Z3_get_version(unsigned *major, unsigned *minor, unsigned *build_number, unsigned *revision_number)
Return Z3 version number information.
expr z3::implies ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by implies().

1716  {
1717  assert(a.is_bool() && b.is_bool());
1718  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1719  }
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:1709
expr z3::implies ( expr const &  a,
bool  b 
)
inline

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

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

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

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

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

4303  {
4304  MK_EXPR2(Z3_mk_seq_in_re, s, re);
4305  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:4209
Z3_ast Z3_API Z3_mk_seq_in_re(Z3_context c, Z3_ast seq, Z3_ast re)
Check if seq is in the language generated by the regular expression re.
expr z3::indexof ( expr const &  s,
expr const &  substr,
expr const &  offset 
)
inline

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

4288  {
4289  check_context(s, substr); check_context(s, offset);
4290  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
4291  s.check_error();
4292  return expr(s.ctx(), r);
4293  }
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...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::int2bv ( unsigned  n,
expr const &  a 
)
inline

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

2329 { Z3_ast r = Z3_mk_int2bv(a.ctx(), n, a); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_int2bv(Z3_context c, unsigned n, Z3_ast t1)
Create an n bit bit-vector from the integer argument t1.
expr z3::is_int ( expr const &  e)
inline

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

1764 { _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:1756
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 2181 of file z3++.h.

2181  {
2182  check_context(c, t); check_context(c, e);
2183  assert(c.is_bool());
2184  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
2185  c.check_error();
2186  return expr(c.ctx(), r);
2187  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
expr z3::lambda ( expr const &  x,
expr const &  b 
)
inline

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

2481  {
2482  check_context(x, b);
2483  Z3_app vars[] = {(Z3_app) x};
2484  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
2485  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  b 
)
inline

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

2486  {
2487  check_context(x1, b); check_context(x2, b);
2488  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
2489  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
2490  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  b 
)
inline

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

2491  {
2492  check_context(x1, b); check_context(x2, b); check_context(x3, b);
2493  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
2494  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
2495  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::lambda ( expr const &  x1,
expr const &  x2,
expr const &  x3,
expr const &  x4,
expr const &  b 
)
inline

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

2496  {
2497  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
2498  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
2499  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
2500  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::lambda ( expr_vector const &  xs,
expr const &  b 
)
inline

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

2501  {
2502  array<Z3_app> vars(xs);
2503  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
2504  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
expr z3::last_indexof ( expr const &  s,
expr const &  substr 
)
inline

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

4294  {
4295  check_context(s, substr);
4296  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
4297  s.check_error();
4298  return expr(s.ctx(), r);
4299  }
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 -...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
func_decl z3::linear_order ( sort const &  a,
unsigned  index 
)
inline

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

2365  {
2366  return to_func_decl(a.ctx(), Z3_mk_linear_order(a.ctx(), a, index));
2367  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2208
Z3_func_decl Z3_API Z3_mk_linear_order(Z3_context c, Z3_sort a, unsigned id)
create a linear ordering relation over signature a. The relation is identified by the index id...
expr z3::lshr ( expr const &  a,
expr const &  b 
)
inline

logic shift right operator for bitvectors

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

Referenced by lshr().

2309 { return to_expr(a.ctx(), Z3_mk_bvlshr(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvlshr(Z3_context c, Z3_ast t1, Z3_ast t2)
Logical shift right.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::lshr ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

2608  {
2609  context& ctx = f.ctx();
2610  Z3_ast r = Z3_mk_seq_map(ctx, f, list);
2611  ctx.check_error();
2612  return expr(ctx, r);
2613  }
Z3_ast Z3_API Z3_mk_seq_map(Z3_context c, Z3_ast f, Z3_ast s)
Create a map of the function f over the sequence s.
expr z3::mapi ( expr const &  f,
expr const &  i,
expr const &  list 
)
inline

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

2615  {
2616  context& ctx = f.ctx();
2617  Z3_ast r = Z3_mk_seq_mapi(ctx, f, i, list);
2618  ctx.check_error();
2619  return expr(ctx, r);
2620  }
Z3_ast Z3_API Z3_mk_seq_mapi(Z3_context c, Z3_ast f, Z3_ast i, Z3_ast s)
Create a map of the function f over the sequence s starting at index i.
expr z3::max ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by repeat().

2054  {
2055  check_context(a, b);
2056  Z3_ast r;
2057  if (a.is_arith()) {
2058  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
2059  }
2060  else if (a.is_bv()) {
2061  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
2062  }
2063  else {
2064  assert(a.is_fpa());
2065  r = Z3_mk_fpa_max(a.ctx(), a, b);
2066  }
2067  a.check_error();
2068  return expr(a.ctx(), r);
2069  }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
Z3_ast Z3_API Z3_mk_fpa_max(Z3_context c, Z3_ast t1, Z3_ast t2)
Maximum of floating-point numbers.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
expr z3::min ( expr const &  a,
expr const &  b 
)
inline

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

2038  {
2039  check_context(a, b);
2040  Z3_ast r;
2041  if (a.is_arith()) {
2042  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
2043  }
2044  else if (a.is_bv()) {
2045  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
2046  }
2047  else {
2048  assert(a.is_fpa());
2049  r = Z3_mk_fpa_min(a.ctx(), a, b);
2050  }
2051  a.check_error();
2052  return expr(a.ctx(), r);
2053  }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
Z3_ast Z3_API Z3_mk_fpa_min(Z3_context c, Z3_ast t1, Z3_ast t2)
Minimum of floating-point numbers.
expr z3::mk_and ( expr_vector const &  args)
inline

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

2642  {
2643  array<Z3_ast> _args(args);
2644  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2645  args.check_error();
2646  return expr(args.ctx(), r);
2647  }
Z3_ast Z3_API Z3_mk_and(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] and ... and args[num_args-1].
expr z3::mk_or ( expr_vector const &  args)
inline

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

2636  {
2637  array<Z3_ast> _args(args);
2638  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2639  args.check_error();
2640  return expr(args.ctx(), r);
2641  }
Z3_ast Z3_API Z3_mk_or(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] or ... or args[num_args-1].
expr z3::mk_xor ( expr_vector const &  args)
inline

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

2648  {
2649  if (args.empty())
2650  return args.ctx().bool_val(false);
2651  expr r = args[0u];
2652  for (unsigned i = 1; i < args.size(); ++i)
2653  r = r ^ args[i];
2654  return r;
2655  }
expr z3::mod ( expr const &  a,
expr const &  b 
)
inline

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

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

1728  {
1729  if (a.is_bv()) {
1730  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1731  }
1732  else {
1733  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1734  }
1735  }
Z3_ast Z3_API Z3_mk_mod(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 mod arg2.
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows divisor).
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1709
expr z3::mod ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

2035 { 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.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::nor ( expr const &  a,
expr const &  b 
)
inline

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

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

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

1762 { assert(a.is_bool()); _Z3_MK_UN_(a, Z3_mk_not); }
Z3_ast Z3_API Z3_mk_not(Z3_context c, Z3_ast a)
Create an AST node representing not(a).
#define _Z3_MK_UN_(a, mkun)
Definition: z3++.h:1756
probe z3::operator! ( probe const &  p)
inline

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

3453  {
3454  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
3455  }
Z3_probe Z3_API Z3_probe_not(Z3_context x, Z3_probe p)
Return a probe that evaluates to "true" when p does not evaluate to true.
expr z3::operator!= ( expr const &  a,
expr const &  b 
)
inline

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

1804  {
1805  check_context(a, b);
1806  Z3_ast args[2] = { a, b };
1807  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1808  a.check_error();
1809  return expr(a.ctx(), r);
1810  }
Z3_ast Z3_API Z3_mk_distinct(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing distinct(args[0], ..., args[num_args-1]).
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator!= ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3293  {
3294  check_context(t1, t2);
3295  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
3296  t1.check_error();
3297  return tactic(t1.ctx(), r);
3298  }
Z3_tactic Z3_API Z3_tactic_and_then(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal and t2 to every subgoal produced by t1...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
simplifier z3::operator& ( simplifier const &  t1,
simplifier const &  t2 
)
inline

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

3367  {
3368  check_context(t1, t2);
3369  Z3_simplifier r = Z3_simplifier_and_then(t1.ctx(), t1, t2);
3370  t1.check_error();
3371  return simplifier(t1.ctx(), r);
3372  }
Z3_simplifier Z3_API Z3_simplifier_and_then(Z3_context c, Z3_simplifier t1, Z3_simplifier t2)
Return a simplifier that applies t1 to a given goal and t2 to every subgoal produced by t1...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator&& ( expr const &  a,
expr const &  b 
)
inline
Precondition
a.is_bool()
b.is_bool()

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

1768  {
1769  check_context(a, b);
1770  assert(a.is_bool() && b.is_bool());
1771  Z3_ast args[2] = { a, b };
1772  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1773  a.check_error();
1774  return expr(a.ctx(), r);
1775  }
Z3_ast Z3_API Z3_mk_and(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] and ... and args[num_args-1].
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator&& ( expr const &  a,
bool  b 
)
inline
Precondition
a.is_bool()

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

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

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

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

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

3447  {
3448  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3449  }
Z3_probe Z3_API Z3_probe_and(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 and p2 evaluates to true.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator* ( expr const &  a,
expr const &  b 
)
inline

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

1846  {
1847  check_context(a, b);
1848  Z3_ast r = 0;
1849  if (a.is_arith() && b.is_arith()) {
1850  Z3_ast args[2] = { a, b };
1851  r = Z3_mk_mul(a.ctx(), 2, args);
1852  }
1853  else if (a.is_bv() && b.is_bv()) {
1854  r = Z3_mk_bvmul(a.ctx(), a, b);
1855  }
1856  else if (a.is_fpa() && b.is_fpa()) {
1857  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1858  }
1859  else {
1860  // operator is not supported by given arguments.
1861  assert(false);
1862  }
1863  a.check_error();
1864  return expr(a.ctx(), r);
1865  }
Z3_ast Z3_API Z3_mk_mul(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] * ... * args[num_args-1].
Z3_ast Z3_API Z3_mk_fpa_mul(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point multiplication.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement multiplication.
expr z3::operator* ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

1816  {
1817  check_context(a, b);
1818  Z3_ast r = 0;
1819  if (a.is_arith() && b.is_arith()) {
1820  Z3_ast args[2] = { a, b };
1821  r = Z3_mk_add(a.ctx(), 2, args);
1822  }
1823  else if (a.is_bv() && b.is_bv()) {
1824  r = Z3_mk_bvadd(a.ctx(), a, b);
1825  }
1826  else if (a.is_seq() && b.is_seq()) {
1827  return concat(a, b);
1828  }
1829  else if (a.is_re() && b.is_re()) {
1830  Z3_ast _args[2] = { a, b };
1831  r = Z3_mk_re_union(a.ctx(), 2, _args);
1832  }
1833  else if (a.is_fpa() && b.is_fpa()) {
1834  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1835  }
1836  else {
1837  // operator is not supported by given arguments.
1838  assert(false);
1839  }
1840  a.check_error();
1841  return expr(a.ctx(), r);
1842  }
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].
Z3_ast Z3_API Z3_mk_fpa_add(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point addition.
expr concat(expr_vector const &args)
Definition: z3++.h:2582
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_re_union(Z3_context c, unsigned n, Z3_ast const args[])
Create the union of the regular languages.
Z3_ast Z3_API Z3_mk_bvadd(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement addition.
expr z3::operator+ ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

1912  {
1913  Z3_ast r = 0;
1914  if (a.is_arith()) {
1915  r = Z3_mk_unary_minus(a.ctx(), a);
1916  }
1917  else if (a.is_bv()) {
1918  r = Z3_mk_bvneg(a.ctx(), a);
1919  }
1920  else if (a.is_fpa()) {
1921  r = Z3_mk_fpa_neg(a.ctx(), a);
1922  }
1923  else {
1924  // operator is not supported by given arguments.
1925  assert(false);
1926  }
1927  a.check_error();
1928  return expr(a.ctx(), r);
1929  }
Z3_ast Z3_API Z3_mk_unary_minus(Z3_context c, Z3_ast arg)
Create an AST node representing - arg.
Z3_ast Z3_API Z3_mk_fpa_neg(Z3_context c, Z3_ast t)
Floating-point negation.
Z3_ast Z3_API Z3_mk_bvneg(Z3_context c, Z3_ast t1)
Standard two's complement unary minus.
expr z3::operator- ( expr const &  a,
expr const &  b 
)
inline

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

1931  {
1932  check_context(a, b);
1933  Z3_ast r = 0;
1934  if (a.is_arith() && b.is_arith()) {
1935  Z3_ast args[2] = { a, b };
1936  r = Z3_mk_sub(a.ctx(), 2, args);
1937  }
1938  else if (a.is_bv() && b.is_bv()) {
1939  r = Z3_mk_bvsub(a.ctx(), a, b);
1940  }
1941  else if (a.is_fpa() && b.is_fpa()) {
1942  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1943  }
1944  else {
1945  // operator is not supported by given arguments.
1946  assert(false);
1947  }
1948  a.check_error();
1949  return expr(a.ctx(), r);
1950  }
Z3_ast Z3_API Z3_mk_sub(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] - ... - args[num_args - 1].
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement subtraction.
Z3_ast Z3_API Z3_mk_fpa_sub(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point subtraction.
expr z3::operator- ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

1890  {
1891  check_context(a, b);
1892  Z3_ast r = 0;
1893  if (a.is_arith() && b.is_arith()) {
1894  r = Z3_mk_div(a.ctx(), a, b);
1895  }
1896  else if (a.is_bv() && b.is_bv()) {
1897  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1898  }
1899  else if (a.is_fpa() && b.is_fpa()) {
1900  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1901  }
1902  else {
1903  // operator is not supported by given arguments.
1904  assert(false);
1905  }
1906  a.check_error();
1907  return expr(a.ctx(), r);
1908  }
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed division.
Z3_ast Z3_API Z3_mk_div(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 div arg2.
Z3_ast Z3_API Z3_mk_fpa_div(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point division.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator/ ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

1979  {
1980  check_context(a, b);
1981  Z3_ast r = 0;
1982  if (a.is_arith() && b.is_arith()) {
1983  r = Z3_mk_lt(a.ctx(), a, b);
1984  }
1985  else if (a.is_bv() && b.is_bv()) {
1986  r = Z3_mk_bvslt(a.ctx(), a, b);
1987  }
1988  else if (a.is_fpa() && b.is_fpa()) {
1989  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1990  }
1991  else {
1992  // operator is not supported by given arguments.
1993  assert(false);
1994  }
1995  a.check_error();
1996  return expr(a.ctx(), r);
1997  }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than.
Z3_ast Z3_API Z3_mk_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.
expr z3::operator< ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

3432  {
3433  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3434  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_probe Z3_API Z3_probe_lt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than the value returned...
probe z3::operator< ( probe const &  p1,
double  p2 
)
inline

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

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

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

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

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

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

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

557  {
558  if (s.kind() == Z3_INT_SYMBOL)
559  out << "k!" << s.to_int();
560  else
561  out << s.str();
562  return out;
563  }
std::ostream& z3::operator<< ( std::ostream &  out,
param_descrs const &  d 
)
inline

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

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

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

613  {
614  out << Z3_params_to_string(p.ctx(), p); return out;
615  }
Z3_string Z3_API Z3_params_to_string(Z3_context c, Z3_params p)
Convert a parameter set into a string. This function is mainly used for printing the contents of a pa...
std::ostream& z3::operator<< ( std::ostream &  out,
ast const &  n 
)
inline

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

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

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

2815 { return out << m.to_string(); }
std::ostream& z3::operator<< ( std::ostream &  out,
stats const &  s 
)
inline

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

2844 { out << Z3_stats_to_string(s.ctx(), s); return out; }
Z3_string Z3_API Z3_stats_to_string(Z3_context c, Z3_stats s)
Convert a statistics into a string.
std::ostream& z3::operator<< ( std::ostream &  out,
check_result  r 
)
inline

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

2847  {
2848  if (r == unsat) out << "unsat";
2849  else if (r == sat) out << "sat";
2850  else out << "unknown";
2851  return out;
2852  }
Definition: z3++.h:167
std::ostream& z3::operator<< ( std::ostream &  out,
solver const &  s 
)
inline

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

3168 { out << Z3_solver_to_string(s.ctx(), s); return out; }
Z3_string Z3_API Z3_solver_to_string(Z3_context c, Z3_solver s)
Convert a solver into a string.
std::ostream& z3::operator<< ( std::ostream &  out,
goal const &  g 
)
inline

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

3227 { out << Z3_goal_to_string(g.ctx(), g); return out; }
Z3_string Z3_API Z3_goal_to_string(Z3_context c, Z3_goal g)
Convert a goal into a string.
std::ostream& z3::operator<< ( std::ostream &  out,
apply_result const &  r 
)
inline

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

3251 { out << Z3_apply_result_to_string(r.ctx(), r); return out; }
Z3_string Z3_API Z3_apply_result_to_string(Z3_context c, Z3_apply_result r)
Convert the Z3_apply_result object returned by Z3_tactic_apply into a string.
std::ostream& z3::operator<< ( std::ostream &  out,
optimize const &  s 
)
inline

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

3577 { out << Z3_optimize_to_string(s.ctx(), s.m_opt); return out; }
Z3_string Z3_API Z3_optimize_to_string(Z3_context c, Z3_optimize o)
Print the current context as a string.
std::ostream& z3::operator<< ( std::ostream &  out,
fixedpoint const &  f 
)
inline

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

3635 { return out << Z3_fixedpoint_to_string(f.ctx(), f, 0, 0); }
Z3_string Z3_API Z3_fixedpoint_to_string(Z3_context c, Z3_fixedpoint f, unsigned num_queries, Z3_ast queries[])
Print the current rules and background axioms as a string.
expr z3::operator<= ( expr const &  a,
expr const &  b 
)
inline

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

1954  {
1955  check_context(a, b);
1956  Z3_ast r = 0;
1957  if (a.is_arith() && b.is_arith()) {
1958  r = Z3_mk_le(a.ctx(), a, b);
1959  }
1960  else if (a.is_bv() && b.is_bv()) {
1961  r = Z3_mk_bvsle(a.ctx(), a, b);
1962  }
1963  else if (a.is_fpa() && b.is_fpa()) {
1964  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1965  }
1966  else {
1967  // operator is not supported by given arguments.
1968  assert(false);
1969  }
1970  a.check_error();
1971  return expr(a.ctx(), r);
1972  }
Z3_ast Z3_API Z3_mk_le(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than or equal to.
Z3_ast Z3_API Z3_mk_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.
expr z3::operator<= ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

3422  {
3423  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3424  }
Z3_probe Z3_API Z3_probe_le(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than or equal to the va...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
probe z3::operator<= ( probe const &  p1,
double  p2 
)
inline

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

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

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

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

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

1793  {
1794  check_context(a, b);
1795  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1796  a.check_error();
1797  return expr(a.ctx(), r);
1798  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_eq(Z3_context c, Z3_ast l, Z3_ast r)
Create an AST node representing l = r.
expr z3::operator== ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

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

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

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

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

3442  {
3443  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3444  }
Z3_probe Z3_API Z3_probe_eq(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is equal to the value returned ...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
probe z3::operator== ( probe const &  p1,
double  p2 
)
inline

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

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

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

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

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

2001  {
2002  check_context(a, b);
2003  Z3_ast r = 0;
2004  if (a.is_arith() && b.is_arith()) {
2005  r = Z3_mk_gt(a.ctx(), a, b);
2006  }
2007  else if (a.is_bv() && b.is_bv()) {
2008  r = Z3_mk_bvsgt(a.ctx(), a, b);
2009  }
2010  else if (a.is_fpa() && b.is_fpa()) {
2011  r = Z3_mk_fpa_gt(a.ctx(), a, b);
2012  }
2013  else {
2014  // operator is not supported by given arguments.
2015  assert(false);
2016  }
2017  a.check_error();
2018  return expr(a.ctx(), r);
2019  }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than.
Z3_ast Z3_API Z3_mk_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.
expr z3::operator> ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

3437  {
3438  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3439  }
Z3_probe Z3_API Z3_probe_gt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is greater than the value retur...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
probe z3::operator> ( probe const &  p1,
double  p2 
)
inline

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

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

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

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

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

1870  {
1871  check_context(a, b);
1872  Z3_ast r = 0;
1873  if (a.is_arith() && b.is_arith()) {
1874  r = Z3_mk_ge(a.ctx(), a, b);
1875  }
1876  else if (a.is_bv() && b.is_bv()) {
1877  r = Z3_mk_bvsge(a.ctx(), a, b);
1878  }
1879  else if (a.is_fpa() && b.is_fpa()) {
1880  r = Z3_mk_fpa_geq(a.ctx(), a, b);
1881  }
1882  else {
1883  // operator is not supported by given arguments.
1884  assert(false);
1885  }
1886  a.check_error();
1887  return expr(a.ctx(), r);
1888  }
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
Z3_ast Z3_API Z3_mk_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_fpa_geq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than or equal.
expr z3::operator>= ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

3427  {
3428  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3429  }
Z3_probe Z3_API Z3_probe_ge(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is greater than or equal to the...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
probe z3::operator>= ( probe const &  p1,
double  p2 
)
inline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3300  {
3301  check_context(t1, t2);
3302  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
3303  t1.check_error();
3304  return tactic(t1.ctx(), r);
3305  }
Z3_tactic Z3_API Z3_tactic_or_else(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that first applies t1 to a given goal, if it fails then returns the result of t2 appl...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator|| ( expr const &  a,
expr const &  b 
)
inline
Precondition
a.is_bool()
b.is_bool()

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

1780  {
1781  check_context(a, b);
1782  assert(a.is_bool() && b.is_bool());
1783  Z3_ast args[2] = { a, b };
1784  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1785  a.check_error();
1786  return expr(a.ctx(), r);
1787  }
Z3_ast Z3_API Z3_mk_or(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] or ... or args[num_args-1].
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::operator|| ( expr const &  a,
bool  b 
)
inline
Precondition
a.is_bool()

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

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

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

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

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

3450  {
3451  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3452  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_probe Z3_API Z3_probe_or(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 or p2 evaluates to true.
expr z3::operator~ ( expr const &  a)
inline

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

2116 { Z3_ast r = Z3_mk_bvnot(a.ctx(), a); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvnot(Z3_context c, Z3_ast t1)
Bitwise negation.
expr z3::option ( expr const &  re)
inline

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

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

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

3332  {
3333  check_context(t1, t2);
3334  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
3335  t1.check_error();
3336  return tactic(t1.ctx(), r);
3337  }
Z3_tactic Z3_API Z3_tactic_par_and_then(Z3_context c, Z3_tactic t1, Z3_tactic t2)
Return a tactic that applies t1 to a given goal and then t2 to every subgoal produced by t1...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
tactic z3::par_or ( unsigned  n,
tactic const *  tactics 
)
inline

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

3323  {
3324  if (n == 0) {
3325  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
3326  }
3327  array<Z3_tactic> buffer(n);
3328  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
3329  return tactic(tactics[0u].ctx(), Z3_tactic_par_or(tactics[0u].ctx(), n, buffer.ptr()));
3330  }
#define Z3_THROW(x)
Definition: z3++.h:134
Z3_tactic Z3_API Z3_tactic_par_or(Z3_context c, unsigned num, Z3_tactic const ts[])
Return a tactic that applies the given tactics in parallel.
def tactics
Definition: z3py.py:8852
func_decl z3::partial_order ( sort const &  a,
unsigned  index 
)
inline

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

2368  {
2369  return to_func_decl(a.ctx(), Z3_mk_partial_order(a.ctx(), a, index));
2370  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2208
Z3_func_decl Z3_API Z3_mk_partial_order(Z3_context c, Z3_sort a, unsigned id)
create a partial ordering relation over signature a and index id.
expr z3::pbeq ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2522  {
2523  assert(es.size() > 0);
2524  context& ctx = es[0u].ctx();
2525  array<Z3_ast> _es(es);
2526  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
2527  ctx.check_error();
2528  return expr(ctx, r);
2529  }
Z3_ast Z3_API Z3_mk_pbeq(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.
expr z3::pbge ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2514  {
2515  assert(es.size() > 0);
2516  context& ctx = es[0u].ctx();
2517  array<Z3_ast> _es(es);
2518  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
2519  ctx.check_error();
2520  return expr(ctx, r);
2521  }
Z3_ast Z3_API Z3_mk_pbge(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.
expr z3::pble ( expr_vector const &  es,
int const *  coeffs,
int  bound 
)
inline

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

2506  {
2507  assert(es.size() > 0);
2508  context& ctx = es[0u].ctx();
2509  array<Z3_ast> _es(es);
2510  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
2511  ctx.check_error();
2512  return expr(ctx, r);
2513  }
Z3_ast Z3_API Z3_mk_pble(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.
func_decl z3::piecewise_linear_order ( sort const &  a,
unsigned  index 
)
inline

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

2371  {
2372  return to_func_decl(a.ctx(), Z3_mk_piecewise_linear_order(a.ctx(), a, index));
2373  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2208
Z3_func_decl Z3_API Z3_mk_piecewise_linear_order(Z3_context c, Z3_sort a, unsigned id)
create a piecewise linear ordering relation over signature a and index id.
expr z3::plus ( expr const &  re)
inline

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

4306  {
4307  MK_EXPR1(Z3_mk_re_plus, re);
4308  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:4204
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.
expr_vector z3::polynomial_subresultants ( expr const &  p,
expr const &  q,
expr const &  x 
)
inline

Return the nonzero subresultants of p and q with respect to the "variable" x.

Precondition
p, q and x are Z3 expressions where p and q are arithmetic terms. Note that, any subterm that cannot be viewed as a polynomial is assumed to be a variable.

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

2384  {
2385  check_context(p, q); check_context(p, x);
2386  Z3_ast_vector r = Z3_polynomial_subresultants(p.ctx(), p, q, x);
2387  p.check_error();
2388  return expr_vector(p.ctx(), r);
2389  }
Z3_ast_vector Z3_API Z3_polynomial_subresultants(Z3_context c, Z3_ast p, Z3_ast q, Z3_ast x)
Return the nonzero subresultants of p and q with respect to the "variable" x.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
ast_vector_tpl< expr > expr_vector
Definition: z3++.h:77
expr z3::prefixof ( expr const &  a,
expr const &  b 
)
inline

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

4282  {
4283  check_context(a, b);
4284  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
4285  a.check_error();
4286  return expr(a.ctx(), r);
4287  }
Z3_ast Z3_API Z3_mk_seq_prefix(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if prefix is a prefix of s.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::pw ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by pw().

1724 { _Z3_MK_BIN_(a, b, Z3_mk_power); }
Z3_ast Z3_API Z3_mk_power(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 ^ arg2.
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1709
expr z3::pw ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

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

4343  {
4344  check_context(lo, hi);
4345  Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
4346  lo.check_error();
4347  return expr(lo.ctx(), r);
4348  }
Z3_ast Z3_API Z3_mk_re_range(Z3_context c, Z3_ast lo, Z3_ast hi)
Create the range regular expression over two sequences of length 1.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
rcf_num z3::rcf_e ( context c)
inline

Create an RCF numeral representing e (Euler's constant).

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

4996  {
4997  return rcf_num(c, Z3_rcf_mk_e(c));
4998  }
Z3_rcf_num Z3_API Z3_rcf_mk_e(Z3_context c)
Return e (Euler's constant)
rcf_num z3::rcf_infinitesimal ( context c)
inline

Create an RCF numeral representing an infinitesimal.

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

5003  {
5004  return rcf_num(c, Z3_rcf_mk_infinitesimal(c));
5005  }
Z3_rcf_num Z3_API Z3_rcf_mk_infinitesimal(Z3_context c)
Return a new infinitesimal that is smaller than all elements in the Z3 field.
rcf_num z3::rcf_pi ( context c)
inline

Create an RCF numeral representing pi.

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

4989  {
4990  return rcf_num(c, Z3_rcf_mk_pi(c));
4991  }
Z3_rcf_num Z3_API Z3_rcf_mk_pi(Z3_context c)
Return Pi.
std::vector<rcf_num> z3::rcf_roots ( context c,
std::vector< rcf_num > const &  coeffs 
)
inline

Find roots of a polynomial with given coefficients.

The polynomial is a[n-1]*x^(n-1) + ... + a[1]*x + a[0]. Returns a vector of RCF numerals representing the roots.

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

5013  {
5014  if (coeffs.empty()) {
5015  throw exception("polynomial coefficients cannot be empty");
5016  }
5017 
5018  unsigned n = static_cast<unsigned>(coeffs.size());
5019  std::vector<Z3_rcf_num> a(n);
5020  std::vector<Z3_rcf_num> roots(n);
5021 
5022  for (unsigned i = 0; i < n; ++i) {
5023  a[i] = coeffs[i];
5024  }
5025 
5026  unsigned num_roots = Z3_rcf_mk_roots(c, n, a.data(), roots.data());
5027 
5028  std::vector<rcf_num> result;
5029  result.reserve(num_roots);
5030  for (unsigned i = 0; i < num_roots; ++i) {
5031  result.push_back(rcf_num(c, roots[i]));
5032  }
5033 
5034  return result;
5035  }
unsigned Z3_API Z3_rcf_mk_roots(Z3_context c, unsigned n, Z3_rcf_num const a[], Z3_rcf_num roots[])
Store in roots the roots of the polynomial a[n-1]*x^{n-1} + ... + a[0]. The output vector roots must ...
expr z3::re_complement ( expr const &  a)
inline

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

4340  {
4342  }
Z3_ast Z3_API Z3_mk_re_complement(Z3_context c, Z3_ast re)
Create the complement of the regular language re.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:4204
expr z3::re_diff ( expr const &  a,
expr const &  b 
)
inline

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

4333  {
4334  check_context(a, b);
4335  context& ctx = a.ctx();
4336  Z3_ast r = Z3_mk_re_diff(ctx, a, b);
4337  ctx.check_error();
4338  return expr(ctx, r);
4339  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_re_diff(Z3_context c, Z3_ast re1, Z3_ast re2)
Create the difference of regular expressions.
expr z3::re_empty ( sort const &  s)
inline

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

4315  {
4316  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
4317  s.check_error();
4318  return expr(s.ctx(), r);
4319  }
Z3_ast Z3_API Z3_mk_re_empty(Z3_context c, Z3_sort re)
Create an empty regular expression of sort re.
expr z3::re_full ( sort const &  s)
inline

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

4320  {
4321  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
4322  s.check_error();
4323  return expr(s.ctx(), r);
4324  }
Z3_ast Z3_API Z3_mk_re_full(Z3_context c, Z3_sort re)
Create an universal regular expression of sort re.
expr z3::re_intersect ( expr_vector const &  args)
inline

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

4325  {
4326  assert(args.size() > 0);
4327  context& ctx = args[0u].ctx();
4328  array<Z3_ast> _args(args);
4329  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
4330  ctx.check_error();
4331  return expr(ctx, r);
4332  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.
func_decl z3::recfun ( symbol const &  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

4135  {
4136  return range.ctx().recfun(name, arity, domain, range);
4137  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3899
func_decl z3::recfun ( char const *  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

4138  {
4139  return range.ctx().recfun(name, arity, domain, range);
4140  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3899
func_decl z3::recfun ( char const *  name,
sort const &  d1,
sort const &  range 
)
inline

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

4141  {
4142  return range.ctx().recfun(name, d1, range);
4143  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3899
func_decl z3::recfun ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  range 
)
inline

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

4144  {
4145  return range.ctx().recfun(name, d1, d2, range);
4146  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4343
context & ctx() const
Definition: z3++.h:540
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:3899
expr z3::rem ( expr const &  a,
expr const &  b 
)
inline

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

Referenced by rem().

1744  {
1745  if (a.is_fpa() && b.is_fpa()) {
1746  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1747  } else {
1748  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1749  }
1750  }
Z3_ast Z3_API Z3_mk_fpa_rem(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point remainder.
Z3_ast Z3_API Z3_mk_rem(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 rem arg2.
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1709
expr z3::rem ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

3307  {
3308  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
3309  t.check_error();
3310  return tactic(t.ctx(), r);
3311  }
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:2054
void z3::reset_params ( )
inline

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

void Z3_API Z3_global_param_reset_all(void)
Restore the value of all global (and module) parameters. This command will not affect already created...
expr z3::round_fpa_to_closest_integer ( expr const &  t)
inline

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

2169  {
2170  assert(t.is_fpa());
2171  Z3_ast r = Z3_mk_fpa_round_to_integral(t.ctx(), t.ctx().fpa_rounding_mode(), t);
2172  t.check_error();
2173  return expr(t.ctx(), r);
2174  }
Z3_ast Z3_API Z3_mk_fpa_round_to_integral(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point roundToIntegral. Rounds a floating-point number to the closest integer, again represented as a floating-point number.
expr z3::sbv_to_fpa ( expr const &  t,
sort  s 
)
inline

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

2148  {
2149  assert(t.is_bv());
2150  Z3_ast r = Z3_mk_fpa_to_fp_signed(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2151  t.check_error();
2152  return expr(t.ctx(), r);
2153  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_signed(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort...
expr z3::sdiv ( expr const &  a,
expr const &  b 
)
inline

signed division operator for bitvectors.

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

Referenced by sdiv().

2267 { return to_expr(a.ctx(), Z3_mk_bvsdiv(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed division.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::sdiv ( expr const &  a,
int  b 
)
inline

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

2268 { return sdiv(a, a.ctx().num_val(b, a.get_sort())); }
expr sdiv(int a, expr const &b)
Definition: z3++.h:2269
expr z3::sdiv ( int  a,
expr const &  b 
)
inline

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

2269 { return sdiv(b.ctx().num_val(a, b.get_sort()), b); }
expr sdiv(int a, expr const &b)
Definition: z3++.h:2269
expr select ( expr const &  a,
expr const &  i 
)
inline

forward declarations

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

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

4148  {
4149  check_context(a, i);
4150  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
4151  a.check_error();
4152  return expr(a.ctx(), r);
4153  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i)
Array read. The argument a is the array and i is the index of the array that gets read...
expr select ( expr const &  a,
expr_vector const &  i 
)
inline

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

4157  {
4158  check_context(a, i);
4159  array<Z3_ast> idxs(i);
4160  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
4161  a.check_error();
4162  return expr(a.ctx(), r);
4163  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_select_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs)
n-ary Array read. The argument a is the array and idxs are the indices of the array that gets read...
expr z3::select ( expr const &  a,
int  i 
)
inline

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

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

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

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

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

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

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

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

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

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

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

4243  {
4244  check_context(a, b);
4245  Z3_ast es[2] = { a, b };
4246  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
4247  a.check_error();
4248  return expr(a.ctx(), r);
4249  }
Z3_ast Z3_API Z3_mk_set_intersect(Z3_context c, unsigned num_args, Z3_ast const args[])
Take the intersection of a list of sets.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::set_member ( expr const &  s,
expr const &  e 
)
inline

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

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

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

81 { Z3_global_param_set(param, value); }
void Z3_API Z3_global_param_set(Z3_string param_id, Z3_string param_value)
Set a global (or module) parameter. This setting is shared by all Z3 contexts.
void z3::set_param ( char const *  param,
bool  value 
)
inline

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

82 { Z3_global_param_set(param, value ? "true" : "false"); }
void Z3_API Z3_global_param_set(Z3_string param_id, Z3_string param_value)
Set a global (or module) parameter. This setting is shared by all Z3 contexts.
void z3::set_param ( char const *  param,
int  value 
)
inline

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

83 { auto str = std::to_string(value); Z3_global_param_set(param, str.c_str()); }
void Z3_API Z3_global_param_set(Z3_string param_id, Z3_string param_value)
Set a global (or module) parameter. This setting is shared by all Z3 contexts.
expr z3::set_subset ( expr const &  a,
expr const &  b 
)
inline

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

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

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

4235  {
4236  check_context(a, b);
4237  Z3_ast es[2] = { a, b };
4238  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
4239  a.check_error();
4240  return expr(a.ctx(), r);
4241  }
Z3_ast Z3_API Z3_mk_set_union(Z3_context c, unsigned num_args, Z3_ast const args[])
Take the union of a list of sets.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
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 2363 of file z3++.h.

2363 { return to_expr(a.ctx(), Z3_mk_sign_ext(a.ctx(), i, a)); }
Z3_ast Z3_API Z3_mk_sign_ext(Z3_context c, unsigned i, Z3_ast t1)
Sign-extend of the given bit-vector to the (signed) equivalent bit-vector of size m+i...
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::sge ( expr const &  a,
expr const &  b 
)
inline

signed greater than or equal to operator for bitvectors.

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

Referenced by sge().

2228 { return to_expr(a.ctx(), Z3_mk_bvsge(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than or equal to.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::sge ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed greater than operator for bitvectors.

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

Referenced by sgt().

2234 { return to_expr(a.ctx(), Z3_mk_bvsgt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::sgt ( expr const &  a,
int  b 
)
inline

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

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

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

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

shift left operator for bitvectors

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

Referenced by shl().

2302 { return to_expr(a.ctx(), Z3_mk_bvshl(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvshl(Z3_context c, Z3_ast t1, Z3_ast t2)
Shift left.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::shl ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed less than or equal to operator for bitvectors.

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

Referenced by sle().

2216 { return to_expr(a.ctx(), Z3_mk_bvsle(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than or equal to.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::sle ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed less than operator for bitvectors.

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

Referenced by slt().

2222 { return to_expr(a.ctx(), Z3_mk_bvslt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::slt ( expr const &  a,
int  b 
)
inline

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

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

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

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

signed modulus operator for bitvectors

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

Referenced by smod().

2288 { return to_expr(a.ctx(), Z3_mk_bvsmod(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows divisor).
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::smod ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

2102  {
2103  check_context(a, rm);
2104  assert(a.is_fpa());
2105  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
2106  a.check_error();
2107  return expr(a.ctx(), r);
2108  }
void check_context(object const &a, object const &b)
Definition: z3++.h:544
Z3_ast Z3_API Z3_mk_fpa_sqrt(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point square root.
expr z3::srem ( expr const &  a,
expr const &  b 
)
inline

signed remainder operator for bitvectors

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

Referenced by srem().

2281 { return to_expr(a.ctx(), Z3_mk_bvsrem(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvsrem(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows dividend).
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::srem ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

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

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

Referenced by store().

4165  {
4166  check_context(a, i); check_context(a, v);
4167  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
4168  a.check_error();
4169  return expr(a.ctx(), r);
4170  }
Z3_ast Z3_API Z3_mk_store(Z3_context c, Z3_ast a, Z3_ast i, Z3_ast v)
Array update.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::store ( expr const &  a,
int  i,
expr const &  v 
)
inline

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

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

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

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

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

4174  {
4175  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
4176  }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:4177
expr z3::store ( expr const &  a,
expr_vector const &  i,
expr const &  v 
)
inline

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

4177  {
4178  check_context(a, i); check_context(a, v);
4179  array<Z3_ast> idxs(i);
4180  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
4181  a.check_error();
4182  return expr(a.ctx(), r);
4183  }
Z3_ast Z3_API Z3_mk_store_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs, Z3_ast v)
n-ary Array update.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::suffixof ( expr const &  a,
expr const &  b 
)
inline

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

4276  {
4277  check_context(a, b);
4278  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
4279  a.check_error();
4280  return expr(a.ctx(), r);
4281  }
Z3_ast Z3_API Z3_mk_seq_suffix(Z3_context c, Z3_ast suffix, Z3_ast s)
Check if suffix is a suffix of s.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
expr z3::sum ( expr_vector const &  args)
inline

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

2546  {
2547  assert(args.size() > 0);
2548  context& ctx = args[0u].ctx();
2549  array<Z3_ast> _args(args);
2550  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
2551  ctx.check_error();
2552  return expr(ctx, r);
2553  }
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].
check_result z3::to_check_result ( Z3_lbool  l)
inline

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

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

178  {
179  if (l == Z3_L_TRUE) return sat;
180  else if (l == Z3_L_FALSE) return unsat;
181  return unknown;
182  }
Definition: z3++.h:167
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 2194 of file z3++.h.

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

2194  {
2195  c.check_error();
2196  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
2197  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
2198  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
2200  return expr(c, a);
2201  }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.
func_decl z3::to_func_decl ( context c,
Z3_func_decl  f 
)
inline

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

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

2208  {
2209  c.check_error();
2210  return func_decl(c, f);
2211  }
expr z3::to_re ( expr const &  s)
inline

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

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

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

4105 { Z3_ast r = Z3_mk_int2real(a.ctx(), a); a.check_error(); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_int2real(Z3_context c, Z3_ast t1)
Coerce an integer to a real.
sort z3::to_sort ( context c,
Z3_sort  s 
)
inline

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

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

2203  {
2204  c.check_error();
2205  return sort(c, s);
2206  }
func_decl z3::tree_order ( sort const &  a,
unsigned  index 
)
inline

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

2374  {
2375  return to_func_decl(a.ctx(), Z3_mk_tree_order(a.ctx(), a, index));
2376  }
func_decl to_func_decl(context &c, Z3_func_decl f)
Definition: z3++.h:2208
Z3_func_decl Z3_API Z3_mk_tree_order(Z3_context c, Z3_sort a, unsigned id)
create a tree ordering relation over signature a identified using index id.
tactic z3::try_for ( tactic const &  t,
unsigned  ms 
)
inline

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

3318  {
3319  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
3320  t.check_error();
3321  return tactic(t.ctx(), r);
3322  }
Z3_tactic Z3_API Z3_tactic_try_for(Z3_context c, Z3_tactic t, unsigned ms)
Return a tactic that applies t to a given goal for ms milliseconds. If t does not terminate in ms mil...
expr z3::ubv_to_fpa ( expr const &  t,
sort  s 
)
inline

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

2155  {
2156  assert(t.is_bv());
2157  Z3_ast r = Z3_mk_fpa_to_fp_unsigned(t.ctx(), t.ctx().fpa_rounding_mode(), t, s);
2158  t.check_error();
2159  return expr(t.ctx(), r);
2160  }
Z3_ast Z3_API Z3_mk_fpa_to_fp_unsigned(Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s)
Conversion of a 2's complement unsigned bit-vector term into a term of FloatingPoint sort...
expr z3::udiv ( expr const &  a,
expr const &  b 
)
inline

unsigned division operator for bitvectors.

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

Referenced by udiv().

2274 { return to_expr(a.ctx(), Z3_mk_bvudiv(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvudiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned division.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::udiv ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned greater than or equal to operator for bitvectors.

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

Referenced by uge().

2254 { return to_expr(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::uge ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned greater than operator for bitvectors.

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

Referenced by ugt().

2260 { return to_expr(a.ctx(), Z3_mk_bvugt(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvugt(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::ugt ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned less than or equal to operator for bitvectors.

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

Referenced by ule().

2242 { return to_expr(a.ctx(), Z3_mk_bvule(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvule(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned less than or equal to.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::ule ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned less than operator for bitvectors.

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

Referenced by ult().

2248 { return to_expr(a.ctx(), Z3_mk_bvult(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvult(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned less than.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::ult ( expr const &  a,
int  b 
)
inline

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

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

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

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

unsigned reminder operator for bitvectors

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

Referenced by urem().

2295 { return to_expr(a.ctx(), Z3_mk_bvurem(a.ctx(), a, b)); }
Z3_ast Z3_API Z3_mk_bvurem(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned remainder.
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
expr z3::urem ( expr const &  a,
int  b 
)
inline

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

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

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

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

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

3642  {
3643  check_context(p, t);
3644  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
3645  t.check_error();
3646  return tactic(t.ctx(), r);
3647  }
Z3_tactic Z3_API Z3_tactic_when(Z3_context c, Z3_probe p, Z3_tactic t)
Return a tactic that applies t to a given goal is the probe p evaluates to true. If p evaluates to fa...
void check_context(object const &a, object const &b)
Definition: z3++.h:544
tactic z3::with ( tactic const &  t,
params const &  p 
)
inline

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

3313  {
3314  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
3315  t.check_error();
3316  return tactic(t.ctx(), r);
3317  }
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.
simplifier z3::with ( simplifier const &  t,
params const &  p 
)
inline

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

3374  {
3375  Z3_simplifier r = Z3_simplifier_using_params(t.ctx(), t, p);
3376  t.check_error();
3377  return simplifier(t.ctx(), r);
3378  }
Z3_simplifier Z3_API Z3_simplifier_using_params(Z3_context c, Z3_simplifier t, Z3_params p)
Return a simplifier that applies t using the given set of parameters.
expr z3::xnor ( expr const &  a,
expr const &  b 
)
inline

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

2037 { 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.
void check_context(object const &a, object const &b)
Definition: z3++.h:544
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 2323 of file z3++.h.

2323 { return to_expr(a.ctx(), Z3_mk_zero_ext(a.ctx(), i, a)); }
expr to_expr(context &c, Z3_ast a)
Wraps a Z3_ast as an expr object. It also checks for errors. This function allows the user to use the...
Definition: z3++.h:2194
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...