Z3
Public Member Functions
func_interp Class Reference
+ Inheritance diagram for func_interp:

Public Member Functions

 func_interp (context &c, Z3_func_interp e)
 
 func_interp (func_interp const &s)
 
 ~func_interp ()
 
 operator Z3_func_interp () const
 
func_interpoperator= (func_interp const &s)
 
expr else_value () const
 
unsigned num_entries () const
 
func_entry entry (unsigned i) const
 
void add_entry (expr_vector const &args, expr &value)
 
void set_else (expr &value)
 
- Public Member Functions inherited from object
 object (context &c)
 
 object (object const &s)
 
contextctx () const
 
Z3_error_code check_error () const
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

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

Constructor & Destructor Documentation

◆ func_interp() [1/2]

func_interp ( context c,
Z3_func_interp  e 
)
inline

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

1781 :object(c) { init(e); }
object(context &c)
Definition: z3++.h:362

◆ func_interp() [2/2]

func_interp ( func_interp const &  s)
inline

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

1782 :object(s) { init(s.m_interp); }
object(context &c)
Definition: z3++.h:362

◆ ~func_interp()

~func_interp ( )
inline

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

1783 { Z3_func_interp_dec_ref(ctx(), m_interp); }
void Z3_API Z3_func_interp_dec_ref(Z3_context c, Z3_func_interp f)
Decrement the reference counter of the given Z3_func_interp object.
context & ctx() const
Definition: z3++.h:364

Member Function Documentation

◆ add_entry()

void add_entry ( expr_vector const &  args,
expr value 
)
inline

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

1795  {
1796  Z3_func_interp_add_entry(ctx(), m_interp, args, value);
1797  check_error();
1798  }
Z3_error_code check_error() const
Definition: z3++.h:365
context & ctx() const
Definition: z3++.h:364
void Z3_API Z3_func_interp_add_entry(Z3_context c, Z3_func_interp fi, Z3_ast_vector args, Z3_ast value)
add a function entry to a function interpretation.

◆ else_value()

expr else_value ( ) const
inline

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

1792 { Z3_ast r = Z3_func_interp_get_else(ctx(), m_interp); check_error(); return expr(ctx(), r); }
Z3_error_code check_error() const
Definition: z3++.h:365
context & ctx() const
Definition: z3++.h:364
Z3_ast Z3_API Z3_func_interp_get_else(Z3_context c, Z3_func_interp f)
Return the 'else' value of the given function interpretation.

◆ entry()

func_entry entry ( unsigned  i) const
inline

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

1794 { Z3_func_entry e = Z3_func_interp_get_entry(ctx(), m_interp, i); check_error(); return func_entry(ctx(), e); }
Z3_error_code check_error() const
Definition: z3++.h:365
context & ctx() const
Definition: z3++.h:364
Z3_func_entry Z3_API Z3_func_interp_get_entry(Z3_context c, Z3_func_interp f, unsigned i)
Return a "point" of the given function intepretation. It represents the value of f in a particular po...

◆ num_entries()

unsigned num_entries ( ) const
inline

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

1793 { unsigned r = Z3_func_interp_get_num_entries(ctx(), m_interp); check_error(); return r; }
Z3_error_code check_error() const
Definition: z3++.h:365
context & ctx() const
Definition: z3++.h:364
unsigned Z3_API Z3_func_interp_get_num_entries(Z3_context c, Z3_func_interp f)
Return the number of entries in the given function interpretation.

◆ operator Z3_func_interp()

operator Z3_func_interp ( ) const
inline

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

1784 { return m_interp; }

◆ operator=()

func_interp& operator= ( func_interp const &  s)
inline

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

1785  {
1786  Z3_func_interp_inc_ref(s.ctx(), s.m_interp);
1787  Z3_func_interp_dec_ref(ctx(), m_interp);
1788  m_ctx = s.m_ctx;
1789  m_interp = s.m_interp;
1790  return *this;
1791  }
void Z3_API Z3_func_interp_inc_ref(Z3_context c, Z3_func_interp f)
Increment the reference counter of the given Z3_func_interp object.
void Z3_API Z3_func_interp_dec_ref(Z3_context c, Z3_func_interp f)
Decrement the reference counter of the given Z3_func_interp object.
context & ctx() const
Definition: z3++.h:364
context * m_ctx
Definition: z3++.h:360

◆ set_else()

void set_else ( expr value)
inline

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

1799  {
1800  Z3_func_interp_set_else(ctx(), m_interp, value);
1801  check_error();
1802  }
Z3_error_code check_error() const
Definition: z3++.h:365
context & ctx() const
Definition: z3++.h:364
void Z3_API Z3_func_interp_set_else(Z3_context c, Z3_func_interp f, Z3_ast else_value)
Return the 'else' value of the given function interpretation.