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 }
 

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 operator~ (expr const &a)
 
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 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)
 
expr select (expr const &a, expr const &i)
 
expr select (expr const &a, int i)
 
expr store (expr const &a, expr const &i, expr const &v)
 
expr select (expr const &a, expr_vector const &i)
 
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)
 
expr interpolant (expr const &a)
 

Detailed Description

Z3 C++ namespace.

Typedef Documentation

◆ ast_vector

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

◆ expr_vector

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

◆ func_decl_vector

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

◆ sort_vector

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

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

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

126  {
127  unsat, sat, unknown
128  };
Definition: z3++.h:127

Function Documentation

◆ as_array()

expr z3::as_array ( func_decl f)
inline

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

2736  {
2737  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
2738  f.check_error();
2739  return expr(f.ctx(), r);
2740  }
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 1476 of file z3++.h.

Referenced by ashr().

1476 { 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:1388

◆ ashr() [2/3]

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

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

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

◆ ashr() [3/3]

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

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

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

◆ atleast()

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

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

1676  {
1677  assert(es.size() > 0);
1678  context& ctx = es[0].ctx();
1679  array<Z3_ast> _es(es);
1680  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
1681  ctx.check_error();
1682  return expr(ctx, r);
1683  }
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 1668 of file z3++.h.

1668  {
1669  assert(es.size() > 0);
1670  context& ctx = es[0].ctx();
1671  array<Z3_ast> _es(es);
1672  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
1673  ctx.check_error();
1674  return expr(ctx, r);
1675  }
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 1702 of file z3++.h.

Referenced by operator+().

1702  {
1703  check_context(a, b);
1704  Z3_ast r;
1705  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
1706  Z3_ast _args[2] = { a, b };
1707  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
1708  }
1709  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
1710  Z3_ast _args[2] = { a, b };
1711  r = Z3_mk_re_concat(a.ctx(), 2, _args);
1712  }
1713  else {
1714  r = Z3_mk_concat(a.ctx(), a, b);
1715  }
1716  a.ctx().check_error();
1717  return expr(a.ctx(), r);
1718  }
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.
Z3_bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
Z3_bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.
void check_context(object const &a, object const &b)
Definition: z3++.h:377

◆ concat() [2/2]

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

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

1720  {
1721  Z3_ast r;
1722  assert(args.size() > 0);
1723  if (args.size() == 1) {
1724  return args[0];
1725  }
1726  context& ctx = args[0].ctx();
1727  array<Z3_ast> _args(args);
1728  if (Z3_is_seq_sort(ctx, args[0].get_sort())) {
1729  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
1730  }
1731  else if (Z3_is_re_sort(ctx, args[0].get_sort())) {
1732  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
1733  }
1734  else {
1735  r = _args[args.size()-1];
1736  for (unsigned i = args.size()-1; i > 0; ) {
1737  --i;
1738  r = Z3_mk_concat(ctx, _args[i], r);
1739  ctx.check_error();
1740  }
1741  }
1742  ctx.check_error();
1743  return expr(ctx, r);
1744  }
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.
Z3_bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
Z3_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 2421 of file z3++.h.

2421  {
2422  check_context(p, t1); check_context(p, t2);
2423  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
2424  t1.check_error();
2425  return tactic(t1.ctx(), r);
2426  }
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:377

◆ const_array()

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

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

2753  {
2754  MK_EXPR2(Z3_mk_const_array, d, v);
2755  }
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:2747

◆ distinct()

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

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

1693  {
1694  assert(args.size() > 0);
1695  context& ctx = args[0].ctx();
1696  array<Z3_ast> _args(args);
1697  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
1698  ctx.check_error();
1699  return expr(ctx, r);
1700  }
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 2809 of file z3++.h.

2809  {
2810  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
2811  s.check_error();
2812  return expr(s.ctx(), r);
2813  }
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 2757 of file z3++.h.

2757  {
2759  }
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:2742

◆ eq()

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

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

476 { return Z3_is_eq_ast(a.ctx(), a, b) != 0; }
Z3_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 1620 of file z3++.h.

1620  {
1621  check_context(x, b);
1622  Z3_app vars[] = {(Z3_app) x};
1623  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1624  }
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:377

◆ exists() [2/5]

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

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

1625  {
1626  check_context(x1, b); check_context(x2, b);
1627  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1628  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1629  }
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:377

◆ exists() [3/5]

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

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

1630  {
1631  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1632  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1633  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1634  }
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:377

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

1635  {
1636  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1637  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1638  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1639  }
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:377

◆ exists() [5/5]

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

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

1640  {
1641  array<Z3_app> vars(xs);
1642  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);
1643  }
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 2410 of file z3++.h.

2410  {
2411  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
2412  p.check_error();
2413  return tactic(p.ctx(), r);
2414  }
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.

◆ forall() [1/5]

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

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

1596  {
1597  check_context(x, b);
1598  Z3_app vars[] = {(Z3_app) x};
1599  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1600  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 1601 of file z3++.h.

1601  {
1602  check_context(x1, b); check_context(x2, b);
1603  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1604  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1605  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 1606 of file z3++.h.

1606  {
1607  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1608  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1609  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1610  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 1611 of file z3++.h.

1611  {
1612  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1613  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1614  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1615  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 1616 of file z3++.h.

1616  {
1617  array<Z3_app> vars(xs);
1618  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);
1619  }
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 2761 of file z3++.h.

2761  {
2763  }
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:2742

◆ function() [1/9]

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

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

2674  {
2675  return range.ctx().function(name, arity, domain, range);
2676  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

◆ function() [2/9]

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

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

2677  {
2678  return range.ctx().function(name, arity, domain, range);
2679  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

◆ function() [3/9]

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

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

2680  {
2681  return range.ctx().function(name, domain, range);
2682  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

◆ function() [4/9]

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

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

2683  {
2684  return range.ctx().function(name, d1, d2, range);
2685  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

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

2686  {
2687  return range.ctx().function(name, d1, d2, d3, range);
2688  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

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

2689  {
2690  return range.ctx().function(name, d1, d2, d3, d4, range);
2691  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

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

2692  {
2693  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
2694  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

◆ function() [8/9]

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

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

2695  {
2696  return range.ctx().function(name, domain, range);
2697  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

◆ function() [9/9]

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

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

2698  {
2699  return range.ctx().function(name.c_str(), domain, range);
2700  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:2868
context & ctx() const
Definition: z3++.h:373
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2477

◆ implies() [1/3]

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

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

Referenced by implies().

1091  {
1092  assert(a.is_bool() && b.is_bool());
1093  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1094  }
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:1084

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

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

◆ in_re()

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

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

2835  {
2836  MK_EXPR2(Z3_mk_seq_in_re, s, re);
2837  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:2747
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 2826 of file z3++.h.

2826  {
2827  check_context(s, substr); check_context(s, offset);
2828  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
2829  s.check_error();
2830  return expr(s.ctx(), r);
2831  }
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:377

◆ interpolant()

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

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

2879  {
2880  return expr(a.ctx(), Z3_mk_interpolant(a.ctx(), a));
2881  }
Z3_ast Z3_API Z3_mk_interpolant(Z3_context c, Z3_ast a)
Create an AST node marking a formula position for interpolation.

◆ is_int()

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

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

1121 { _Z3_MK_UN_(e, Z3_mk_is_int); }
#define _Z3_MK_UN_(a, mkun)
Definition: z3++.h:1113
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 1375 of file z3++.h.

1375  {
1376  check_context(c, t); check_context(c, e);
1377  assert(c.is_bool());
1378  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
1379  c.check_error();
1380  return expr(c.ctx(), r);
1381  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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).

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

Referenced by lshr().

1469 { 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:1388

◆ lshr() [2/3]

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

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

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

◆ lshr() [3/3]

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

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

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

◆ mk_and()

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

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

1752  {
1753  array<Z3_ast> _args(args);
1754  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
1755  args.check_error();
1756  return expr(args.ctx(), r);
1757  }
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 1746 of file z3++.h.

1746  {
1747  array<Z3_ast> _args(args);
1748  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
1749  args.check_error();
1750  return expr(args.ctx(), r);
1751  }
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 1103 of file z3++.h.

Referenced by mod().

1103 { _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:1084

◆ mod() [2/3]

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

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

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

◆ mod() [3/3]

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

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

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

◆ nand()

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

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

1361 { 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:377

◆ nor()

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

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

1362 { 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:377

◆ operator &() [1/4]

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

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

1349 { 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:377
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 1350 of file z3++.h.

1350 { 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 1351 of file z3++.h.

1351 { 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 2170 of file z3++.h.

2170  {
2171  check_context(t1, t2);
2172  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2173  t1.check_error();
2174  return tactic(t1.ctx(), r);
2175  }
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:377

◆ operator &&() [1/4]

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

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

1125  {
1126  check_context(a, b);
1127  assert(a.is_bool() && b.is_bool());
1128  Z3_ast args[2] = { a, b };
1129  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1130  a.check_error();
1131  return expr(a.ctx(), r);
1132  }
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:377

◆ operator &&() [2/4]

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

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

1134 { 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 1135 of file z3++.h.

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

◆ operator &&() [4/4]

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

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

2283  {
2284  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2285  }
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:377

◆ operator!() [1/2]

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

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

1119 { assert(a.is_bool()); _Z3_MK_UN_(a, Z3_mk_not); }
#define _Z3_MK_UN_(a, mkun)
Definition: z3++.h:1113
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 2289 of file z3++.h.

2289  {
2290  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
2291  }
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 1159 of file z3++.h.

1159  {
1160  check_context(a, b);
1161  Z3_ast args[2] = { a, b };
1162  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1163  a.check_error();
1164  return expr(a.ctx(), r);
1165  }
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:377

◆ operator!=() [2/3]

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

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

1166 { assert(a.is_arith() || a.is_bv()); 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 1167 of file z3++.h.

1167 { assert(b.is_arith() || b.is_bv()); 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 1196 of file z3++.h.

1196  {
1197  check_context(a, b);
1198  Z3_ast r = 0;
1199  if (a.is_arith() && b.is_arith()) {
1200  Z3_ast args[2] = { a, b };
1201  r = Z3_mk_mul(a.ctx(), 2, args);
1202  }
1203  else if (a.is_bv() && b.is_bv()) {
1204  r = Z3_mk_bvmul(a.ctx(), a, b);
1205  }
1206  else {
1207  // operator is not supported by given arguments.
1208  assert(false);
1209  }
1210  a.check_error();
1211  return expr(a.ctx(), r);
1212  }
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].
void check_context(object const &a, object const &b)
Definition: z3++.h:377
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two&#39;s complement multiplication.

◆ operator*() [2/3]

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

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

1213 { 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 1214 of file z3++.h.

1214 { 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 1169 of file z3++.h.

1169  {
1170  check_context(a, b);
1171  Z3_ast r = 0;
1172  if (a.is_arith() && b.is_arith()) {
1173  Z3_ast args[2] = { a, b };
1174  r = Z3_mk_add(a.ctx(), 2, args);
1175  }
1176  else if (a.is_bv() && b.is_bv()) {
1177  r = Z3_mk_bvadd(a.ctx(), a, b);
1178  }
1179  else if (a.is_seq() && b.is_seq()) {
1180  return concat(a, b);
1181  }
1182  else if (a.is_re() && b.is_re()) {
1183  Z3_ast _args[2] = { a, b };
1184  r = Z3_mk_re_union(a.ctx(), 2, _args);
1185  }
1186  else {
1187  // operator is not supported by given arguments.
1188  assert(false);
1189  }
1190  a.check_error();
1191  return expr(a.ctx(), r);
1192  }
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].
expr concat(expr_vector const &args)
Definition: z3++.h:1720
void check_context(object const &a, object const &b)
Definition: z3++.h:377
Z3_ast Z3_API Z3_mk_re_union(Z3_context c, unsigned n, Z3_ast const args[])
Create the union of the regular languages.
Z3_ast Z3_API Z3_mk_bvadd(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two&#39;s complement addition.

◆ operator+() [2/3]

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

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

1193 { 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 1194 of file z3++.h.

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

◆ operator-() [1/4]

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

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

1253  {
1254  Z3_ast r = 0;
1255  if (a.is_arith()) {
1256  r = Z3_mk_unary_minus(a.ctx(), a);
1257  }
1258  else if (a.is_bv()) {
1259  r = Z3_mk_bvneg(a.ctx(), a);
1260  }
1261  else {
1262  // operator is not supported by given arguments.
1263  assert(false);
1264  }
1265  a.check_error();
1266  return expr(a.ctx(), r);
1267  }
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_bvneg(Z3_context c, Z3_ast t1)
Standard two&#39;s complement unary minus.

◆ operator-() [2/4]

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

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

1269  {
1270  check_context(a, b);
1271  Z3_ast r = 0;
1272  if (a.is_arith() && b.is_arith()) {
1273  Z3_ast args[2] = { a, b };
1274  r = Z3_mk_sub(a.ctx(), 2, args);
1275  }
1276  else if (a.is_bv() && b.is_bv()) {
1277  r = Z3_mk_bvsub(a.ctx(), a, b);
1278  }
1279  else {
1280  // operator is not supported by given arguments.
1281  assert(false);
1282  }
1283  a.check_error();
1284  return expr(a.ctx(), r);
1285  }
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:377
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two&#39;s complement subtraction.

◆ operator-() [3/4]

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

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

1286 { 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 1287 of file z3++.h.

1287 { 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 1234 of file z3++.h.

1234  {
1235  check_context(a, b);
1236  Z3_ast r = 0;
1237  if (a.is_arith() && b.is_arith()) {
1238  r = Z3_mk_div(a.ctx(), a, b);
1239  }
1240  else if (a.is_bv() && b.is_bv()) {
1241  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1242  }
1243  else {
1244  // operator is not supported by given arguments.
1245  assert(false);
1246  }
1247  a.check_error();
1248  return expr(a.ctx(), r);
1249  }
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed division.
Z3_ast Z3_API Z3_mk_div(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 div arg2.
void check_context(object const &a, object const &b)
Definition: z3++.h:377

◆ operator/() [2/3]

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

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

1250 { 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 1251 of file z3++.h.

1251 { 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 1311 of file z3++.h.

1311  {
1312  check_context(a, b);
1313  Z3_ast r = 0;
1314  if (a.is_arith() && b.is_arith()) {
1315  r = Z3_mk_lt(a.ctx(), a, b);
1316  }
1317  else if (a.is_bv() && b.is_bv()) {
1318  r = Z3_mk_bvslt(a.ctx(), a, b);
1319  }
1320  else {
1321  // operator is not supported by given arguments.
1322  assert(false);
1323  }
1324  a.check_error();
1325  return expr(a.ctx(), r);
1326  }
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed less than.
Z3_ast Z3_API Z3_mk_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than.
void check_context(object const &a, object const &b)
Definition: z3++.h:377

◆ operator<() [2/6]

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

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

1327 { 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 1328 of file z3++.h.

1328 { 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 2268 of file z3++.h.

2268  {
2269  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2270  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 2271 of file z3++.h.

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

◆ operator<() [6/6]

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

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

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

◆ operator<<() [1/13]

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

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

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

◆ operator<<() [2/13]

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

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

392  {
393  if (s.kind() == Z3_INT_SYMBOL)
394  out << "k!" << s.to_int();
395  else
396  out << s.str().c_str();
397  return out;
398  }

◆ operator<<() [3/13]

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

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

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

◆ operator<<() [4/13]

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

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

446  {
447  out << Z3_params_to_string(p.ctx(), p); return out;
448  }
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 472 of file z3++.h.

472  {
473  out << Z3_ast_to_string(n.ctx(), n.m_ast); return out;
474  }
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 1892 of file z3++.h.

1892 { 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 1921 of file z3++.h.

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

1924  {
1925  if (r == unsat) out << "unsat";
1926  else if (r == sat) out << "sat";
1927  else out << "unknown";
1928  return out;
1929  }
Definition: z3++.h:127

◆ operator<<() [9/13]

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

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

2037 { 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 2085 of file z3++.h.

2085 { 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 2128 of file z3++.h.

2128 { 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 2364 of file z3++.h.

2364 { 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 2408 of file z3++.h.

2408 { 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 1289 of file z3++.h.

1289  {
1290  check_context(a, b);
1291  Z3_ast r = 0;
1292  if (a.is_arith() && b.is_arith()) {
1293  r = Z3_mk_le(a.ctx(), a, b);
1294  }
1295  else if (a.is_bv() && b.is_bv()) {
1296  r = Z3_mk_bvsle(a.ctx(), a, b);
1297  }
1298  else {
1299  // operator is not supported by given arguments.
1300  assert(false);
1301  }
1302  a.check_error();
1303  return expr(a.ctx(), r);
1304  }
Z3_ast Z3_API Z3_mk_le(Z3_context c, Z3_ast t1, Z3_ast t2)
Create less than or equal to.
Z3_ast Z3_API Z3_mk_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed less than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:377

◆ operator<=() [2/6]

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

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

1305 { 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 1306 of file z3++.h.

1306 { 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 2258 of file z3++.h.

2258  {
2259  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2260  }
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:377

◆ operator<=() [5/6]

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

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

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

◆ operator<=() [6/6]

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

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

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

◆ operator==() [1/6]

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

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

1150  {
1151  check_context(a, b);
1152  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1153  a.check_error();
1154  return expr(a.ctx(), r);
1155  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 1156 of file z3++.h.

1156 { assert(a.is_arith() || a.is_bv()); 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 1157 of file z3++.h.

1157 { assert(b.is_arith() || b.is_bv()); 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 2278 of file z3++.h.

2278  {
2279  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2280  }
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:377

◆ operator==() [5/6]

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

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

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

◆ operator==() [6/6]

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

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

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

◆ operator>() [1/6]

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

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

1330  {
1331  check_context(a, b);
1332  Z3_ast r = 0;
1333  if (a.is_arith() && b.is_arith()) {
1334  r = Z3_mk_gt(a.ctx(), a, b);
1335  }
1336  else if (a.is_bv() && b.is_bv()) {
1337  r = Z3_mk_bvsgt(a.ctx(), a, b);
1338  }
1339  else {
1340  // operator is not supported by given arguments.
1341  assert(false);
1342  }
1343  a.check_error();
1344  return expr(a.ctx(), r);
1345  }
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed greater than.
Z3_ast Z3_API Z3_mk_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than.
void check_context(object const &a, object const &b)
Definition: z3++.h:377

◆ operator>() [2/6]

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

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

1346 { 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 1347 of file z3++.h.

1347 { 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 2273 of file z3++.h.

2273  {
2274  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2275  }
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:377

◆ operator>() [5/6]

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

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

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

◆ operator>() [6/6]

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

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

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

◆ operator>=() [1/6]

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

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

1217  {
1218  check_context(a, b);
1219  Z3_ast r = 0;
1220  if (a.is_arith() && b.is_arith()) {
1221  r = Z3_mk_ge(a.ctx(), a, b);
1222  }
1223  else if (a.is_bv() && b.is_bv()) {
1224  r = Z3_mk_bvsge(a.ctx(), a, b);
1225  }
1226  else {
1227  // operator is not supported by given arguments.
1228  assert(false);
1229  }
1230  a.check_error();
1231  return expr(a.ctx(), r);
1232  }
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
Z3_ast Z3_API Z3_mk_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:377

◆ operator>=() [2/6]

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

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

1308 { 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 1309 of file z3++.h.

1309 { 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 2263 of file z3++.h.

2263  {
2264  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2265  }
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:377

◆ operator>=() [5/6]

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

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

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

◆ operator>=() [6/6]

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

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

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

◆ operator^() [1/3]

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

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

1353 { 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:377
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 1354 of file z3++.h.

1354 { 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 1355 of file z3++.h.

1355 { 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 1357 of file z3++.h.

1357 { 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:377

◆ operator|() [2/4]

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

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

1358 { 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 1359 of file z3++.h.

1359 { 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 2177 of file z3++.h.

2177  {
2178  check_context(t1, t2);
2179  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2180  t1.check_error();
2181  return tactic(t1.ctx(), r);
2182  }
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:377

◆ operator||() [1/4]

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

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

1137  {
1138  check_context(a, b);
1139  assert(a.is_bool() && b.is_bool());
1140  Z3_ast args[2] = { a, b };
1141  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1142  a.check_error();
1143  return expr(a.ctx(), r);
1144  }
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:377

◆ operator||() [2/4]

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

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

1146 { 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 1148 of file z3++.h.

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

◆ operator||() [4/4]

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

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

2286  {
2287  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2288  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 1365 of file z3++.h.

1365 { 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 2841 of file z3++.h.

2841  {
2843  }
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:2742

◆ par_and_then()

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

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

2209  {
2210  check_context(t1, t2);
2211  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
2212  t1.check_error();
2213  return tactic(t1.ctx(), r);
2214  }
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:377

◆ par_or()

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

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

2200  {
2201  if (n == 0) {
2202  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
2203  }
2204  array<Z3_tactic> buffer(n);
2205  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
2206  return tactic(tactics[0].ctx(), Z3_tactic_par_or(tactics[0].ctx(), n, buffer.ptr()));
2207  }
#define Z3_THROW(x)
Definition: z3++.h:93
def tactics(ctx=None)
Definition: z3py.py:7498
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 1660 of file z3++.h.

1660  {
1661  assert(es.size() > 0);
1662  context& ctx = es[0].ctx();
1663  array<Z3_ast> _es(es);
1664  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
1665  ctx.check_error();
1666  return expr(ctx, r);
1667  }
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 1652 of file z3++.h.

1652  {
1653  assert(es.size() > 0);
1654  context& ctx = es[0].ctx();
1655  array<Z3_ast> _es(es);
1656  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
1657  ctx.check_error();
1658  return expr(ctx, r);
1659  }
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 1644 of file z3++.h.

1644  {
1645  assert(es.size() > 0);
1646  context& ctx = es[0].ctx();
1647  array<Z3_ast> _es(es);
1648  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
1649  ctx.check_error();
1650  return expr(ctx, r);
1651  }
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 2838 of file z3++.h.

2838  {
2839  MK_EXPR1(Z3_mk_re_plus, re);
2840  }
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:2742

◆ prefixof()

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

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

2820  {
2821  check_context(a, b);
2822  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
2823  a.check_error();
2824  return expr(a.ctx(), r);
2825  }
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:377

◆ pw() [1/3]

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

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

Referenced by pw().

1099 { _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:1084

◆ pw() [2/3]

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

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

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

◆ pw() [3/3]

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

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

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

◆ range()

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

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

Referenced by z3py::AndThen(), ApplyResult::as_expr(), z3py::AtLeast(), ExprRef::children(), z3py::describe_probes(), z3py::eq(), context::function(), z3py::Function(), function(), Context::mkArrayConst(), Context::mkArraySort(), Context::mkConst(), Context::mkConstDecl(), Context::mkFreshConst(), Context::mkFreshConstDecl(), Context::mkFreshFuncDecl(), Context::mkFuncDecl(), z3py::OrElse(), z3py::ParOr(), z3py::probes(), z3py::RealVarVector(), AstVector::resize(), Fixedpoint::set_predicate_representation(), z3py::substitute(), z3py::substitute_vars(), z3py::tactics(), and Solver::to_smt2().

2868  {
2869  check_context(lo, hi);
2870  Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
2871  lo.check_error();
2872  return expr(lo.ctx(), r);
2873  }
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:377

◆ re_complement()

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

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

2865  {
2867  }
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:2742

◆ re_empty()

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

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

2847  {
2848  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
2849  s.check_error();
2850  return expr(s.ctx(), r);
2851  }
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 2852 of file z3++.h.

2852  {
2853  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
2854  s.check_error();
2855  return expr(s.ctx(), r);
2856  }
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 2857 of file z3++.h.

2857  {
2858  assert(args.size() > 0);
2859  context& ctx = args[0].ctx();
2860  array<Z3_ast> _args(args);
2861  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
2862  ctx.check_error();
2863  return expr(ctx, r);
2864  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.

◆ rem() [1/3]

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

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

Referenced by rem().

1107 { _Z3_MK_BIN_(a, b, Z3_mk_rem); }
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:1084

◆ rem() [2/3]

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

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

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

◆ rem() [3/3]

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

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

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

◆ repeat()

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

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

2184  {
2185  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
2186  t.check_error();
2187  return tactic(t.ctx(), r);
2188  }
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...

◆ reset_params()

void z3::reset_params ( )
inline

Definition at line 75 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 2702 of file z3++.h.

Referenced by select().

2702  {
2703  check_context(a, i);
2704  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
2705  a.check_error();
2706  return expr(a.ctx(), r);
2707  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i)
Array read. The argument a is the array and i is the index of the array that gets read...

◆ select() [2/3]

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

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

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

◆ select() [3/3]

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

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

2715  {
2716  check_context(a, i);
2717  array<Z3_ast> idxs(i);
2718  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
2719  a.check_error();
2720  return expr(a.ctx(), r);
2721  }
void check_context(object const &a, object const &b)
Definition: z3++.h:377
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 2765 of file z3++.h.

2765  {
2766  MK_EXPR2(Z3_mk_set_add, s, e);
2767  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:2747
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 2793 of file z3++.h.

2793  {
2795  }
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:2742

◆ set_del()

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

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

2769  {
2770  MK_EXPR2(Z3_mk_set_del, s, e);
2771  }
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:2747

◆ set_difference()

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

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

2789  {
2791  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:2747
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 2781 of file z3++.h.

2781  {
2782  check_context(a, b);
2783  Z3_ast es[2] = { a, b };
2784  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
2785  a.check_error();
2786  return expr(a.ctx(), r);
2787  }
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:377

◆ set_member()

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

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

2797  {
2798  MK_EXPR2(Z3_mk_set_member, s, e);
2799  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:2747
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 72 of file z3++.h.

72 { 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 73 of file z3++.h.

73 { 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 74 of file z3++.h.

74 { 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 2801 of file z3++.h.

2801  {
2802  MK_EXPR2(Z3_mk_set_subset, a, b);
2803  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:2747
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 2773 of file z3++.h.

2773  {
2774  check_context(a, b);
2775  Z3_ast es[2] = { a, b };
2776  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
2777  a.check_error();
2778  return expr(a.ctx(), r);
2779  }
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:377

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

1488 { 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:1388

◆ shl() [1/3]

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

shift left operator for bitvectors

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

Referenced by shl().

1462 { 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:1388

◆ shl() [2/3]

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

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

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

◆ shl() [3/3]

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

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

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

◆ smod() [1/3]

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

signed modulus operator for bitvectors

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

Referenced by smod().

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

◆ smod() [2/3]

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

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

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

◆ smod() [3/3]

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

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

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

◆ srem() [1/3]

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

signed remainder operator for bitvectors

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

Referenced by srem().

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

◆ srem() [2/3]

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

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

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

◆ srem() [3/3]

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

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

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

◆ star()

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

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

2844  {
2845  MK_EXPR1(Z3_mk_re_star, re);
2846  }
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:2742

◆ store() [1/5]

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

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

Referenced by store().

2709  {
2710  check_context(a, i); check_context(a, v);
2711  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
2712  a.check_error();
2713  return expr(a.ctx(), r);
2714  }
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:377

◆ store() [2/5]

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

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

2723 { 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:2728

◆ store() [3/5]

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

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

2724 { 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:2728

◆ store() [4/5]

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

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

2725  {
2726  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
2727  }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:2728

◆ store() [5/5]

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

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

2728  {
2729  check_context(a, i); check_context(a, v);
2730  array<Z3_ast> idxs(i);
2731  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
2732  a.check_error();
2733  return expr(a.ctx(), r);
2734  }
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:377

◆ suffixof()

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

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

2814  {
2815  check_context(a, b);
2816  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
2817  a.check_error();
2818  return expr(a.ctx(), r);
2819  }
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:377

◆ sum()

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

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

1684  {
1685  assert(args.size() > 0);
1686  context& ctx = args[0].ctx();
1687  array<Z3_ast> _args(args);
1688  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
1689  ctx.check_error();
1690  return expr(ctx, r);
1691  }
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 130 of file z3++.h.

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

130  {
131  if (l == Z3_L_TRUE) return sat;
132  else if (l == Z3_L_FALSE) return unsat;
133  return unknown;
134  }
Definition: z3++.h:127

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

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

1388  {
1389  c.check_error();
1390  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
1391  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
1392  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
1394  return expr(c, a);
1395  }
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.

◆ to_func_decl()

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

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

1402  {
1403  c.check_error();
1404  return func_decl(c, f);
1405  }

◆ to_re()

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

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

2832  {
2834  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:2742
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 2672 of file z3++.h.

2672 { 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 1397 of file z3++.h.

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

1397  {
1398  c.check_error();
1399  return sort(c, s);
1400  }

◆ try_for()

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

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

2195  {
2196  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
2197  t.check_error();
2198  return tactic(t.ctx(), r);
2199  }
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 1434 of file z3++.h.

Referenced by udiv().

1434 { 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:1388

◆ udiv() [2/3]

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

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

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

◆ udiv() [3/3]

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

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

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

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

Referenced by uge().

1422 { 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:1388

◆ uge() [2/3]

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

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

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

◆ uge() [3/3]

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

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

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

◆ ugt() [1/3]

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

unsigned greater than operator for bitvectors.

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

Referenced by ugt().

1428 { 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:1388

◆ ugt() [2/3]

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

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

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

◆ ugt() [3/3]

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

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

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

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

Referenced by ule().

1410 { 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:1388

◆ ule() [2/3]

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

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

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

◆ ule() [3/3]

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

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

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

◆ ult() [1/3]

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

unsigned less than operator for bitvectors.

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

Referenced by ult().

1416 { 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:1388

◆ ult() [2/3]

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

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

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

◆ ult() [3/3]

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

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

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

◆ urem() [1/3]

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

unsigned reminder operator for bitvectors

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

Referenced by urem().

1455 { 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:1388

◆ urem() [2/3]

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

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

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

◆ urem() [3/3]

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

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

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

◆ when()

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

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

2415  {
2416  check_context(p, t);
2417  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
2418  t.check_error();
2419  return tactic(t.ctx(), r);
2420  }
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:377

◆ with()

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

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

2190  {
2191  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2192  t.check_error();
2193  return tactic(t.ctx(), r);
2194  }
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 1363 of file z3++.h.

1363 { 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:377

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

1483 { 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:1388
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...