Z3
 
Loading...
Searching...
No Matches
Public Member Functions
func_interp Class Reference

#include <z3++.h>

+ Inheritance diagram for func_interp:

Public Member Functions

 func_interp (context &c, Z3_func_interp e)
 
 func_interp (func_interp const &s)
 
 ~func_interp () override
 
 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)
 
virtual ~object ()=default
 
contextctx () const
 
Z3_error_code check_error () const
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

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

Constructor & Destructor Documentation

◆ func_interp() [1/2]

func_interp ( context c,
Z3_func_interp  e 
)
inline

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

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

◆ func_interp() [2/2]

func_interp ( func_interp const s)
inline

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

2606:object(s) { init(s.m_interp); }

◆ ~func_interp()

~func_interp ( )
inlineoverride

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

2607{ Z3_func_interp_dec_ref(ctx(), m_interp); }
context & ctx() const
Definition z3++.h:491
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.

Member Function Documentation

◆ add_entry()

void add_entry ( expr_vector const args,
expr value 
)
inline

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

2619 {
2620 Z3_func_interp_add_entry(ctx(), m_interp, args, value);
2621 check_error();
2622 }
Z3_error_code check_error() const
Definition z3++.h:492
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 2616 of file z3++.h.

2616{ Z3_ast r = Z3_func_interp_get_else(ctx(), m_interp); check_error(); return expr(ctx(), r); }
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.
System.IntPtr Z3_ast

Referenced by FuncInterp::as_list().

◆ entry()

func_entry entry ( unsigned  i) const
inline

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

2618{ Z3_func_entry e = Z3_func_interp_get_entry(ctx(), m_interp, i); check_error(); return func_entry(ctx(), e); }
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 interpretation. It represents the value of f in a particular p...
System.IntPtr Z3_func_entry

Referenced by FuncEntry::__deepcopy__(), FuncEntry::__del__(), FuncEntry::arg_value(), FuncInterp::as_list(), FuncEntry::num_args(), and FuncEntry::value().

◆ num_entries()

unsigned num_entries ( ) const
inline

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

2617{ unsigned r = Z3_func_interp_get_num_entries(ctx(), m_interp); check_error(); return r; }
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.

Referenced by FuncInterp::as_list(), and FuncInterp::entry().

◆ operator Z3_func_interp()

operator Z3_func_interp ( ) const
inline

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

2608{ return m_interp; }

◆ operator=()

func_interp & operator= ( func_interp const s)
inline

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

2609 {
2610 Z3_func_interp_inc_ref(s.ctx(), s.m_interp);
2611 Z3_func_interp_dec_ref(ctx(), m_interp);
2612 object::operator=(s);
2613 m_interp = s.m_interp;
2614 return *this;
2615 }
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.

◆ set_else()

void set_else ( expr value)
inline

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

2623 {
2624 Z3_func_interp_set_else(ctx(), m_interp, value);
2625 check_error();
2626 }
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.