Z3
Public Member Functions
context Class Reference

A Context manages all other Z3 objects, global configuration options, etc. More...

Public Member Functions

 context ()
 
 context (config &c)
 
 ~context ()
 
 operator Z3_context () const
 
void check_error () const
 Auxiliary method used to check for API usage errors. More...
 
void set (char const *param, char const *value)
 Update global parameter param with string value. More...
 
void set (char const *param, bool value)
 Update global parameter param with Boolean value. More...
 
void set (char const *param, int value)
 Update global parameter param with Integer value. More...
 
void interrupt ()
 Interrupt the current procedure being executed by any object managed by this context. This is a soft interruption: there is no guarantee the object will actualy stop. More...
 
symbol str_symbol (char const *s)
 Create a Z3 symbol based on the given string. More...
 
symbol int_symbol (int n)
 Create a Z3 symbol based on the given integer. More...
 
sort bool_sort ()
 Return the Boolean sort. More...
 
sort int_sort ()
 Return the integer sort. More...
 
sort real_sort ()
 Return the Real sort. More...
 
sort bv_sort (unsigned sz)
 Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz. More...
 
sort array_sort (sort d, sort r)
 Return an array sort for arrays from d to r. More...
 
sort enumeration_sort (char const *name, unsigned n, char const *const *enum_names, func_decl_vector &cs, func_decl_vector &ts)
 Return an enumeration sort: enum_names[0], ..., enum_names[n-1]. cs and ts are output parameters. The method stores in cs the constants corresponding to the enumerated elements, and in ts the predicates for testing if terms of the enumeration sort correspond to an enumeration. More...
 
sort uninterpreted_sort (char const *name)
 create an uninterpreted sort with the name given by the string or symbol. More...
 
sort uninterpreted_sort (symbol const &name)
 
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 (symbol const &name, sort_vector const &domain, sort const &range)
 
func_decl function (char const *name, sort_vector 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)
 
expr constant (symbol const &name, sort const &s)
 
expr constant (char const *name, sort const &s)
 
expr bool_const (char const *name)
 
expr int_const (char const *name)
 
expr real_const (char const *name)
 
expr bv_const (char const *name, unsigned sz)
 
expr bool_val (bool b)
 
expr int_val (int n)
 
expr int_val (unsigned n)
 
expr int_val (__int64 n)
 
expr int_val (__uint64 n)
 
expr int_val (char const *n)
 
expr real_val (int n, int d)
 
expr real_val (int n)
 
expr real_val (unsigned n)
 
expr real_val (__int64 n)
 
expr real_val (__uint64 n)
 
expr real_val (char const *n)
 
expr bv_val (int n, unsigned sz)
 
expr bv_val (unsigned n, unsigned sz)
 
expr bv_val (__int64 n, unsigned sz)
 
expr bv_val (__uint64 n, unsigned sz)
 
expr bv_val (char const *n, unsigned sz)
 
expr num_val (int n, sort const &s)
 

Detailed Description

A Context manages all other Z3 objects, global configuration options, etc.

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

Constructor & Destructor Documentation

context ( )
inline

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

133 { config c; init(c); }
context ( config c)
inline

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

134 { init(c); }
~context ( )
inline

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

135 { Z3_del_context(m_ctx); }
void Z3_API Z3_del_context(Z3_context c)
Delete the given logical context.

Member Function Documentation

sort array_sort ( sort  d,
sort  r 
)
inline

Return an array sort for arrays from d to r.

Example: Given a context c, c.array_sort(c.int_sort(), c.bool_sort()) is an array sort from integer to Boolean.

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

1633 { Z3_sort s = Z3_mk_array_sort(m_ctx, d, r); check_error(); return sort(*this, s); }
Z3_sort Z3_API Z3_mk_array_sort(Z3_context c, Z3_sort domain, Z3_sort range)
Create an array type.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bool_const ( char const *  name)
inline

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

1730 { return constant(name, bool_sort()); }
sort bool_sort()
Return the Boolean sort.
Definition: z3++.h:1629
expr constant(symbol const &name, sort const &s)
Definition: z3++.h:1724
sort bool_sort ( )
inline

Return the Boolean sort.

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

1629 { Z3_sort s = Z3_mk_bool_sort(m_ctx); check_error(); return sort(*this, s); }
Z3_sort Z3_API Z3_mk_bool_sort(Z3_context c)
Create the Boolean type.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bool_val ( bool  b)
inline

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

Referenced by z3::implies().

1735 { return b ? expr(*this, Z3_mk_true(m_ctx)) : expr(*this, Z3_mk_false(m_ctx)); }
Z3_ast Z3_API Z3_mk_true(Z3_context c)
Create an AST node representing true.
Z3_ast Z3_API Z3_mk_false(Z3_context c)
Create an AST node representing false.
expr bv_const ( char const *  name,
unsigned  sz 
)
inline

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

1733 { return constant(name, bv_sort(sz)); }
sort bv_sort(unsigned sz)
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition: z3++.h:1632
expr constant(symbol const &name, sort const &s)
Definition: z3++.h:1724
sort bv_sort ( unsigned  sz)
inline

Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.

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

1632 { Z3_sort s = Z3_mk_bv_sort(m_ctx, sz); check_error(); return sort(*this, s); }
Z3_sort Z3_API Z3_mk_bv_sort(Z3_context c, unsigned sz)
Create a bit-vector type of the given size.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bv_val ( int  n,
unsigned  sz 
)
inline

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

1750 { Z3_ast r = Z3_mk_int(m_ctx, n, bv_sort(sz)); check_error(); return expr(*this, r); }
sort bv_sort(unsigned sz)
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition: z3++.h:1632
Z3_ast Z3_API Z3_mk_int(Z3_context c, int v, Z3_sort ty)
Create a numeral of an int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bv_val ( unsigned  n,
unsigned  sz 
)
inline

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

1751 { Z3_ast r = Z3_mk_unsigned_int(m_ctx, n, bv_sort(sz)); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_unsigned_int(Z3_context c, unsigned v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
sort bv_sort(unsigned sz)
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition: z3++.h:1632
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bv_val ( __int64  n,
unsigned  sz 
)
inline

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

1752 { Z3_ast r = Z3_mk_int64(m_ctx, n, bv_sort(sz)); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_int64(Z3_context c, __int64 v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
sort bv_sort(unsigned sz)
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition: z3++.h:1632
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bv_val ( __uint64  n,
unsigned  sz 
)
inline

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

1753 { Z3_ast r = Z3_mk_unsigned_int64(m_ctx, n, bv_sort(sz)); check_error(); return expr(*this, r); }
sort bv_sort(unsigned sz)
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition: z3++.h:1632
Z3_ast Z3_API Z3_mk_unsigned_int64(Z3_context c, unsigned __int64 v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr bv_val ( char const *  n,
unsigned  sz 
)
inline

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

1754 { Z3_ast r = Z3_mk_numeral(m_ctx, n, bv_sort(sz)); check_error(); return expr(*this, r); }
sort bv_sort(unsigned sz)
Return the Bit-vector sort of size sz. That is, the sort for bit-vectors of size sz.
Definition: z3++.h:1632
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
Z3_ast Z3_API Z3_mk_numeral(Z3_context c, Z3_string numeral, Z3_sort ty)
Create a numeral of a given sort.
void check_error ( ) const
inline

Auxiliary method used to check for API usage errors.

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

Referenced by object::check_error(), z3::concat(), z3::to_expr(), z3::to_func_decl(), and z3::to_sort().

141  {
142  Z3_error_code e = Z3_get_error_code(m_ctx);
143  if (e != Z3_OK)
144  throw exception(Z3_get_error_msg_ex(m_ctx, e));
145  }
Z3_error_code
Z3 error codes (See Z3_get_error_code).
Definition: z3_api.h:1311
Z3_error_code Z3_API Z3_get_error_code(Z3_context c)
Return the error code for the last API call.
BEGIN_MLAPI_EXCLUDE Z3_string Z3_API Z3_get_error_msg_ex(Z3_context c, Z3_error_code err)
Return a string describing the given error code.
expr constant ( symbol const &  name,
sort const &  s 
)
inline

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

1724  {
1725  Z3_ast r = Z3_mk_const(m_ctx, name, s);
1726  check_error();
1727  return expr(*this, r);
1728  }
Z3_ast Z3_API Z3_mk_const(Z3_context c, Z3_symbol s, Z3_sort ty)
Declare and create a constant.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr constant ( char const *  name,
sort const &  s 
)
inline

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

1729 { return constant(str_symbol(name), s); }
symbol str_symbol(char const *s)
Create a Z3 symbol based on the given string.
Definition: z3++.h:1626
expr constant(symbol const &name, sort const &s)
Definition: z3++.h:1724
sort enumeration_sort ( char const *  name,
unsigned  n,
char const *const *  enum_names,
func_decl_vector cs,
func_decl_vector ts 
)
inline

Return an enumeration sort: enum_names[0], ..., enum_names[n-1]. cs and ts are output parameters. The method stores in cs the constants corresponding to the enumerated elements, and in ts the predicates for testing if terms of the enumeration sort correspond to an enumeration.

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

1634  {
1635  array<Z3_symbol> _enum_names(n);
1636  for (unsigned i = 0; i < n; i++) { _enum_names[i] = Z3_mk_string_symbol(*this, enum_names[i]); }
1637  array<Z3_func_decl> _cs(n);
1638  array<Z3_func_decl> _ts(n);
1639  Z3_symbol _name = Z3_mk_string_symbol(*this, name);
1640  sort s = to_sort(*this, Z3_mk_enumeration_sort(*this, _name, n, _enum_names.ptr(), _cs.ptr(), _ts.ptr()));
1641  check_error();
1642  for (unsigned i = 0; i < n; i++) { cs.push_back(func_decl(*this, _cs[i])); ts.push_back(func_decl(*this, _ts[i])); }
1643  return s;
1644  }
Z3_symbol Z3_API Z3_mk_string_symbol(Z3_context c, Z3_string s)
Create a Z3 symbol using a C string.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
Z3_sort Z3_API Z3_mk_enumeration_sort(Z3_context c, Z3_symbol name, unsigned n, Z3_symbol const enum_names[], Z3_func_decl enum_consts[], Z3_func_decl enum_testers[])
Create a enumeration sort.
sort to_sort(context &c, Z3_sort s)
Definition: z3++.h:945
func_decl function ( symbol const &  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

Referenced by z3::function().

1653  {
1654  array<Z3_sort> args(arity);
1655  for (unsigned i = 0; i < arity; i++) {
1656  check_context(domain[i], range);
1657  args[i] = domain[i];
1658  }
1659  Z3_func_decl f = Z3_mk_func_decl(m_ctx, name, arity, args.ptr(), range);
1660  check_error();
1661  return func_decl(*this, f);
1662  }
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
func_decl function ( char const *  name,
unsigned  arity,
sort const *  domain,
sort const &  range 
)
inline

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

1664  {
1665  return function(range.ctx().str_symbol(name), arity, domain, range);
1666  }
func_decl function ( symbol const &  name,
sort_vector const &  domain,
sort const &  range 
)
inline

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

1668  {
1669  array<Z3_sort> args(domain.size());
1670  for (unsigned i = 0; i < domain.size(); i++) {
1671  check_context(domain[i], range);
1672  args[i] = domain[i];
1673  }
1674  Z3_func_decl f = Z3_mk_func_decl(m_ctx, name, domain.size(), args.ptr(), range);
1675  check_error();
1676  return func_decl(*this, f);
1677  }
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
func_decl function ( char const *  name,
sort_vector const &  domain,
sort const &  range 
)
inline

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

1679  {
1680  return function(range.ctx().str_symbol(name), domain, range);
1681  }
func_decl function ( char const *  name,
sort const &  domain,
sort const &  range 
)
inline

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

1684  {
1685  check_context(domain, range);
1686  Z3_sort args[1] = { domain };
1687  Z3_func_decl f = Z3_mk_func_decl(m_ctx, str_symbol(name), 1, args, range);
1688  check_error();
1689  return func_decl(*this, f);
1690  }
symbol str_symbol(char const *s)
Create a Z3 symbol based on the given string.
Definition: z3++.h:1626
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
func_decl function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  range 
)
inline

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

1692  {
1693  check_context(d1, range); check_context(d2, range);
1694  Z3_sort args[2] = { d1, d2 };
1695  Z3_func_decl f = Z3_mk_func_decl(m_ctx, str_symbol(name), 2, args, range);
1696  check_error();
1697  return func_decl(*this, f);
1698  }
symbol str_symbol(char const *s)
Create a Z3 symbol based on the given string.
Definition: z3++.h:1626
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
func_decl function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  d3,
sort const &  range 
)
inline

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

1700  {
1701  check_context(d1, range); check_context(d2, range); check_context(d3, range);
1702  Z3_sort args[3] = { d1, d2, d3 };
1703  Z3_func_decl f = Z3_mk_func_decl(m_ctx, str_symbol(name), 3, args, range);
1704  check_error();
1705  return func_decl(*this, f);
1706  }
symbol str_symbol(char const *s)
Create a Z3 symbol based on the given string.
Definition: z3++.h:1626
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
func_decl function ( char const *  name,
sort const &  d1,
sort const &  d2,
sort const &  d3,
sort const &  d4,
sort const &  range 
)
inline

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

1708  {
1709  check_context(d1, range); check_context(d2, range); check_context(d3, range); check_context(d4, range);
1710  Z3_sort args[4] = { d1, d2, d3, d4 };
1711  Z3_func_decl f = Z3_mk_func_decl(m_ctx, str_symbol(name), 4, args, range);
1712  check_error();
1713  return func_decl(*this, f);
1714  }
symbol str_symbol(char const *s)
Create a Z3 symbol based on the given string.
Definition: z3++.h:1626
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
func_decl 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 1716 of file z3++.h.

1716  {
1717  check_context(d1, range); check_context(d2, range); check_context(d3, range); check_context(d4, range); check_context(d5, range);
1718  Z3_sort args[5] = { d1, d2, d3, d4, d5 };
1719  Z3_func_decl f = Z3_mk_func_decl(m_ctx, str_symbol(name), 5, args, range);
1720  check_error();
1721  return func_decl(*this, f);
1722  }
symbol str_symbol(char const *s)
Create a Z3 symbol based on the given string.
Definition: z3++.h:1626
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
void check_context(object const &a, object const &b)
Definition: z3++.h:281
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr int_const ( char const *  name)
inline

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

1731 { return constant(name, int_sort()); }
expr constant(symbol const &name, sort const &s)
Definition: z3++.h:1724
sort int_sort()
Return the integer sort.
Definition: z3++.h:1630
sort int_sort ( )
inline

Return the integer sort.

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

1630 { Z3_sort s = Z3_mk_int_sort(m_ctx); check_error(); return sort(*this, s); }
Z3_sort Z3_API Z3_mk_int_sort(Z3_context c)
Create the integer type.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
symbol int_symbol ( int  n)
inline

Create a Z3 symbol based on the given integer.

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

1627 { Z3_symbol r = Z3_mk_int_symbol(m_ctx, n); check_error(); return symbol(*this, r); }
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
Z3_symbol Z3_API Z3_mk_int_symbol(Z3_context c, int i)
Create a Z3 symbol using an integer.
expr int_val ( int  n)
inline

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

1737 { Z3_ast r = Z3_mk_int(m_ctx, n, int_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_int(Z3_context c, int v, Z3_sort ty)
Create a numeral of an int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
sort int_sort()
Return the integer sort.
Definition: z3++.h:1630
expr int_val ( unsigned  n)
inline

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

1738 { Z3_ast r = Z3_mk_unsigned_int(m_ctx, n, int_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_unsigned_int(Z3_context c, unsigned v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
sort int_sort()
Return the integer sort.
Definition: z3++.h:1630
expr int_val ( __int64  n)
inline

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

1739 { Z3_ast r = Z3_mk_int64(m_ctx, n, int_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_int64(Z3_context c, __int64 v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
sort int_sort()
Return the integer sort.
Definition: z3++.h:1630
expr int_val ( __uint64  n)
inline

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

1740 { Z3_ast r = Z3_mk_unsigned_int64(m_ctx, n, int_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_unsigned_int64(Z3_context c, unsigned __int64 v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
sort int_sort()
Return the integer sort.
Definition: z3++.h:1630
expr int_val ( char const *  n)
inline

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

1741 { Z3_ast r = Z3_mk_numeral(m_ctx, n, int_sort()); check_error(); return expr(*this, r); }
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
Z3_ast Z3_API Z3_mk_numeral(Z3_context c, Z3_string numeral, Z3_sort ty)
Create a numeral of a given sort.
sort int_sort()
Return the integer sort.
Definition: z3++.h:1630
void interrupt ( )
inline

Interrupt the current procedure being executed by any object managed by this context. This is a soft interruption: there is no guarantee the object will actualy stop.

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

168 { Z3_interrupt(m_ctx); }
void Z3_API Z3_interrupt(Z3_context c)
Interrupt the execution of a Z3 procedure. This procedure can be used to interrupt: solvers...
expr num_val ( int  n,
sort const &  s 
)
inline

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

Referenced by z3::pw(), z3::select(), z3::store(), z3::udiv(), z3::uge(), z3::ugt(), z3::ule(), and z3::ult().

1756 { Z3_ast r = Z3_mk_int(m_ctx, n, s); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_int(Z3_context c, int v, Z3_sort ty)
Create a numeral of an int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
operator Z3_context ( ) const
inline

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

136 { return m_ctx; }
expr real_const ( char const *  name)
inline

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

1732 { return constant(name, real_sort()); }
expr constant(symbol const &name, sort const &s)
Definition: z3++.h:1724
sort real_sort()
Return the Real sort.
Definition: z3++.h:1631
sort real_sort ( )
inline

Return the Real sort.

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

1631 { Z3_sort s = Z3_mk_real_sort(m_ctx); check_error(); return sort(*this, s); }
Z3_sort Z3_API Z3_mk_real_sort(Z3_context c)
Create the real type.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr real_val ( int  n,
int  d 
)
inline

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

1743 { Z3_ast r = Z3_mk_real(m_ctx, n, d); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_real(Z3_context c, int num, int den)
Create a real from a fraction.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr real_val ( int  n)
inline

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

1744 { Z3_ast r = Z3_mk_int(m_ctx, n, real_sort()); check_error(); return expr(*this, r); }
sort real_sort()
Return the Real sort.
Definition: z3++.h:1631
Z3_ast Z3_API Z3_mk_int(Z3_context c, int v, Z3_sort ty)
Create a numeral of an int, bit-vector, or finite-domain sort.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr real_val ( unsigned  n)
inline

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

1745 { Z3_ast r = Z3_mk_unsigned_int(m_ctx, n, real_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_unsigned_int(Z3_context c, unsigned v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
sort real_sort()
Return the Real sort.
Definition: z3++.h:1631
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr real_val ( __int64  n)
inline

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

1746 { Z3_ast r = Z3_mk_int64(m_ctx, n, real_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_int64(Z3_context c, __int64 v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
sort real_sort()
Return the Real sort.
Definition: z3++.h:1631
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr real_val ( __uint64  n)
inline

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

1747 { Z3_ast r = Z3_mk_unsigned_int64(m_ctx, n, real_sort()); check_error(); return expr(*this, r); }
Z3_ast Z3_API Z3_mk_unsigned_int64(Z3_context c, unsigned __int64 v, Z3_sort ty)
Create a numeral of a int, bit-vector, or finite-domain sort.
sort real_sort()
Return the Real sort.
Definition: z3++.h:1631
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
expr real_val ( char const *  n)
inline

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

1748 { Z3_ast r = Z3_mk_numeral(m_ctx, n, real_sort()); check_error(); return expr(*this, r); }
sort real_sort()
Return the Real sort.
Definition: z3++.h:1631
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
Z3_ast Z3_API Z3_mk_numeral(Z3_context c, Z3_string numeral, Z3_sort ty)
Create a numeral of a given sort.
void set ( char const *  param,
char const *  value 
)
inline

Update global parameter param with string value.

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

150 { Z3_update_param_value(m_ctx, param, value); }
void Z3_API Z3_update_param_value(Z3_context c, Z3_string param_id, Z3_string param_value)
Set a value of a context parameter.
void set ( char const *  param,
bool  value 
)
inline

Update global parameter param with Boolean value.

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

154 { Z3_update_param_value(m_ctx, param, value ? "true" : "false"); }
void Z3_API Z3_update_param_value(Z3_context c, Z3_string param_id, Z3_string param_value)
Set a value of a context parameter.
void set ( char const *  param,
int  value 
)
inline

Update global parameter param with Integer value.

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

158  {
159  std::ostringstream oss;
160  oss << value;
161  Z3_update_param_value(m_ctx, param, oss.str().c_str());
162  }
void Z3_API Z3_update_param_value(Z3_context c, Z3_string param_id, Z3_string param_value)
Set a value of a context parameter.
symbol str_symbol ( char const *  s)
inline

Create a Z3 symbol based on the given string.

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

Referenced by context::function(), and solver::solver().

1626 { Z3_symbol r = Z3_mk_string_symbol(m_ctx, s); check_error(); return symbol(*this, r); }
Z3_symbol Z3_API Z3_mk_string_symbol(Z3_context c, Z3_string s)
Create a Z3 symbol using a C string.
void check_error() const
Auxiliary method used to check for API usage errors.
Definition: z3++.h:141
sort uninterpreted_sort ( char const *  name)
inline

create an uninterpreted sort with the name given by the string or symbol.

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

1645  {
1646  Z3_symbol _name = Z3_mk_string_symbol(*this, name);
1647  return to_sort(*this, Z3_mk_uninterpreted_sort(*this, _name));
1648  }
Z3_symbol Z3_API Z3_mk_string_symbol(Z3_context c, Z3_string s)
Create a Z3 symbol using a C string.
Z3_sort Z3_API Z3_mk_uninterpreted_sort(Z3_context c, Z3_symbol s)
Create a free (uninterpreted) type using the given name (symbol).
sort to_sort(context &c, Z3_sort s)
Definition: z3++.h:945
sort uninterpreted_sort ( symbol const &  name)
inline

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

1649  {
1650  return to_sort(*this, Z3_mk_uninterpreted_sort(*this, name));
1651  }
Z3_sort Z3_API Z3_mk_uninterpreted_sort(Z3_context c, Z3_symbol s)
Create a free (uninterpreted) type using the given name (symbol).
sort to_sort(context &c, Z3_sort s)
Definition: z3++.h:945