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

Z3 C++ namespace. More...

Data Structures

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

Typedefs

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

Enumerations

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

Functions

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

Detailed Description

Z3 C++ namespace.

Typedef Documentation

◆ ast_vector

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

◆ expr_vector

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

◆ func_decl_vector

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

◆ sort_vector

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

Enumeration Type Documentation

◆ check_result

Enumerator
unsat 
sat 
unknown 

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

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

◆ rounding_mode

Enumerator
RNA 
RNE 
RTP 
RTN 
RTZ 

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

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

Function Documentation

◆ abs()

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

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

Referenced by expr::repeat().

1595  {
1596  Z3_ast r;
1597  if (a.is_int()) {
1598  expr zero = a.ctx().int_val(0);
1599  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, zero), a, -a);
1600  }
1601  else if (a.is_real()) {
1602  expr zero = a.ctx().real_val(0);
1603  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, zero), a, -a);
1604  }
1605  else {
1606  r = Z3_mk_fpa_abs(a.ctx(), a);
1607  }
1608  a.check_error();
1609  return expr(a.ctx(), r);
1610  }
Z3_ast Z3_API Z3_mk_fpa_abs(Z3_context c, Z3_ast t)
Floating-point absolute value.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).

◆ as_array()

expr z3::as_array ( func_decl f)
inline

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

3232  {
3233  Z3_ast r = Z3_mk_as_array(f.ctx(), f);
3234  f.check_error();
3235  return expr(f.ctx(), r);
3236  }
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 1734 of file z3++.h.

Referenced by ashr().

1734 { 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:1646

◆ ashr() [2/3]

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

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

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

◆ ashr() [3/3]

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

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

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

◆ atleast()

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

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

Referenced by expr::is_distinct().

1979  {
1980  assert(es.size() > 0);
1981  context& ctx = es[0].ctx();
1982  array<Z3_ast> _es(es);
1983  Z3_ast r = Z3_mk_atleast(ctx, _es.size(), _es.ptr(), bound);
1984  ctx.check_error();
1985  return expr(ctx, r);
1986  }
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 1971 of file z3++.h.

Referenced by expr::is_distinct().

1971  {
1972  assert(es.size() > 0);
1973  context& ctx = es[0].ctx();
1974  array<Z3_ast> _es(es);
1975  Z3_ast r = Z3_mk_atmost(ctx, _es.size(), _es.ptr(), bound);
1976  ctx.check_error();
1977  return expr(ctx, r);
1978  }
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 2005 of file z3++.h.

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

2005  {
2006  check_context(a, b);
2007  Z3_ast r;
2008  if (Z3_is_seq_sort(a.ctx(), a.get_sort())) {
2009  Z3_ast _args[2] = { a, b };
2010  r = Z3_mk_seq_concat(a.ctx(), 2, _args);
2011  }
2012  else if (Z3_is_re_sort(a.ctx(), a.get_sort())) {
2013  Z3_ast _args[2] = { a, b };
2014  r = Z3_mk_re_concat(a.ctx(), 2, _args);
2015  }
2016  else {
2017  r = Z3_mk_concat(a.ctx(), a, b);
2018  }
2019  a.ctx().check_error();
2020  return expr(a.ctx(), r);
2021  }
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
void check_context(object const &a, object const &b)
Definition: z3++.h:410
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

◆ concat() [2/2]

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

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

2023  {
2024  Z3_ast r;
2025  assert(args.size() > 0);
2026  if (args.size() == 1) {
2027  return args[0];
2028  }
2029  context& ctx = args[0].ctx();
2030  array<Z3_ast> _args(args);
2031  if (Z3_is_seq_sort(ctx, args[0].get_sort())) {
2032  r = Z3_mk_seq_concat(ctx, _args.size(), _args.ptr());
2033  }
2034  else if (Z3_is_re_sort(ctx, args[0].get_sort())) {
2035  r = Z3_mk_re_concat(ctx, _args.size(), _args.ptr());
2036  }
2037  else {
2038  r = _args[args.size()-1];
2039  for (unsigned i = args.size()-1; i > 0; ) {
2040  --i;
2041  r = Z3_mk_concat(ctx, _args[i], r);
2042  ctx.check_error();
2043  }
2044  }
2045  ctx.check_error();
2046  return expr(ctx, r);
2047  }
Z3_ast Z3_API Z3_mk_seq_concat(Z3_context c, unsigned n, Z3_ast const args[])
Concatenate sequences.
Z3_ast Z3_API Z3_mk_concat(Z3_context c, Z3_ast t1, Z3_ast t2)
Concatenate the given bit-vectors.
Z3_ast Z3_API Z3_mk_re_concat(Z3_context c, unsigned n, Z3_ast const args[])
Create the concatenation of the regular languages.
bool Z3_API Z3_is_seq_sort(Z3_context c, Z3_sort s)
Check if s is a sequence sort.
bool Z3_API Z3_is_re_sort(Z3_context c, Z3_sort s)
Check if s is a regular expression sort.

◆ cond()

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

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

2837  {
2838  check_context(p, t1); check_context(p, t2);
2839  Z3_tactic r = Z3_tactic_cond(t1.ctx(), p, t1, t2);
2840  t1.check_error();
2841  return tactic(t1.ctx(), r);
2842  }
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:410

◆ const_array()

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

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

3249  {
3250  MK_EXPR2(Z3_mk_const_array, d, v);
3251  }
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:3243

◆ distinct()

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

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

Referenced by expr::is_distinct().

1996  {
1997  assert(args.size() > 0);
1998  context& ctx = args[0].ctx();
1999  array<Z3_ast> _args(args);
2000  Z3_ast r = Z3_mk_distinct(ctx, _args.size(), _args.ptr());
2001  ctx.check_error();
2002  return expr(ctx, r);
2003  }
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 3305 of file z3++.h.

3305  {
3306  Z3_ast r = Z3_mk_seq_empty(s.ctx(), s);
3307  s.check_error();
3308  return expr(s.ctx(), r);
3309  }
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 3253 of file z3++.h.

3253  {
3255  }
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:3238

◆ eq()

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

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

Referenced by ast::to_string().

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

◆ exists() [1/5]

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

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

1898  {
1899  check_context(x, b);
1900  Z3_app vars[] = {(Z3_app) x};
1901  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1902  }
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:410

◆ exists() [2/5]

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

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

1903  {
1904  check_context(x1, b); check_context(x2, b);
1905  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1906  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1907  }
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:410

◆ exists() [3/5]

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

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

1908  {
1909  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1910  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1911  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1912  }
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:410

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

1913  {
1914  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1915  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1916  Z3_ast r = Z3_mk_exists_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1917  }
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:410

◆ exists() [5/5]

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

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

1918  {
1919  array<Z3_app> vars(xs);
1920  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);
1921  }
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 2826 of file z3++.h.

2826  {
2827  Z3_tactic r = Z3_tactic_fail_if(p.ctx(), p);
2828  p.check_error();
2829  return tactic(p.ctx(), r);
2830  }
Z3_tactic Z3_API Z3_tactic_fail_if(Z3_context c, Z3_probe p)
Return a tactic that fails if the probe p evaluates to false.

◆ fma()

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

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

Referenced by expr::hi().

1620  {
1621  check_context(a, b); check_context(a, c); check_context(a, rm);
1622  assert(a.is_fpa() && b.is_fpa() && c.is_fpa());
1623  Z3_ast r = Z3_mk_fpa_fma(a.ctx(), rm, a, b, c);
1624  a.check_error();
1625  return expr(a.ctx(), r);
1626  }
Z3_ast Z3_API Z3_mk_fpa_fma(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Floating-point fused multiply-add.
void check_context(object const &a, object const &b)
Definition: z3++.h:410

◆ forall() [1/5]

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

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

1874  {
1875  check_context(x, b);
1876  Z3_app vars[] = {(Z3_app) x};
1877  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 1, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1878  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1879 of file z3++.h.

1879  {
1880  check_context(x1, b); check_context(x2, b);
1881  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1882  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 2, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1883  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1884 of file z3++.h.

1884  {
1885  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1886  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1887  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 3, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1888  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1889 of file z3++.h.

1889  {
1890  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1891  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1892  Z3_ast r = Z3_mk_forall_const(b.ctx(), 0, 4, vars, 0, 0, b); b.check_error(); return expr(b.ctx(), r);
1893  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1894 of file z3++.h.

1894  {
1895  array<Z3_app> vars(xs);
1896  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);
1897  }
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 3257 of file z3++.h.

3257  {
3259  }
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:3238

◆ function() [1/9]

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

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

3154  {
3155  return range.ctx().function(name, arity, domain, range);
3156  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

◆ function() [2/9]

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

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

3157  {
3158  return range.ctx().function(name, arity, domain, range);
3159  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

◆ function() [3/9]

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

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

3160  {
3161  return range.ctx().function(name, domain, range);
3162  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

◆ function() [4/9]

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

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

3163  {
3164  return range.ctx().function(name, d1, d2, range);
3165  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

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

3166  {
3167  return range.ctx().function(name, d1, d2, d3, range);
3168  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

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

3169  {
3170  return range.ctx().function(name, d1, d2, d3, d4, range);
3171  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

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

3172  {
3173  return range.ctx().function(name, d1, d2, d3, d4, d5, range);
3174  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

◆ function() [8/9]

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

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

3175  {
3176  return range.ctx().function(name, domain, range);
3177  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

◆ function() [9/9]

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

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

3178  {
3179  return range.ctx().function(name.c_str(), domain, range);
3180  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl function(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2918

◆ implies() [1/3]

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

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

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

1250  {
1251  assert(a.is_bool() && b.is_bool());
1252  _Z3_MK_BIN_(a, b, Z3_mk_implies);
1253  }
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:1243

◆ implies() [2/3]

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

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

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

◆ implies() [3/3]

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

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

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

◆ in_re()

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

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

3337  {
3338  MK_EXPR2(Z3_mk_seq_in_re, s, re);
3339  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3243
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 3322 of file z3++.h.

3322  {
3323  check_context(s, substr); check_context(s, offset);
3324  Z3_ast r = Z3_mk_seq_index(s.ctx(), s, substr, offset);
3325  s.check_error();
3326  return expr(s.ctx(), r);
3327  }
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:410

◆ is_int()

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

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

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

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

Referenced by expr::body().

1633  {
1634  check_context(c, t); check_context(c, e);
1635  assert(c.is_bool());
1636  Z3_ast r = Z3_mk_ite(c.ctx(), c, t, e);
1637  c.check_error();
1638  return expr(c.ctx(), r);
1639  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).

◆ lambda() [1/5]

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

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

1922  {
1923  check_context(x, b);
1924  Z3_app vars[] = {(Z3_app) x};
1925  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 1, vars, b); b.check_error(); return expr(b.ctx(), r);
1926  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:410

◆ lambda() [2/5]

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

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

1927  {
1928  check_context(x1, b); check_context(x2, b);
1929  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2};
1930  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 2, vars, b); b.check_error(); return expr(b.ctx(), r);
1931  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:410

◆ lambda() [3/5]

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

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

1932  {
1933  check_context(x1, b); check_context(x2, b); check_context(x3, b);
1934  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3 };
1935  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 3, vars, b); b.check_error(); return expr(b.ctx(), r);
1936  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:410

◆ lambda() [4/5]

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

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

1937  {
1938  check_context(x1, b); check_context(x2, b); check_context(x3, b); check_context(x4, b);
1939  Z3_app vars[] = {(Z3_app) x1, (Z3_app) x2, (Z3_app) x3, (Z3_app) x4 };
1940  Z3_ast r = Z3_mk_lambda_const(b.ctx(), 4, vars, b); b.check_error(); return expr(b.ctx(), r);
1941  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.
void check_context(object const &a, object const &b)
Definition: z3++.h:410

◆ lambda() [5/5]

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

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

1942  {
1943  array<Z3_app> vars(xs);
1944  Z3_ast r = Z3_mk_lambda_const(b.ctx(), vars.size(), vars.ptr(), b); b.check_error(); return expr(b.ctx(), r);
1945  }
Z3_ast Z3_API Z3_mk_lambda_const(Z3_context c, unsigned num_bound, Z3_app const bound[], Z3_ast body)
Create a lambda expression using a list of constants that form the set of bound variables.

◆ last_indexof()

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

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

3328  {
3329  check_context(s, substr);
3330  Z3_ast r = Z3_mk_seq_last_index(s.ctx(), s, substr);
3331  s.check_error();
3332  return expr(s.ctx(), r);
3333  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_seq_last_index(Z3_context c, Z3_ast, Z3_ast substr)
Return the last occurrence of substr in s. If s does not contain substr, then the value is -1...

◆ linear_order()

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

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

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

◆ lshr() [1/3]

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

logic shift right operator for bitvectors

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

Referenced by lshr().

1727 { 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:1646

◆ lshr() [2/3]

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

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

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

◆ lshr() [3/3]

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

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

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

◆ max()

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

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

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

1580  {
1581  check_context(a, b);
1582  Z3_ast r;
1583  if (a.is_arith()) {
1584  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), a, b);
1585  }
1586  else if (a.is_bv()) {
1587  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), a, b);
1588  }
1589  else {
1590  assert(a.is_fpa());
1591  r = Z3_mk_fpa_max(a.ctx(), a, b);
1592  }
1593  return expr(a.ctx(), r);
1594  }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
Z3_ast Z3_API Z3_mk_fpa_max(Z3_context c, Z3_ast t1, Z3_ast t2)
Maximum of floating-point numbers.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).

◆ min()

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

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

Referenced by expr::is_distinct().

1565  {
1566  check_context(a, b);
1567  Z3_ast r;
1568  if (a.is_arith()) {
1569  r = Z3_mk_ite(a.ctx(), Z3_mk_ge(a.ctx(), a, b), b, a);
1570  }
1571  else if (a.is_bv()) {
1572  r = Z3_mk_ite(a.ctx(), Z3_mk_bvuge(a.ctx(), a, b), b, a);
1573  }
1574  else {
1575  assert(a.is_fpa());
1576  r = Z3_mk_fpa_min(a.ctx(), a, b);
1577  }
1578  return expr(a.ctx(), r);
1579  }
Z3_ast Z3_API Z3_mk_bvuge(Z3_context c, Z3_ast t1, Z3_ast t2)
Unsigned greater than or equal to.
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2)
Create greater than or equal to.
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_ite(Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3)
Create an AST node representing an if-then-else: ite(t1, t2, t3).
Z3_ast Z3_API Z3_mk_fpa_min(Z3_context c, Z3_ast t1, Z3_ast t2)
Minimum of floating-point numbers.

◆ mk_and()

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

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

Referenced by expr::body().

2055  {
2056  array<Z3_ast> _args(args);
2057  Z3_ast r = Z3_mk_and(args.ctx(), _args.size(), _args.ptr());
2058  args.check_error();
2059  return expr(args.ctx(), r);
2060  }
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 2049 of file z3++.h.

Referenced by expr::body().

2049  {
2050  array<Z3_ast> _args(args);
2051  Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());
2052  args.check_error();
2053  return expr(args.ctx(), r);
2054  }
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 1262 of file z3++.h.

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

1262  {
1263  if (a.is_bv()) {
1264  _Z3_MK_BIN_(a, b, Z3_mk_bvsmod);
1265  }
1266  else {
1267  _Z3_MK_BIN_(a, b, Z3_mk_mod);
1268  }
1269  }
Z3_ast Z3_API Z3_mk_mod(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 mod arg2.
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed remainder (sign follows divisor).
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1243

◆ mod() [2/3]

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

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

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

◆ mod() [3/3]

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

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

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

◆ nand()

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

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

Referenced by expr::is_distinct().

1562 { 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:410

◆ nor()

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

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

Referenced by expr::is_distinct().

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

◆ operator &() [1/4]

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

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

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

1550 { 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:410
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 1551 of file z3++.h.

1551 { 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 1552 of file z3++.h.

1552 { 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 2571 of file z3++.h.

2571  {
2572  check_context(t1, t2);
2573  Z3_tactic r = Z3_tactic_and_then(t1.ctx(), t1, t2);
2574  t1.check_error();
2575  return tactic(t1.ctx(), r);
2576  }
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:410

◆ operator &&() [1/4]

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

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

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

1302  {
1303  check_context(a, b);
1304  assert(a.is_bool() && b.is_bool());
1305  Z3_ast args[2] = { a, b };
1306  Z3_ast r = Z3_mk_and(a.ctx(), 2, args);
1307  a.check_error();
1308  return expr(a.ctx(), r);
1309  }
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:410

◆ operator &&() [2/4]

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

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

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

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

◆ operator &&() [4/4]

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

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

2684  {
2685  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2686  }
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:410

◆ operator!() [1/2]

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

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

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

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

2690  {
2691  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
2692  }
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 1336 of file z3++.h.

Referenced by expr::is_distinct().

1336  {
1337  check_context(a, b);
1338  Z3_ast args[2] = { a, b };
1339  Z3_ast r = Z3_mk_distinct(a.ctx(), 2, args);
1340  a.check_error();
1341  return expr(a.ctx(), r);
1342  }
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:410

◆ operator!=() [2/3]

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

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

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

◆ operator!=() [3/3]

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

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

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

◆ operator%() [1/3]

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

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

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

◆ operator%() [2/3]

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

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

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

◆ operator%() [3/3]

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

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

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

◆ operator*() [1/3]

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

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

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

1376  {
1377  check_context(a, b);
1378  Z3_ast r = 0;
1379  if (a.is_arith() && b.is_arith()) {
1380  Z3_ast args[2] = { a, b };
1381  r = Z3_mk_mul(a.ctx(), 2, args);
1382  }
1383  else if (a.is_bv() && b.is_bv()) {
1384  r = Z3_mk_bvmul(a.ctx(), a, b);
1385  }
1386  else if (a.is_fpa() && b.is_fpa()) {
1387  r = Z3_mk_fpa_mul(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1388  }
1389  else {
1390  // operator is not supported by given arguments.
1391  assert(false);
1392  }
1393  a.check_error();
1394  return expr(a.ctx(), r);
1395  }
Z3_ast Z3_API Z3_mk_mul(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] * ... * args[num_args-1].
Z3_ast Z3_API Z3_mk_fpa_mul(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point multiplication.
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1396 of file z3++.h.

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

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

Referenced by expr::is_distinct().

1346  {
1347  check_context(a, b);
1348  Z3_ast r = 0;
1349  if (a.is_arith() && b.is_arith()) {
1350  Z3_ast args[2] = { a, b };
1351  r = Z3_mk_add(a.ctx(), 2, args);
1352  }
1353  else if (a.is_bv() && b.is_bv()) {
1354  r = Z3_mk_bvadd(a.ctx(), a, b);
1355  }
1356  else if (a.is_seq() && b.is_seq()) {
1357  return concat(a, b);
1358  }
1359  else if (a.is_re() && b.is_re()) {
1360  Z3_ast _args[2] = { a, b };
1361  r = Z3_mk_re_union(a.ctx(), 2, _args);
1362  }
1363  else if (a.is_fpa() && b.is_fpa()) {
1364  r = Z3_mk_fpa_add(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1365  }
1366  else {
1367  // operator is not supported by given arguments.
1368  assert(false);
1369  }
1370  a.check_error();
1371  return expr(a.ctx(), r);
1372  }
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].
Z3_ast Z3_API Z3_mk_fpa_add(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point addition.
expr concat(expr_vector const &args)
Definition: z3++.h:2023
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1373 of file z3++.h.

1373 { 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 1374 of file z3++.h.

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

◆ operator-() [1/4]

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

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

Referenced by expr::is_distinct().

1439  {
1440  Z3_ast r = 0;
1441  if (a.is_arith()) {
1442  r = Z3_mk_unary_minus(a.ctx(), a);
1443  }
1444  else if (a.is_bv()) {
1445  r = Z3_mk_bvneg(a.ctx(), a);
1446  }
1447  else if (a.is_fpa()) {
1448  r = Z3_mk_fpa_neg(a.ctx(), a);
1449  }
1450  else {
1451  // operator is not supported by given arguments.
1452  assert(false);
1453  }
1454  a.check_error();
1455  return expr(a.ctx(), r);
1456  }
Z3_ast Z3_API Z3_mk_unary_minus(Z3_context c, Z3_ast arg)
Create an AST node representing - arg.
Z3_ast Z3_API Z3_mk_fpa_neg(Z3_context c, Z3_ast t)
Floating-point negation.
Z3_ast Z3_API Z3_mk_bvneg(Z3_context c, Z3_ast t1)
Standard two&#39;s complement unary minus.

◆ operator-() [2/4]

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

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

1458  {
1459  check_context(a, b);
1460  Z3_ast r = 0;
1461  if (a.is_arith() && b.is_arith()) {
1462  Z3_ast args[2] = { a, b };
1463  r = Z3_mk_sub(a.ctx(), 2, args);
1464  }
1465  else if (a.is_bv() && b.is_bv()) {
1466  r = Z3_mk_bvsub(a.ctx(), a, b);
1467  }
1468  else if (a.is_fpa() && b.is_fpa()) {
1469  r = Z3_mk_fpa_sub(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1470  }
1471  else {
1472  // operator is not supported by given arguments.
1473  assert(false);
1474  }
1475  a.check_error();
1476  return expr(a.ctx(), r);
1477  }
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:410
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two&#39;s complement subtraction.
Z3_ast Z3_API Z3_mk_fpa_sub(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point subtraction.

◆ operator-() [3/4]

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

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

1478 { 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 1479 of file z3++.h.

1479 { 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 1417 of file z3++.h.

Referenced by expr::is_distinct().

1417  {
1418  check_context(a, b);
1419  Z3_ast r = 0;
1420  if (a.is_arith() && b.is_arith()) {
1421  r = Z3_mk_div(a.ctx(), a, b);
1422  }
1423  else if (a.is_bv() && b.is_bv()) {
1424  r = Z3_mk_bvsdiv(a.ctx(), a, b);
1425  }
1426  else if (a.is_fpa() && b.is_fpa()) {
1427  r = Z3_mk_fpa_div(a.ctx(), a.ctx().fpa_rounding_mode(), a, b);
1428  }
1429  else {
1430  // operator is not supported by given arguments.
1431  assert(false);
1432  }
1433  a.check_error();
1434  return expr(a.ctx(), r);
1435  }
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two&#39;s complement signed division.
Z3_ast Z3_API Z3_mk_div(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 div arg2.
Z3_ast Z3_API Z3_mk_fpa_div(Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2)
Floating-point division.
void check_context(object const &a, object const &b)
Definition: z3++.h:410

◆ operator/() [2/3]

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

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

1436 { 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 1437 of file z3++.h.

1437 { 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 1506 of file z3++.h.

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

1506  {
1507  check_context(a, b);
1508  Z3_ast r = 0;
1509  if (a.is_arith() && b.is_arith()) {
1510  r = Z3_mk_lt(a.ctx(), a, b);
1511  }
1512  else if (a.is_bv() && b.is_bv()) {
1513  r = Z3_mk_bvslt(a.ctx(), a, b);
1514  }
1515  else if (a.is_fpa() && b.is_fpa()) {
1516  r = Z3_mk_fpa_lt(a.ctx(), a, b);
1517  }
1518  else {
1519  // operator is not supported by given arguments.
1520  assert(false);
1521  }
1522  a.check_error();
1523  return expr(a.ctx(), r);
1524  }
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:410
Z3_ast Z3_API Z3_mk_fpa_lt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than.

◆ operator<() [2/6]

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

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

1525 { 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 1526 of file z3++.h.

1526 { 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 2669 of file z3++.h.

2669  {
2670  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2671  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 2672 of file z3++.h.

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

◆ operator<() [6/6]

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

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

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

◆ operator<<() [1/13]

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

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

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

◆ operator<<() [2/13]

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

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

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

◆ operator<<() [3/13]

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

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

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

◆ operator<<() [4/13]

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

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

480  {
481  out << Z3_params_to_string(p.ctx(), p); return out;
482  }
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 506 of file z3++.h.

506  {
507  out << Z3_ast_to_string(n.ctx(), n.m_ast); return out;
508  }
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 2195 of file z3++.h.

2195 { 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 2224 of file z3++.h.

2224 { 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 2227 of file z3++.h.

2227  {
2228  if (r == unsat) out << "unsat";
2229  else if (r == sat) out << "sat";
2230  else out << "unknown";
2231  return out;
2232  }
Definition: z3++.h:130

◆ operator<<() [9/13]

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

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

2446 { 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 2505 of file z3++.h.

2505 { 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 2529 of file z3++.h.

2529 { 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 2782 of file z3++.h.

2782 { 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 2824 of file z3++.h.

2824 { 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 1481 of file z3++.h.

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

1481  {
1482  check_context(a, b);
1483  Z3_ast r = 0;
1484  if (a.is_arith() && b.is_arith()) {
1485  r = Z3_mk_le(a.ctx(), a, b);
1486  }
1487  else if (a.is_bv() && b.is_bv()) {
1488  r = Z3_mk_bvsle(a.ctx(), a, b);
1489  }
1490  else if (a.is_fpa() && b.is_fpa()) {
1491  r = Z3_mk_fpa_leq(a.ctx(), a, b);
1492  }
1493  else {
1494  // operator is not supported by given arguments.
1495  assert(false);
1496  }
1497  a.check_error();
1498  return expr(a.ctx(), r);
1499  }
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:410
Z3_ast Z3_API Z3_mk_fpa_leq(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point less than or equal.

◆ operator<=() [2/6]

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

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

1500 { 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 1501 of file z3++.h.

1501 { 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 2659 of file z3++.h.

2659  {
2660  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2661  }
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:410

◆ operator<=() [5/6]

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

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

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

◆ operator<=() [6/6]

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

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

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

◆ operator==() [1/6]

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

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

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

1327  {
1328  check_context(a, b);
1329  Z3_ast r = Z3_mk_eq(a.ctx(), a, b);
1330  a.check_error();
1331  return expr(a.ctx(), r);
1332  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1333 of file z3++.h.

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

◆ operator==() [3/6]

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

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

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

◆ operator==() [4/6]

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

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

2679  {
2680  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2681  }
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:410

◆ operator==() [5/6]

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

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

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

◆ operator==() [6/6]

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

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

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

◆ operator>() [1/6]

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

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

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

1528  {
1529  check_context(a, b);
1530  Z3_ast r = 0;
1531  if (a.is_arith() && b.is_arith()) {
1532  r = Z3_mk_gt(a.ctx(), a, b);
1533  }
1534  else if (a.is_bv() && b.is_bv()) {
1535  r = Z3_mk_bvsgt(a.ctx(), a, b);
1536  }
1537  else if (a.is_fpa() && b.is_fpa()) {
1538  r = Z3_mk_fpa_gt(a.ctx(), a, b);
1539  }
1540  else {
1541  // operator is not supported by given arguments.
1542  assert(false);
1543  }
1544  a.check_error();
1545  return expr(a.ctx(), r);
1546  }
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:410
Z3_ast Z3_API Z3_mk_fpa_gt(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point greater than.

◆ operator>() [2/6]

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

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

1547 { 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 1548 of file z3++.h.

1548 { 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 2674 of file z3++.h.

2674  {
2675  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2676  }
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:410

◆ operator>() [5/6]

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

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

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

◆ operator>() [6/6]

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

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

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

◆ operator>=() [1/6]

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

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

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

1400  {
1401  check_context(a, b);
1402  Z3_ast r = 0;
1403  if (a.is_arith() && b.is_arith()) {
1404  r = Z3_mk_ge(a.ctx(), a, b);
1405  }
1406  else if (a.is_bv() && b.is_bv()) {
1407  r = Z3_mk_bvsge(a.ctx(), a, b);
1408  }
1409  else {
1410  // operator is not supported by given arguments.
1411  assert(false);
1412  }
1413  a.check_error();
1414  return expr(a.ctx(), r);
1415  }
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:410

◆ operator>=() [2/6]

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

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

1503 { 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 1504 of file z3++.h.

1504 { 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 2664 of file z3++.h.

2664  {
2665  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2666  }
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:410

◆ operator>=() [5/6]

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

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

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

◆ operator>=() [6/6]

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

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

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

◆ operator^() [1/3]

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

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

Referenced by expr::is_distinct().

1554 { 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:410
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 1555 of file z3++.h.

1555 { 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 1556 of file z3++.h.

1556 { 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 1558 of file z3++.h.

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

1558 { 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:410

◆ operator|() [2/4]

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

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

1559 { 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 1560 of file z3++.h.

1560 { 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 2578 of file z3++.h.

2578  {
2579  check_context(t1, t2);
2580  Z3_tactic r = Z3_tactic_or_else(t1.ctx(), t1, t2);
2581  t1.check_error();
2582  return tactic(t1.ctx(), r);
2583  }
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:410

◆ operator||() [1/4]

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

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

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

1314  {
1315  check_context(a, b);
1316  assert(a.is_bool() && b.is_bool());
1317  Z3_ast args[2] = { a, b };
1318  Z3_ast r = Z3_mk_or(a.ctx(), 2, args);
1319  a.check_error();
1320  return expr(a.ctx(), r);
1321  }
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:410

◆ operator||() [2/4]

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

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

1323 { 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 1325 of file z3++.h.

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

◆ operator||() [4/4]

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

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

2687  {
2688  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2689  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
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 1618 of file z3++.h.

Referenced by expr::repeat().

1618 { 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 3343 of file z3++.h.

3343  {
3345  }
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:3238

◆ par_and_then()

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

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

Referenced by tactic::help().

2610  {
2611  check_context(t1, t2);
2612  Z3_tactic r = Z3_tactic_par_and_then(t1.ctx(), t1, t2);
2613  t1.check_error();
2614  return tactic(t1.ctx(), r);
2615  }
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:410

◆ par_or()

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

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

Referenced by tactic::help().

2601  {
2602  if (n == 0) {
2603  Z3_THROW(exception("a non-zero number of tactics need to be passed to par_or"));
2604  }
2605  array<Z3_tactic> buffer(n);
2606  for (unsigned i = 0; i < n; ++i) buffer[i] = tactics[i];
2607  return tactic(tactics[0].ctx(), Z3_tactic_par_or(tactics[0].ctx(), n, buffer.ptr()));
2608  }
#define Z3_THROW(x)
Definition: z3++.h:96
def tactics(ctx=None)
Definition: z3py.py:7885
Z3_tactic Z3_API Z3_tactic_par_or(Z3_context c, unsigned num, Z3_tactic const ts[])
Return a tactic that applies the given tactics in parallel.

◆ partial_order()

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

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

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

◆ pbeq()

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

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

Referenced by expr::is_distinct().

1963  {
1964  assert(es.size() > 0);
1965  context& ctx = es[0].ctx();
1966  array<Z3_ast> _es(es);
1967  Z3_ast r = Z3_mk_pbeq(ctx, _es.size(), _es.ptr(), coeffs, bound);
1968  ctx.check_error();
1969  return expr(ctx, r);
1970  }
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 1955 of file z3++.h.

Referenced by expr::is_distinct().

1955  {
1956  assert(es.size() > 0);
1957  context& ctx = es[0].ctx();
1958  array<Z3_ast> _es(es);
1959  Z3_ast r = Z3_mk_pbge(ctx, _es.size(), _es.ptr(), coeffs, bound);
1960  ctx.check_error();
1961  return expr(ctx, r);
1962  }
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 1947 of file z3++.h.

Referenced by expr::is_distinct().

1947  {
1948  assert(es.size() > 0);
1949  context& ctx = es[0].ctx();
1950  array<Z3_ast> _es(es);
1951  Z3_ast r = Z3_mk_pble(ctx, _es.size(), _es.ptr(), coeffs, bound);
1952  ctx.check_error();
1953  return expr(ctx, r);
1954  }
Z3_ast Z3_API Z3_mk_pble(Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k)
Pseudo-Boolean relations.

◆ piecewise_linear_order()

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

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

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

◆ plus()

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

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

3340  {
3341  MK_EXPR1(Z3_mk_re_plus, re);
3342  }
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:3238

◆ prefixof()

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

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

3316  {
3317  check_context(a, b);
3318  Z3_ast r = Z3_mk_seq_prefix(a.ctx(), a, b);
3319  a.check_error();
3320  return expr(a.ctx(), r);
3321  }
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:410

◆ pw() [1/3]

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

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

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

1258 { _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:1243

◆ pw() [2/3]

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

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

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

◆ pw() [3/3]

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

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

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

◆ range()

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

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

Referenced by z3py::AndThen(), ApplyResult::as_expr(), z3py::AtLeast(), Optimize::check(), ExprRef::children(), z3py::describe_probes(), z3py::eq(), context::function(), z3py::Function(), function(), FuncDecl.Parameter::getParameterKind(), ArraySort::getRange(), context::interrupt(), expr::itos(), Context::MkUpdateField(), z3py::OrElse(), z3py::ParOr(), z3py::probes(), z3py::RealVarVector(), z3py::RecAddDefinition(), context::recfun(), z3py::RecFunction(), AstVector::resize(), Fixedpoint::set_predicate_representation(), z3py::substitute(), z3py::substitute_vars(), z3py::tactics(), and Solver::to_smt2().

3370  {
3371  check_context(lo, hi);
3372  Z3_ast r = Z3_mk_re_range(lo.ctx(), lo, hi);
3373  lo.check_error();
3374  return expr(lo.ctx(), r);
3375  }
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:410

◆ re_complement()

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

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

3367  {
3369  }
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:3238

◆ re_empty()

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

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

3349  {
3350  Z3_ast r = Z3_mk_re_empty(s.ctx(), s);
3351  s.check_error();
3352  return expr(s.ctx(), r);
3353  }
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 3354 of file z3++.h.

3354  {
3355  Z3_ast r = Z3_mk_re_full(s.ctx(), s);
3356  s.check_error();
3357  return expr(s.ctx(), r);
3358  }
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 3359 of file z3++.h.

3359  {
3360  assert(args.size() > 0);
3361  context& ctx = args[0].ctx();
3362  array<Z3_ast> _args(args);
3363  Z3_ast r = Z3_mk_re_intersect(ctx, _args.size(), _args.ptr());
3364  ctx.check_error();
3365  return expr(ctx, r);
3366  }
Z3_ast Z3_API Z3_mk_re_intersect(Z3_context c, unsigned n, Z3_ast const args[])
Create the intersection of the regular languages.

◆ recfun() [1/4]

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

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

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

3182  {
3183  return range.ctx().recfun(name, arity, domain, range);
3184  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2989

◆ recfun() [2/4]

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

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

3185  {
3186  return range.ctx().recfun(name, arity, domain, range);
3187  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2989

◆ recfun() [3/4]

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

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

3188  {
3189  return range.ctx().recfun(name, d1, range);
3190  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2989

◆ recfun() [4/4]

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

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

3191  {
3192  return range.ctx().recfun(name, d1, d2, range);
3193  }
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3370
context & ctx() const
Definition: z3++.h:406
func_decl recfun(symbol const &name, unsigned arity, sort const *domain, sort const &range)
Definition: z3++.h:2989

◆ rem() [1/3]

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

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

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

1278  {
1279  if (a.is_fpa() && b.is_fpa()) {
1280  _Z3_MK_BIN_(a, b, Z3_mk_fpa_rem);
1281  } else {
1282  _Z3_MK_BIN_(a, b, Z3_mk_rem);
1283  }
1284  }
Z3_ast Z3_API Z3_mk_fpa_rem(Z3_context c, Z3_ast t1, Z3_ast t2)
Floating-point remainder.
Z3_ast Z3_API Z3_mk_rem(Z3_context c, Z3_ast arg1, Z3_ast arg2)
Create an AST node representing arg1 rem arg2.
#define _Z3_MK_BIN_(a, b, binop)
Definition: z3++.h:1243

◆ rem() [2/3]

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

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

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

◆ rem() [3/3]

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

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

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

◆ repeat()

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

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

Referenced by tactic::help().

2585  {
2586  Z3_tactic r = Z3_tactic_repeat(t.ctx(), t, max);
2587  t.check_error();
2588  return tactic(t.ctx(), r);
2589  }
Z3_tactic Z3_API Z3_tactic_repeat(Z3_context c, Z3_tactic t, unsigned max)
Return a tactic that keeps applying t until the goal is not modified anymore or the maximum number of...
expr max(expr const &a, expr const &b)
Definition: z3++.h:1580

◆ reset_params()

void z3::reset_params ( )
inline

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

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

◆ select() [1/3]

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

forward declarations

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

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

3195  {
3196  check_context(a, i);
3197  Z3_ast r = Z3_mk_select(a.ctx(), a, i);
3198  a.check_error();
3199  return expr(a.ctx(), r);
3200  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i)
Array read. The argument a is the array and i is the index of the array that gets read...

◆ select() [2/3]

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

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

3204  {
3205  check_context(a, i);
3206  array<Z3_ast> idxs(i);
3207  Z3_ast r = Z3_mk_select_n(a.ctx(), a, idxs.size(), idxs.ptr());
3208  a.check_error();
3209  return expr(a.ctx(), r);
3210  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_select_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const *idxs)
n-ary Array read. The argument a is the array and idxs are the indices of the array that gets read...

◆ select() [3/3]

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

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

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

◆ set_add()

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

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

3261  {
3262  MK_EXPR2(Z3_mk_set_add, s, e);
3263  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3243
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 3289 of file z3++.h.

3289  {
3291  }
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:3238

◆ set_del()

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

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

3265  {
3266  MK_EXPR2(Z3_mk_set_del, s, e);
3267  }
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:3243

◆ set_difference()

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

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

3285  {
3287  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3243
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 3277 of file z3++.h.

3277  {
3278  check_context(a, b);
3279  Z3_ast es[2] = { a, b };
3280  Z3_ast r = Z3_mk_set_intersect(a.ctx(), 2, es);
3281  a.check_error();
3282  return expr(a.ctx(), r);
3283  }
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:410

◆ set_member()

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

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

3293  {
3294  MK_EXPR2(Z3_mk_set_member, s, e);
3295  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3243
Z3_ast Z3_API Z3_mk_set_member(Z3_context c, Z3_ast elem, Z3_ast set)
Check for set membership.

◆ set_param() [1/3]

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

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

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

◆ set_param() [2/3]

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

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

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

◆ set_param() [3/3]

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

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

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

◆ set_subset()

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

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

3297  {
3298  MK_EXPR2(Z3_mk_set_subset, a, b);
3299  }
#define MK_EXPR2(_fn, _arg1, _arg2)
Definition: z3++.h:3243
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 3269 of file z3++.h.

3269  {
3270  check_context(a, b);
3271  Z3_ast es[2] = { a, b };
3272  Z3_ast r = Z3_mk_set_union(a.ctx(), 2, es);
3273  a.check_error();
3274  return expr(a.ctx(), r);
3275  }
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:410

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

1746 { 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:1646

◆ shl() [1/3]

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

shift left operator for bitvectors

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

Referenced by shl().

1720 { 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:1646

◆ shl() [2/3]

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

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

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

◆ shl() [3/3]

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

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

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

◆ smod() [1/3]

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

signed modulus operator for bitvectors

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

Referenced by smod().

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

◆ smod() [2/3]

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

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

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

◆ smod() [3/3]

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

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

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

◆ sqrt()

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

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

Referenced by expr::repeat().

1611  {
1612  check_context(a, rm);
1613  assert(a.is_fpa());
1614  Z3_ast r = Z3_mk_fpa_sqrt(a.ctx(), rm, a);
1615  a.check_error();
1616  return expr(a.ctx(), r);
1617  }
void check_context(object const &a, object const &b)
Definition: z3++.h:410
Z3_ast Z3_API Z3_mk_fpa_sqrt(Z3_context c, Z3_ast rm, Z3_ast t)
Floating-point square root.

◆ srem() [1/3]

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

signed remainder operator for bitvectors

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

Referenced by srem().

1699 { 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:1646

◆ srem() [2/3]

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

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

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

◆ srem() [3/3]

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

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

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

◆ star()

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

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

3346  {
3347  MK_EXPR1(Z3_mk_re_star, re);
3348  }
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:3238

◆ store() [1/5]

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

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

Referenced by store().

3212  {
3213  check_context(a, i); check_context(a, v);
3214  Z3_ast r = Z3_mk_store(a.ctx(), a, i, v);
3215  a.check_error();
3216  return expr(a.ctx(), r);
3217  }
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:410

◆ store() [2/5]

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

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

3219 { 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:3224

◆ store() [3/5]

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

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

3220 { 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:3224

◆ store() [4/5]

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

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

3221  {
3222  return store(a, a.ctx().num_val(i, a.get_sort().array_domain()), a.ctx().num_val(v, a.get_sort().array_range()));
3223  }
expr store(expr const &a, expr_vector const &i, expr const &v)
Definition: z3++.h:3224

◆ store() [5/5]

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

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

3224  {
3225  check_context(a, i); check_context(a, v);
3226  array<Z3_ast> idxs(i);
3227  Z3_ast r = Z3_mk_store_n(a.ctx(), a, idxs.size(), idxs.ptr(), v);
3228  a.check_error();
3229  return expr(a.ctx(), r);
3230  }
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:410

◆ suffixof()

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

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

3310  {
3311  check_context(a, b);
3312  Z3_ast r = Z3_mk_seq_suffix(a.ctx(), a, b);
3313  a.check_error();
3314  return expr(a.ctx(), r);
3315  }
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:410

◆ sum()

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

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

Referenced by expr::is_distinct().

1987  {
1988  assert(args.size() > 0);
1989  context& ctx = args[0].ctx();
1990  array<Z3_ast> _args(args);
1991  Z3_ast r = Z3_mk_add(ctx, _args.size(), _args.ptr());
1992  ctx.check_error();
1993  return expr(ctx, r);
1994  }
Z3_ast Z3_API Z3_mk_add(Z3_context c, unsigned num_args, Z3_ast const args[])
Create an AST node representing args[0] + ... + args[num_args-1].

◆ to_check_result()

check_result z3::to_check_result ( Z3_lbool  l)
inline

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

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

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

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

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

1646  {
1647  c.check_error();
1648  assert(Z3_get_ast_kind(c, a) == Z3_APP_AST ||
1649  Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST ||
1650  Z3_get_ast_kind(c, a) == Z3_VAR_AST ||
1652  return expr(c, a);
1653  }
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 1660 of file z3++.h.

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

1660  {
1661  c.check_error();
1662  return func_decl(c, f);
1663  }

◆ to_re()

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

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

3334  {
3336  }
#define MK_EXPR1(_fn, _arg)
Definition: z3++.h:3238
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 3152 of file z3++.h.

3152 { 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 1655 of file z3++.h.

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

1655  {
1656  c.check_error();
1657  return sort(c, s);
1658  }

◆ tree_order()

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

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

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

◆ try_for()

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

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

Referenced by tactic::help().

2596  {
2597  Z3_tactic r = Z3_tactic_try_for(t.ctx(), t, ms);
2598  t.check_error();
2599  return tactic(t.ctx(), r);
2600  }
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 1692 of file z3++.h.

Referenced by udiv().

1692 { 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:1646

◆ udiv() [2/3]

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

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

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

◆ udiv() [3/3]

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

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

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

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

Referenced by uge().

1680 { 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:1646

◆ uge() [2/3]

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

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

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

◆ uge() [3/3]

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

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

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

◆ ugt() [1/3]

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

unsigned greater than operator for bitvectors.

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

Referenced by ugt().

1686 { 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:1646

◆ ugt() [2/3]

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

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

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

◆ ugt() [3/3]

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

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

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

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

Referenced by ule().

1668 { 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:1646

◆ ule() [2/3]

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

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

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

◆ ule() [3/3]

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

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

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

◆ ult() [1/3]

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

unsigned less than operator for bitvectors.

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

Referenced by ult().

1674 { 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:1646

◆ ult() [2/3]

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

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

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

◆ ult() [3/3]

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

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

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

◆ urem() [1/3]

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

unsigned reminder operator for bitvectors

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

Referenced by urem().

1713 { 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:1646

◆ urem() [2/3]

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

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

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

◆ urem() [3/3]

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

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

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

◆ when()

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

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

2831  {
2832  check_context(p, t);
2833  Z3_tactic r = Z3_tactic_when(t.ctx(), p, t);
2834  t.check_error();
2835  return tactic(t.ctx(), r);
2836  }
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:410

◆ with()

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

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

Referenced by tactic::help().

2591  {
2592  Z3_tactic r = Z3_tactic_using_params(t.ctx(), t, p);
2593  t.check_error();
2594  return tactic(t.ctx(), r);
2595  }
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 1564 of file z3++.h.

Referenced by expr::is_distinct().

1564 { 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:410

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

1741 { 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:1646
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...