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

Z3 C++ namespace. More...

Data Structures

class  apply_result
 
class  array
 
class  ast
 
class  ast_vector_tpl
 
class  cast_ast
 
class  cast_ast< ast >
 
class  cast_ast< expr >
 
class  cast_ast< func_decl >
 
class  cast_ast< sort >
 
class  config
 Z3 global configuration object. More...
 
class  context
 A Context manages all other Z3 objects, global configuration options, etc. More...
 
class  exception
 Exception used to sign API usage errors. More...
 
class  expr
 A Z3 expression is used to represent formulas and terms. For Z3, a formula is any expression of sort Boolean. Every expression has a sort. More...
 
class  fixedpoint
 
class  func_decl
 Function declaration (aka function definition). It is the signature of interpreted and uninterpreted functions in Z3. The basic building block in Z3 is the function application. More...
 
class  func_entry
 
class  func_interp
 
class  goal
 
class  model
 
class  object
 
class  optimize
 
class  param_descrs
 
class  params
 
class  probe
 
class  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
 

Typedefs

typedef ast_vector_tpl< astast_vector
 
typedef ast_vector_tpl< exprexpr_vector
 
typedef ast_vector_tpl< sortsort_vector
 
typedef ast_vector_tpl< func_declfunc_decl_vector
 

Enumerations

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

Functions

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

Detailed Description

Z3 C++ namespace.

Typedef Documentation

◆ ast_vector

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

◆ expr_vector

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

◆ func_decl_vector

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

◆ sort_vector

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

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

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

129  {
130  unsat, sat, unknown
131  };
Definition: z3++.h:130

◆ rounding_mode

Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

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

Function Documentation

◆ abs()

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

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

1514  {
1515  Z3_ast r;
1516  if (a.is_int()) {
1517  expr zero = a.ctx().int_val(0);
1518  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, zero), a, -a);
1519  }
1520  else if (a.is_real()) {
1521  expr zero = a.ctx().real_val(0);
1522  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, zero), a, -a);
1523  }
1524  else {
1525  r = Z3_mk_fpa_abs(a.ctx(), a);
1526  }
1527  return expr(a.ctx(), r);
1528  }
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).

◆ as_array()

expr z3::as_array ( func_decl f)
inline

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

3112  {
3113  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3114  f.check_error();
3115  return expr(f.ctx(), r);
3116  }
Z3_ast Z3_API Z3_mk_as_array(Z3_context c, Z3_func_decl f)
Create array with the same interpretation as a function. The array satisfies the property (f x) = (se...

◆ ashr() [1/3]

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

arithmetic shift right operator for bitvectors

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

1651 { 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:1563

Referenced by ashr().

◆ ashr() [2/3]

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

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

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

◆ ashr() [3/3]

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

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

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

◆ atleast()

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

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

1876  {
1877  assert(es.size() > 0);
1878  context& ctx = es[0].ctx();
1879  array<Z3_ast> _es(es);
1880  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
1881  ctx.check_error();
1882  return expr(ctx, r);
1883  }
Z3_ast Z3_API Z3_mk_atleast(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ atmost()

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

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

1868  {
1869  assert(es.size() > 0);
1870  context& ctx = es[0].ctx();
1871  array<Z3_ast> _es(es);
1872  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
1873  ctx.check_error();
1874  return expr(ctx, r);
1875  }
Z3_ast Z3_API Z3_mk_atmost(Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k)
Pseudo-Boolean relations.

◆ check_context()

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

◆ concat() [1/2]

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

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

1902  {
1903  check_context(a, b);
1904  Z3_ast r;
1905  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
1906  Z3_ast _args[2] = { a, b };
1907  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
1908  }
1909  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
1910  Z3_ast _args[2] = { a, b };
1911  r = Z3_mk_re_concat(a.ctx(), 2, _args);
1912  }
1913  else {
1914  r = Z3_mk_concat(a.ctx(), a, b);
1915  }
1916  a.ctx().check_error();
1917  return expr(a.ctx(), r);
1918  }
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:408
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

Referenced by operator+().

◆ concat() [2/2]

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

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

1920  {
1921  Z3_ast r;
1922  assert(args.size() > 0);
1923  if (args.size() == 1) {
1924  return args[0];
1925  }
1926  context& ctx = args[0].ctx();
1927  array<Z3_ast> _args(args);
1928  if (Z3_is_seq_sort(ctx, args[0].get_sort())) {
1929  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
1930  }
1931  else if (Z3_is_re_sort(ctx, args[0].get_sort())) {
1932  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
1933  }
1934  else {
1935  r = _args[args.size()-1];
1936  for (unsigned i = args.size()-1; i > 0; ) {
1937  --i;
1938  r = Z3_mk_concat(ctx, _args[i], r);
1939  ctx.check_error();
1940  }
1941  }
1942  ctx.check_error();
1943  return expr(ctx, r);
1944  }
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

◆ cond()

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

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

2718  {
2719  check_context(p, t1); check_context(p, t2);
2720  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
2721  t1.check_error();
2722  return tactic(t1.ctx(), r);
2723  }
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:408

◆ const_array()

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

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

3129  {
3130  MK_EXPR2(Z3_mk_const_array, d, v);
3131  }
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:3123

◆ distinct()

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

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

1893  {
1894  assert(args.size() > 0);
1895  context& ctx = args[0].ctx();
1896  array<Z3_ast> _args(args);
1897  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
1898  ctx.check_error();
1899  return expr(ctx, r);
1900  }
Z3_ast Z3_API Z3_mk_distinct(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing distinct(args[0], ..., args[num_args-1]).

◆ empty()

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

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

3185  {
3186  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3187  s.check_error();
3188  return expr(s.ctx(), r);
3189  }
Z3_ast Z3_API Z3_mk_seq_empty(Z3_context c, Z3_sort seq)
Create an empty sequence of the sequence sort seq.

◆ empty_set()

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

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

3133  {
3135  }
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:3118

◆ eq()

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

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

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

◆ exists() [1/5]

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

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

1795  {
1796  check_context(x, b);
1797  Z3_app vars[] = {(Z3_app) x};
1798  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1799  }
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:408

◆ exists() [2/5]

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

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

1800  {
1801  check_context(x1, b); check_context(x2, b);
1802  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1803  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1804  }
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:408

◆ exists() [3/5]

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

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

1805  {
1806  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1807  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1808  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1809  }
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:408

◆ exists() [4/5]

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

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

1810  {
1811  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1812  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1813  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1814  }
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:408

◆ exists() [5/5]

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

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

1815  {
1816  array<Z3_app> vars(xs);
1817  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);
1818  }
Z3_ast Z3_API Z3_mk_exists_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Similar to Z3_mk_forall_const.

◆ fail_if()

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

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

2707  {
2708  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
2709  p.check_error();
2710  return tactic(p.ctx(), r);
2711  }
Z3_tactic Z3_API Z3_tactic_fail_if(Z3_context c, Z3_probe p)
Return a tactic that fails if the probe p evaluates to false.

◆ fma()

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

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

1537  {
1538  check_context(a, b); check_context(a, c); check_context(a, rm);
1539  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
1540  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
1541  a.check_error();
1542  return expr(a.ctx(), r);
1543  }
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:408

◆ forall() [1/5]

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

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

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

◆ forall() [2/5]

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

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

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

◆ forall() [3/5]

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

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

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

◆ forall() [4/5]

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

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

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

◆ forall() [5/5]

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

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

1791  {
1792  array<Z3_app> vars(xs);
1793  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);
1794  }
Z3_ast Z3_API Z3_mk_forall_const(Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body)
Create a universal quantifier using a list of constants that will form the set of bound variables.

◆ full_set()

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

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

3137  {
3139  }
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:3118

◆ function() [1/9]

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

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

3034  {
3035  return range.ctx().function(name, arity, domain, range);
3036  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [2/9]

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

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

3037  {
3038  return range.ctx().function(name, arity, domain, range);
3039  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [3/9]

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

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

3040  {
3041  return range.ctx().function(name, domain, range);
3042  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [4/9]

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

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

3043  {
3044  return range.ctx().function(name, d1, d2, range);
3045  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [5/9]

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

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

3046  {
3047  return range.ctx().function(name, d1, d2, d3, range);
3048  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [6/9]

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

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

3049  {
3050  return range.ctx().function(name, d1, d2, d3, d4, range);
3051  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [7/9]

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

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

3052  {
3053  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
3054  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [8/9]

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

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

3055  {
3056  return range.ctx().function(name, domain, range);
3057  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ function() [9/9]

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

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

3058  {
3059  return range.ctx().function(name.c_str(), domain, range);
3060  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2799

◆ implies() [1/3]

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

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

1181  {
1182  assert(a.is_bool() && b.is_bool());
1183  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1184  }
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:1174

Referenced by implies().

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

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

◆ in_re()

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

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

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

◆ indexof()

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

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

3202  {
3203  check_context(s, substr); check_context(s, offset);
3204  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3205  s.check_error();
3206  return expr(s.ctx(), r);
3207  }
Z3_ast Z3_API Z3_mk_seq_index(Z3_context c, Z3_ast s, Z3_ast substr, Z3_ast offset)
Return index of first occurrence of substr in s starting from offset offset. If s does not contain su...
void check_context(object const &a, object const &b)
Definition: z3++.h:408

◆ is_int()

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

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

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

◆ ite()

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

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

Precondition
c.is_bool()

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

1550  {
1551  check_context(c, t); check_context(c, e);
1552  assert(c.is_bool());
1553  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
1554  c.check_error();
1555  return expr(c.ctx(), r);
1556  }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).

◆ lambda() [1/5]

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

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

1819  {
1820  check_context(x, b);
1821  Z3_app vars[] = {(Z3_app) x};
1822  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
1823  }
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:408

◆ lambda() [2/5]

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

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

1824  {
1825  check_context(x1, b); check_context(x2, b);
1826  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1827  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
1828  }
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:408

◆ lambda() [3/5]

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

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

1829  {
1830  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1831  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1832  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
1833  }
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:408

◆ lambda() [4/5]

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

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

1834  {
1835  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1836  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1837  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
1838  }
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:408

◆ lambda() [5/5]

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

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

1839  {
1840  array<Z3_app> vars(xs);
1841  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
1842  }
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.

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

1644 { 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:1563

Referenced by lshr().

◆ lshr() [2/3]

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

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

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

◆ lshr() [3/3]

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

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

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

◆ max()

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

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

1499  {
1500  check_context(a, b);
1501  Z3_ast r;
1502  if (a.is_arith()) {
1503  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
1504  }
1505  else if (a.is_bv()) {
1506  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
1507  }
1508  else {
1509  assert(a.is_fpa());
1510  r = Z3_mk_fpa_max(a.ctx(), a, b);
1511  }
1512  return expr(a.ctx(), r);
1513  }
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:408
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).

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

◆ min()

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

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

1484  {
1485  check_context(a, b);
1486  Z3_ast r;
1487  if (a.is_arith()) {
1488  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1489  }
1490  else if (a.is_bv()) {
1491  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1492  }
1493  else {
1494  assert(a.is_fpa());
1495  r = Z3_mk_fpa_min(a.ctx(), a, b);
1496  }
1497  return expr(a.ctx(), r);
1498  }
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:408
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
Z3_ast Z3_API Z3_mk_fpa_min(Z3_context c, Z3_ast t1, Z3_ast t2)
Minimum of floating-point numbers.

◆ mk_and()

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

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

1952  {
1953  array<Z3_ast> _args(args);
1954  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
1955  args.check_error();
1956  return expr(args.ctx(), r);
1957  }
Z3_ast Z3_API Z3_mk_and(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] and ... and args[num_args-1].

◆ mk_or()

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

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

1946  {
1947  array<Z3_ast> _args(args);
1948  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
1949  args.check_error();
1950  return expr(args.ctx(), r);
1951  }
Z3_ast Z3_API Z3_mk_or(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] or ... or args[num_args-1].

◆ mod() [1/3]

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

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

1193 { _Z3_MK_BIN_(a, b, Z3_mk_mod); }
Z3_ast Z3_API Z3_mk_mod(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 mod arg2.
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1174

Referenced by mod().

◆ mod() [2/3]

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

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

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

◆ mod() [3/3]

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

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

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

◆ nand()

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

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

1481 { check_context(a, b); Z3_ast r = Z3_mk_bvnand(a.ctx(), a, b); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvnand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise nand.
void check_context(object const &a, object const &b)
Definition: z3++.h:408

◆ nor()

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

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

1482 { check_context(a, b); Z3_ast r = Z3_mk_bvnor(a.ctx(), a, b); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvnor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise nor.
void check_context(object const &a, object const &b)
Definition: z3++.h:408

◆ operator &() [1/4]

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

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

1469 { check_context(a, b); Z3_ast r = Z3_mk_bvand(a.ctx(), a, b); return expr(a.ctx(), r); }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
Z3_ast Z3_API Z3_mk_bvand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise and.

◆ operator &() [2/4]

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

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

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

◆ operator &() [3/4]

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

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

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

◆ operator &() [4/4]

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

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

2455  {
2456  check_context(t1, t2);
2457  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2458  t1.check_error();
2459  return tactic(t1.ctx(), r);
2460  }
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:408

◆ operator &&() [1/4]

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

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

1221  {
1222  check_context(a, b);
1223  assert(a.is_bool() && b.is_bool());
1224  Z3_ast args[2] = { a, b };
1225  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1226  a.check_error();
1227  return expr(a.ctx(), r);
1228  }
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:408

◆ operator &&() [2/4]

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

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

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

◆ operator &&() [3/4]

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

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

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

◆ operator &&() [4/4]

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

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

2568  {
2569  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2570  }
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:408

◆ operator *() [1/3]

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

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

1295  {
1296  check_context(a, b);
1297  Z3_ast r = 0;
1298  if (a.is_arith() && b.is_arith()) {
1299  Z3_ast args[2] = { a, b };
1300  r = Z3_mk_mul(a.ctx(), 2, args);
1301  }
1302  else if (a.is_bv() && b.is_bv()) {
1303  r = Z3_mk_bvmul(a.ctx(), a, b);
1304  }
1305  else if (a.is_fpa() && b.is_fpa()) {
1306  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1307  }
1308  else {
1309  // operator is not supported by given arguments.
1310  assert(false);
1311  }
1312  a.check_error();
1313  return expr(a.ctx(), r);
1314  }
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:408
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement multiplication.

◆ operator *() [2/3]

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

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

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

◆ operator *() [3/3]

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

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

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

◆ operator!() [1/2]

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

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

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

◆ operator!() [2/2]

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

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

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

◆ operator!=() [1/3]

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

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

1255  {
1256  check_context(a, b);
1257  Z3_ast args[2] = { a, b };
1258  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1259  a.check_error();
1260  return expr(a.ctx(), r);
1261  }
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:408

◆ operator!=() [2/3]

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

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

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

◆ operator!=() [3/3]

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

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

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

◆ operator+() [1/3]

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

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

1265  {
1266  check_context(a, b);
1267  Z3_ast r = 0;
1268  if (a.is_arith() && b.is_arith()) {
1269  Z3_ast args[2] = { a, b };
1270  r = Z3_mk_add(a.ctx(), 2, args);
1271  }
1272  else if (a.is_bv() && b.is_bv()) {
1273  r = Z3_mk_bvadd(a.ctx(), a, b);
1274  }
1275  else if (a.is_seq() && b.is_seq()) {
1276  return concat(a, b);
1277  }
1278  else if (a.is_re() && b.is_re()) {
1279  Z3_ast _args[2] = { a, b };
1280  r = Z3_mk_re_union(a.ctx(), 2, _args);
1281  }
1282  else if (a.is_fpa() && b.is_fpa()) {
1283  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1284  }
1285  else {
1286  // operator is not supported by given arguments.
1287  assert(false);
1288  }
1289  a.check_error();
1290  return expr(a.ctx(), r);
1291  }
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:1920
void check_context(object const &a, object const &b)
Definition: z3++.h:408
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.

◆ operator+() [2/3]

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

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

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

◆ operator+() [3/3]

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

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

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

◆ operator-() [1/4]

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

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

1358  {
1359  Z3_ast r = 0;
1360  if (a.is_arith()) {
1361  r = Z3_mk_unary_minus(a.ctx(), a);
1362  }
1363  else if (a.is_bv()) {
1364  r = Z3_mk_bvneg(a.ctx(), a);
1365  }
1366  else if (a.is_fpa()) {
1367  r = Z3_mk_fpa_neg(a.ctx(), a);
1368  }
1369  else {
1370  // operator is not supported by given arguments.
1371  assert(false);
1372  }
1373  a.check_error();
1374  return expr(a.ctx(), r);
1375  }
Z3_ast Z3_API Z3_mk_unary_minus(Z3_context c, Z3_ast arg)
Create an AST node representing - arg.
Z3_ast Z3_API Z3_mk_fpa_neg(Z3_context c, Z3_ast t)
Floating-point negation.
Z3_ast Z3_API Z3_mk_bvneg(Z3_context c, Z3_ast t1)
Standard two's complement unary minus.

◆ operator-() [2/4]

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

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

1377  {
1378  check_context(a, b);
1379  Z3_ast r = 0;
1380  if (a.is_arith() && b.is_arith()) {
1381  Z3_ast args[2] = { a, b };
1382  r = Z3_mk_sub(a.ctx(), 2, args);
1383  }
1384  else if (a.is_bv() && b.is_bv()) {
1385  r = Z3_mk_bvsub(a.ctx(), a, b);
1386  }
1387  else if (a.is_fpa() && b.is_fpa()) {
1388  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1389  }
1390  else {
1391  // operator is not supported by given arguments.
1392  assert(false);
1393  }
1394  a.check_error();
1395  return expr(a.ctx(), r);
1396  }
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:408
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.

◆ operator-() [3/4]

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

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

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

◆ operator-() [4/4]

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

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

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

◆ operator/() [1/3]

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

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

1336  {
1337  check_context(a, b);
1338  Z3_ast r = 0;
1339  if (a.is_arith() && b.is_arith()) {
1340  r = Z3_mk_div(a.ctx(), a, b);
1341  }
1342  else if (a.is_bv() && b.is_bv()) {
1343  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1344  }
1345  else if (a.is_fpa() && b.is_fpa()) {
1346  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1347  }
1348  else {
1349  // operator is not supported by given arguments.
1350  assert(false);
1351  }
1352  a.check_error();
1353  return expr(a.ctx(), r);
1354  }
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:408

◆ operator/() [2/3]

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

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

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

◆ operator/() [3/3]

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

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

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

◆ operator<() [1/6]

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

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

1425  {
1426  check_context(a, b);
1427  Z3_ast r = 0;
1428  if (a.is_arith() && b.is_arith()) {
1429  r = Z3_mk_lt(a.ctx(), a, b);
1430  }
1431  else if (a.is_bv() && b.is_bv()) {
1432  r = Z3_mk_bvslt(a.ctx(), a, b);
1433  }
1434  else if (a.is_fpa() && b.is_fpa()) {
1435  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1436  }
1437  else {
1438  // operator is not supported by given arguments.
1439  assert(false);
1440  }
1441  a.check_error();
1442  return expr(a.ctx(), r);
1443  }
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:408
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.

◆ operator<() [2/6]

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

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

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

◆ operator<() [3/6]

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

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

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

◆ operator<() [4/6]

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

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

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

◆ operator<() [5/6]

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

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

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

◆ operator<() [6/6]

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

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

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

◆ operator<<() [1/13]

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

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

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

◆ operator<<() [2/13]

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

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

423  {
424  if (s.kind() == Z3_INT_SYMBOL)
425  out << "k!" << s.to_int();
426  else
427  out << s.str().c_str();
428  return out;
429  }

◆ operator<<() [3/13]

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

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

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

◆ operator<<() [4/13]

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

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

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

◆ operator<<() [5/13]

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

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

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

◆ operator<<() [6/13]

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

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

2092 { out << Z3_model_to_string(m.ctx(), m); return out; }
Z3_string Z3_API Z3_model_to_string(Z3_context c, Z3_model m)
Convert the given model into a string.

◆ operator<<() [7/13]

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

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

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

◆ operator<<() [8/13]

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

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

2124  {
2125  if (r == unsat) out << "unsat";
2126  else if (r == sat) out << "sat";
2127  else out << "unknown";
2128  return out;
2129  }
Definition: z3++.h:130

◆ operator<<() [9/13]

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

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

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

◆ operator<<() [10/13]

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

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

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

◆ operator<<() [11/13]

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

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

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

◆ operator<<() [12/13]

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

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

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

◆ operator<<() [13/13]

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

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

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

◆ operator<=() [1/6]

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

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

1400  {
1401  check_context(a, b);
1402  Z3_ast r = 0;
1403  if (a.is_arith() && b.is_arith()) {
1404  r = Z3_mk_le(a.ctx(), a, b);
1405  }
1406  else if (a.is_bv() && b.is_bv()) {
1407  r = Z3_mk_bvsle(a.ctx(), a, b);
1408  }
1409  else if (a.is_fpa() && b.is_fpa()) {
1410  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1411  }
1412  else {
1413  // operator is not supported by given arguments.
1414  assert(false);
1415  }
1416  a.check_error();
1417  return expr(a.ctx(), r);
1418  }
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:408
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.

◆ operator<=() [2/6]

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

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

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

◆ operator<=() [3/6]

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

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

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

◆ operator<=() [4/6]

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

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

2543  {
2544  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2545  }
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:408

◆ operator<=() [5/6]

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

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

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

◆ operator<=() [6/6]

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

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

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

◆ operator==() [1/6]

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

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

1246  {
1247  check_context(a, b);
1248  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1249  a.check_error();
1250  return expr(a.ctx(), r);
1251  }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
Z3_ast Z3_API Z3_mk_eq(Z3_context c, Z3_ast l, Z3_ast r)
Create an AST node representing l = r.

◆ operator==() [2/6]

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

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

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

◆ operator==() [3/6]

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

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

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

◆ operator==() [4/6]

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

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

2563  {
2564  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2565  }
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:408

◆ operator==() [5/6]

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

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

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

◆ operator==() [6/6]

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

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

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

◆ operator>() [1/6]

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

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

1447  {
1448  check_context(a, b);
1449  Z3_ast r = 0;
1450  if (a.is_arith() && b.is_arith()) {
1451  r = Z3_mk_gt(a.ctx(), a, b);
1452  }
1453  else if (a.is_bv() && b.is_bv()) {
1454  r = Z3_mk_bvsgt(a.ctx(), a, b);
1455  }
1456  else if (a.is_fpa() && b.is_fpa()) {
1457  r = Z3_mk_fpa_gt(a.ctx(), a, b);
1458  }
1459  else {
1460  // operator is not supported by given arguments.
1461  assert(false);
1462  }
1463  a.check_error();
1464  return expr(a.ctx(), r);
1465  }
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:408
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.

◆ operator>() [2/6]

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

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

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

◆ operator>() [3/6]

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

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

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

◆ operator>() [4/6]

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

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

2558  {
2559  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2560  }
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:408

◆ operator>() [5/6]

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

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

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

◆ operator>() [6/6]

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

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

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

◆ operator>=() [1/6]

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

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

1319  {
1320  check_context(a, b);
1321  Z3_ast r = 0;
1322  if (a.is_arith() && b.is_arith()) {
1323  r = Z3_mk_ge(a.ctx(), a, b);
1324  }
1325  else if (a.is_bv() && b.is_bv()) {
1326  r = Z3_mk_bvsge(a.ctx(), a, b);
1327  }
1328  else {
1329  // operator is not supported by given arguments.
1330  assert(false);
1331  }
1332  a.check_error();
1333  return expr(a.ctx(), r);
1334  }
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:408

◆ operator>=() [2/6]

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

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

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

◆ operator>=() [3/6]

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

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

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

◆ operator>=() [4/6]

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

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

2548  {
2549  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2550  }
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:408

◆ operator>=() [5/6]

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

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

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

◆ operator>=() [6/6]

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

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

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

◆ operator^() [1/3]

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

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

1473 { check_context(a, b); Z3_ast r = Z3_mk_bvxor(a.ctx(), a, b); return expr(a.ctx(), r); }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
Z3_ast Z3_API Z3_mk_bvxor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise exclusive-or.

◆ operator^() [2/3]

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

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

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

◆ operator^() [3/3]

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

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

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

◆ operator|() [1/4]

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

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

1477 { check_context(a, b); Z3_ast r = Z3_mk_bvor(a.ctx(), a, b); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise or.
void check_context(object const &a, object const &b)
Definition: z3++.h:408

◆ operator|() [2/4]

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

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

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

◆ operator|() [3/4]

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

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

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

◆ operator|() [4/4]

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

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

2462  {
2463  check_context(t1, t2);
2464  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2465  t1.check_error();
2466  return tactic(t1.ctx(), r);
2467  }
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:408

◆ operator||() [1/4]

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

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

1233  {
1234  check_context(a, b);
1235  assert(a.is_bool() && b.is_bool());
1236  Z3_ast args[2] = { a, b };
1237  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1238  a.check_error();
1239  return expr(a.ctx(), r);
1240  }
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:408

◆ operator||() [2/4]

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

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

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

◆ operator||() [3/4]

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

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

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

◆ operator||() [4/4]

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

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

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

◆ operator~()

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

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

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

◆ option()

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

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

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

◆ par_and_then()

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

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

2494  {
2495  check_context(t1, t2);
2496  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
2497  t1.check_error();
2498  return tactic(t1.ctx(), r);
2499  }
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:408

◆ par_or()

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

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

2485  {
2486  if (n == 0) {
2487  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
2488  }
2489  array<Z3_tactic> buffer(n);
2490  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
2491  return tactic(tactics[0].ctx(), Z3_tactic_par_or(tactics[0].ctx(), n, buffer.ptr()));
2492  }
#define Z3_THROW(x)
Definition: z3++.h:96
def tactics(ctx=None)
Definition: z3py.py:7791
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.

◆ pbeq()

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

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

1860  {
1861  assert(es.size() > 0);
1862  context& ctx = es[0].ctx();
1863  array<Z3_ast> _es(es);
1864  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
1865  ctx.check_error();
1866  return expr(ctx, r);
1867  }
Z3_ast Z3_API Z3_mk_pbeq(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ pbge()

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

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

1852  {
1853  assert(es.size() > 0);
1854  context& ctx = es[0].ctx();
1855  array<Z3_ast> _es(es);
1856  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
1857  ctx.check_error();
1858  return expr(ctx, r);
1859  }
Z3_ast Z3_API Z3_mk_pbge(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ pble()

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

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

1844  {
1845  assert(es.size() > 0);
1846  context& ctx = es[0].ctx();
1847  array<Z3_ast> _es(es);
1848  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
1849  ctx.check_error();
1850  return expr(ctx, r);
1851  }
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.

◆ plus()

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

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

3214  {
3215  MK_EXPR1(Z3_mk_re_plus, re);
3216  }
Z3_ast Z3_API Z3_mk_re_plus(Z3_context c, Z3_ast re)
Create the regular language re+.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3118

◆ prefixof()

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

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

3196  {
3197  check_context(a, b);
3198  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3199  a.check_error();
3200  return expr(a.ctx(), r);
3201  }
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:408

◆ pw() [1/3]

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

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

1189 { _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:1174

Referenced by pw().

◆ pw() [2/3]

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

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

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

◆ pw() [3/3]

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

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

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

◆ range()

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

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

3244  {
3245  check_context(lo, hi);
3246  Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
3247  lo.check_error();
3248  return expr(lo.ctx(), r);
3249  }
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:408

Referenced by AstVector::__getitem__(), z3py::AndThen(), z3py::ArraySort(), Goal::as_expr(), ApplyResult::as_expr(), FuncEntry::as_list(), FuncInterp::as_list(), z3py::AtLeast(), z3py::BoolVector(), Solver::check(), Optimize::check(), ExprRef::children(), z3py::Concat(), Solver::consequences(), z3py::CreateDatatypes(), ModelRef::decls(), z3py::describe_probes(), z3py::EnumSort(), z3py::eq(), context::function(), z3py::Function(), function(), Statistics::get_key_value(), z3py::IntVector(), z3py::is_quantifier(), Statistics::keys(), z3py::Lambda(), Context::mkArrayConst(), Context::mkArraySort(), Context::mkConst(), Context::mkConstDecl(), Context::mkFreshConst(), Context::mkFreshConstDecl(), Context::mkFreshFuncDecl(), Context::mkFuncDecl(), z3py::OrElse(), z3py::ParOr(), z3py::probes(), z3py::RealVarVector(), z3py::RealVector(), z3py::RecAddDefinition(), context::recfun(), recfun(), z3py::RecFunction(), z3py::set_default_fp_sort(), Fixedpoint::set_predicate_representation(), ModelRef::sorts(), z3py::substitute(), z3py::substitute_vars(), z3py::tactics(), Solver::to_smt2(), and z3py::Union().

◆ re_complement()

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

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

3241  {
3243  }
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:3118

◆ re_empty()

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

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

3223  {
3224  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3225  s.check_error();
3226  return expr(s.ctx(), r);
3227  }
Z3_ast Z3_API Z3_mk_re_empty(Z3_context c, Z3_sort re)
Create an empty regular expression of sort re.

◆ re_full()

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

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

3228  {
3229  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3230  s.check_error();
3231  return expr(s.ctx(), r);
3232  }
Z3_ast Z3_API Z3_mk_re_full(Z3_context c, Z3_sort re)
Create an universal regular expression of sort re.

◆ re_intersect()

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

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

3233  {
3234  assert(args.size() > 0);
3235  context& ctx = args[0].ctx();
3236  array<Z3_ast> _args(args);
3237  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3238  ctx.check_error();
3239  return expr(ctx, r);
3240  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.

◆ recfun() [1/4]

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

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

3062  {
3063  return range.ctx().recfun(name, arity, domain, range);
3064  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2870

◆ recfun() [2/4]

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

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

3065  {
3066  return range.ctx().recfun(name, arity, domain, range);
3067  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2870

◆ recfun() [3/4]

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

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

3068  {
3069  return range.ctx().recfun(name, d1, range);
3070  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2870

◆ recfun() [4/4]

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

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

3071  {
3072  return range.ctx().recfun(name, d1, d2, range);
3073  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3244
context & ctx() const
Definition: z3++.h:404
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2870

◆ rem() [1/3]

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

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

1197  {
1198  if (a.is_fpa() && b.is_fpa()) {
1199  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1200  } else {
1201  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1202  }
1203  }
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:1174

Referenced by rem().

◆ rem() [2/3]

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

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

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

◆ rem() [3/3]

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

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

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

◆ repeat()

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

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

2469  {
2470  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
2471  t.check_error();
2472  return tactic(t.ctx(), r);
2473  }
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:1499

◆ reset_params()

void z3::reset_params ( )
inline

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

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

◆ select() [1/3]

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

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

3075  {
3076  check_context(a, i);
3077  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3078  a.check_error();
3079  return expr(a.ctx(), r);
3080  }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i)
Array read. The argument a is the array and i is the index of the array that gets read.

Referenced by select().

◆ select() [2/3]

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

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

3081  {
3082  return select(a, a.ctx().num_val(i, a.get_sort().array_domain()));
3083  }
expr select(expr const &a, expr_vector const &i)
Definition: z3++.h:3084

◆ select() [3/3]

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

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

3084  {
3085  check_context(a, i);
3086  array<Z3_ast> idxs(i);
3087  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3088  a.check_error();
3089  return expr(a.ctx(), r);
3090  }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
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.

◆ set_add()

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

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

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

◆ set_complement()

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

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

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

◆ set_del()

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

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

3145  {
3146  MK_EXPR2(Z3_mk_set_del, s, e);
3147  }
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:3123

◆ set_difference()

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

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

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

◆ set_intersect()

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

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

3157  {
3158  check_context(a, b);
3159  Z3_ast es[2] = { a, b };
3160  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3161  a.check_error();
3162  return expr(a.ctx(), r);
3163  }
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:408

◆ set_member()

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

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

3173  {
3174  MK_EXPR2(Z3_mk_set_member, s, e);
3175  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3123
Z3_ast Z3_API Z3_mk_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check for set membership.

◆ set_param() [1/3]

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

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

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

◆ set_param() [2/3]

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

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

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

◆ set_param() [3/3]

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

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

77 { std::ostringstream oss; oss << value; Z3_global_param_set(param, oss.str().c_str()); }
void Z3_API Z3_global_param_set(Z3_string param_id, Z3_string param_value)
Set a global (or module) parameter. This setting is shared by all Z3 contexts.

◆ set_subset()

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

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

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

◆ set_union()

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

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

3149  {
3150  check_context(a, b);
3151  Z3_ast es[2] = { a, b };
3152  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
3153  a.check_error();
3154  return expr(a.ctx(), r);
3155  }
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:408

◆ sext()

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

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

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

1663 { 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:1563

◆ shl() [1/3]

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

shift left operator for bitvectors

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

1637 { 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:1563

Referenced by shl().

◆ shl() [2/3]

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

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

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

◆ shl() [3/3]

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

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

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

◆ smod() [1/3]

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

signed modulus operator for bitvectors

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

1623 { 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:1563

Referenced by smod().

◆ smod() [2/3]

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

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

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

◆ smod() [3/3]

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

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

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

◆ sqrt()

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

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

1529  {
1530  check_context(a, rm);
1531  assert(a.is_fpa());
1532  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
1533  return expr(a.ctx(), r);
1534  }
void check_context(object const &a, object const &b)
Definition: z3++.h:408
Z3_ast Z3_API Z3_mk_fpa_sqrt(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point square root.

◆ srem() [1/3]

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

signed remainder operator for bitvectors

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

1616 { 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:1563

Referenced by srem().

◆ srem() [2/3]

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

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

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

◆ srem() [3/3]

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

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

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

◆ star()

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

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

3220  {
3221  MK_EXPR1(Z3_mk_re_star, re);
3222  }
Z3_ast Z3_API Z3_mk_re_star(Z3_context c, Z3_ast re)
Create the regular language re*.
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3118

◆ store() [1/5]

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

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

3092  {
3093  check_context(a, i); check_context(a, v);
3094  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3095  a.check_error();
3096  return expr(a.ctx(), r);
3097  }
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:408

Referenced by store().

◆ store() [2/5]

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

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

3099 { 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:3104

◆ store() [3/5]

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

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

3100 { 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:3104

◆ store() [4/5]

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

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

3101  {
3102  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
3103  }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:3104

◆ store() [5/5]

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

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

3104  {
3105  check_context(a, i); check_context(a, v);
3106  array<Z3_ast> idxs(i);
3107  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3108  a.check_error();
3109  return expr(a.ctx(), r);
3110  }
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:408

◆ suffixof()

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

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

3190  {
3191  check_context(a, b);
3192  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3193  a.check_error();
3194  return expr(a.ctx(), r);
3195  }
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:408

◆ sum()

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

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

1884  {
1885  assert(args.size() > 0);
1886  context& ctx = args[0].ctx();
1887  array<Z3_ast> _args(args);
1888  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
1889  ctx.check_error();
1890  return expr(ctx, r);
1891  }
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].

◆ to_check_result()

check_result z3::to_check_result ( Z3_lbool  l)
inline

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

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

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

◆ to_expr()

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

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

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

1563  {
1564  c.check_error();
1565  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
1566  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
1567  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
1569  return expr(c, a);
1570  }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.

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

◆ to_func_decl()

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

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

1577  {
1578  c.check_error();
1579  return func_decl(c, f);
1580  }

◆ to_re()

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

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

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

◆ to_real()

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

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

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

◆ to_sort()

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

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

1572  {
1573  c.check_error();
1574  return sort(c, s);
1575  }

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

◆ try_for()

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

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

2480  {
2481  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
2482  t.check_error();
2483  return tactic(t.ctx(), r);
2484  }
Z3_tactic Z3_API Z3_tactic_try_for(Z3_context c, Z3_tactic t, unsigned ms)
Return a tactic that applies t to a given goal for ms milliseconds. If t does not terminate in ms mil...

◆ udiv() [1/3]

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

unsigned division operator for bitvectors.

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

1609 { 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:1563

Referenced by udiv().

◆ udiv() [2/3]

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

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

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

◆ udiv() [3/3]

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

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

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

◆ uge() [1/3]

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

unsigned greater than or equal to operator for bitvectors.

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

1597 { 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:1563

Referenced by uge().

◆ uge() [2/3]

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

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

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

◆ uge() [3/3]

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

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

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

◆ ugt() [1/3]

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

unsigned greater than operator for bitvectors.

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

1603 { 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:1563

Referenced by ugt().

◆ ugt() [2/3]

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

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

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

◆ ugt() [3/3]

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

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

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

◆ ule() [1/3]

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

unsigned less than or equal to operator for bitvectors.

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

1585 { 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:1563

Referenced by ule().

◆ ule() [2/3]

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

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

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

◆ ule() [3/3]

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

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

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

◆ ult() [1/3]

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

unsigned less than operator for bitvectors.

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

1591 { 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:1563

Referenced by ult().

◆ ult() [2/3]

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

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

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

◆ ult() [3/3]

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

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

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

◆ urem() [1/3]

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

unsigned reminder operator for bitvectors

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

1630 { 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:1563

Referenced by urem().

◆ urem() [2/3]

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

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

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

◆ urem() [3/3]

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

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

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

◆ when()

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

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

2712  {
2713  check_context(p, t);
2714  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
2715  t.check_error();
2716  return tactic(t.ctx(), r);
2717  }
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:408

◆ with()

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

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

2475  {
2476  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2477  t.check_error();
2478  return tactic(t.ctx(), r);
2479  }
Z3_tactic Z3_API Z3_tactic_using_params(Z3_context c, Z3_tactic t, Z3_params p)
Return a tactic that applies t using the given set of parameters.

◆ xnor()

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

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

1483 { check_context(a, b); Z3_ast r = Z3_mk_bvxnor(a.ctx(), a, b); return expr(a.ctx(), r); }
Z3_ast Z3_API Z3_mk_bvxnor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise xnor.
void check_context(object const &a, object const &b)
Definition: z3++.h:408

◆ zext()

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

Extend the given bit-vector with zeros to the (unsigned) equivalent bitvector of size m+i, where m is the size of the given bit-vector.

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

1658 { 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:1563
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,...