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

Public Member Functions

 fixedpoint (context &c)
 
 fixedpoint (fixedpoint const &o)
 
 ~fixedpoint ()
 
fixedpointoperator= (fixedpoint const &o)
 
 operator Z3_fixedpoint () const
 
expr_vector from_string (char const *s)
 
expr_vector from_file (char const *s)
 
void add_rule (expr &rule, symbol const &name)
 
void add_fact (func_decl &f, unsigned *args)
 
check_result query (expr &q)
 
check_result query (func_decl_vector &relations)
 
expr get_answer ()
 
std::string reason_unknown ()
 
void update_rule (expr &rule, symbol const &name)
 
unsigned get_num_levels (func_decl &p)
 
expr get_cover_delta (int level, func_decl &p)
 
void add_cover (int level, func_decl &p, expr &property)
 
stats statistics () const
 
void register_relation (func_decl &p)
 
expr_vector assertions () const
 
expr_vector rules () const
 
void set (params const &p)
 
std::string help () const
 
param_descrs get_param_descrs ()
 
std::string to_string ()
 
std::string to_string (expr_vector const &queries)
 
- Public Member Functions inherited from object
 object (context &c)
 
contextctx () const
 
Z3_error_code check_error () const
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

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

Constructor & Destructor Documentation

◆ fixedpoint() [1/2]

fixedpoint ( context c)
inline

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

3233 :object(c) { m_fp = Z3_mk_fixedpoint(c); Z3_fixedpoint_inc_ref(c, m_fp); }

◆ fixedpoint() [2/2]

fixedpoint ( fixedpoint const &  o)
inline

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

3234 :object(o), m_fp(o.m_fp) { Z3_fixedpoint_inc_ref(ctx(), m_fp); }

◆ ~fixedpoint()

~fixedpoint ( )
inline

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

3235 { Z3_fixedpoint_dec_ref(ctx(), m_fp); }

Member Function Documentation

◆ add_cover()

void add_cover ( int  level,
func_decl p,
expr property 
)
inline

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

3272 { Z3_fixedpoint_add_cover(ctx(), m_fp, level, p, property); check_error(); }

◆ add_fact()

void add_fact ( func_decl f,
unsigned *  args 
)
inline

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

3255 { Z3_fixedpoint_add_fact(ctx(), m_fp, f, f.arity(), args); check_error(); }

◆ add_rule()

void add_rule ( expr rule,
symbol const &  name 
)
inline

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

3254 { Z3_fixedpoint_add_rule(ctx(), m_fp, rule, name); check_error(); }

◆ assertions()

expr_vector assertions ( ) const
inline

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

3275 { Z3_ast_vector r = Z3_fixedpoint_get_assertions(ctx(), m_fp); check_error(); return expr_vector(ctx(), r); }

◆ from_file()

expr_vector from_file ( char const *  s)
inline

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

3249  {
3250  Z3_ast_vector r = Z3_fixedpoint_from_file(ctx(), m_fp, s);
3251  check_error();
3252  return expr_vector(ctx(), r);
3253  }

◆ from_string()

expr_vector from_string ( char const *  s)
inline

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

3244  {
3245  Z3_ast_vector r = Z3_fixedpoint_from_string(ctx(), m_fp, s);
3246  check_error();
3247  return expr_vector(ctx(), r);
3248  }

◆ get_answer()

expr get_answer ( )
inline

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

3263 { Z3_ast r = Z3_fixedpoint_get_answer(ctx(), m_fp); check_error(); return expr(ctx(), r); }

◆ get_cover_delta()

expr get_cover_delta ( int  level,
func_decl p 
)
inline

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

3267  {
3268  Z3_ast r = Z3_fixedpoint_get_cover_delta(ctx(), m_fp, level, p);
3269  check_error();
3270  return expr(ctx(), r);
3271  }

◆ get_num_levels()

unsigned get_num_levels ( func_decl p)
inline

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

3266 { unsigned r = Z3_fixedpoint_get_num_levels(ctx(), m_fp, p); check_error(); return r; }

◆ get_param_descrs()

param_descrs get_param_descrs ( )
inline

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

3279 { return param_descrs(ctx(), Z3_fixedpoint_get_param_descrs(ctx(), m_fp)); }

◆ help()

std::string help ( ) const
inline

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

3278 { return Z3_fixedpoint_get_help(ctx(), m_fp); }

◆ operator Z3_fixedpoint()

operator Z3_fixedpoint ( ) const
inline

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

3243 { return m_fp; }

◆ operator=()

fixedpoint& operator= ( fixedpoint const &  o)
inline

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

3236  {
3237  Z3_fixedpoint_inc_ref(o.ctx(), o.m_fp);
3238  Z3_fixedpoint_dec_ref(ctx(), m_fp);
3239  m_fp = o.m_fp;
3240  object::operator=(o);
3241  return *this;
3242  }

◆ query() [1/2]

check_result query ( expr q)
inline

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

3256 { Z3_lbool r = Z3_fixedpoint_query(ctx(), m_fp, q); check_error(); return to_check_result(r); }

◆ query() [2/2]

check_result query ( func_decl_vector relations)
inline

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

3257  {
3258  array<Z3_func_decl> rs(relations);
3259  Z3_lbool r = Z3_fixedpoint_query_relations(ctx(), m_fp, rs.size(), rs.ptr());
3260  check_error();
3261  return to_check_result(r);
3262  }

◆ reason_unknown()

std::string reason_unknown ( )
inline

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

3264 { return Z3_fixedpoint_get_reason_unknown(ctx(), m_fp); }

◆ register_relation()

void register_relation ( func_decl p)
inline

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

3274 { Z3_fixedpoint_register_relation(ctx(), m_fp, p); }

◆ rules()

expr_vector rules ( ) const
inline

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

3276 { Z3_ast_vector r = Z3_fixedpoint_get_rules(ctx(), m_fp); check_error(); return expr_vector(ctx(), r); }

◆ set()

void set ( params const &  p)
inline

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

3277 { Z3_fixedpoint_set_params(ctx(), m_fp, p); check_error(); }

◆ statistics()

stats statistics ( ) const
inline

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

3273 { Z3_stats r = Z3_fixedpoint_get_statistics(ctx(), m_fp); check_error(); return stats(ctx(), r); }

◆ to_string() [1/2]

std::string to_string ( )
inline

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

3280 { return Z3_fixedpoint_to_string(ctx(), m_fp, 0, 0); }

◆ to_string() [2/2]

std::string to_string ( expr_vector const &  queries)
inline

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

3281  {
3282  array<Z3_ast> qs(queries);
3283  return Z3_fixedpoint_to_string(ctx(), m_fp, qs.size(), qs.ptr());
3284  }

◆ update_rule()

void update_rule ( expr rule,
symbol const &  name 
)
inline

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

3265 { Z3_fixedpoint_update_rule(ctx(), m_fp, rule, name); check_error(); }
Microsoft.Z3.Z3_stats
System.IntPtr Z3_stats
Definition: NativeContext.cs:34
Z3_fixedpoint_add_fact
void Z3_API Z3_fixedpoint_add_fact(Z3_context c, Z3_fixedpoint d, Z3_func_decl r, unsigned num_args, unsigned args[])
Add a Database fact.
Z3_fixedpoint_get_param_descrs
Z3_param_descrs Z3_API Z3_fixedpoint_get_param_descrs(Z3_context c, Z3_fixedpoint f)
Return the parameter description set for the given fixedpoint object.
Z3_fixedpoint_get_num_levels
unsigned Z3_API Z3_fixedpoint_get_num_levels(Z3_context c, Z3_fixedpoint d, Z3_func_decl pred)
Query the PDR engine for the maximal levels properties are known about predicate.
Z3_fixedpoint_get_reason_unknown
Z3_string Z3_API Z3_fixedpoint_get_reason_unknown(Z3_context c, Z3_fixedpoint d)
Retrieve a string that describes the last status returned by Z3_fixedpoint_query.
Z3_fixedpoint_update_rule
void Z3_API Z3_fixedpoint_update_rule(Z3_context c, Z3_fixedpoint d, Z3_ast a, Z3_symbol name)
Update a named rule. A rule with the same name must have been previously created.
Z3_fixedpoint_get_assertions
Z3_ast_vector Z3_API Z3_fixedpoint_get_assertions(Z3_context c, Z3_fixedpoint f)
Retrieve set of background assertions from fixedpoint context.
Z3_fixedpoint_query_relations
Z3_lbool Z3_API Z3_fixedpoint_query_relations(Z3_context c, Z3_fixedpoint d, unsigned num_relations, Z3_func_decl const relations[])
Pose multiple queries against the asserted rules.
Z3_fixedpoint_from_string
Z3_ast_vector Z3_API Z3_fixedpoint_from_string(Z3_context c, Z3_fixedpoint f, Z3_string s)
Parse an SMT-LIB2 string with fixedpoint rules. Add the rules to the current fixedpoint context....
Z3_fixedpoint_get_statistics
Z3_stats Z3_API Z3_fixedpoint_get_statistics(Z3_context c, Z3_fixedpoint d)
Retrieve statistics information from the last call to Z3_fixedpoint_query.
z3::object::object
object(context &c)
Definition: z3++.h:450
Z3_fixedpoint_get_cover_delta
Z3_ast Z3_API Z3_fixedpoint_get_cover_delta(Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred)
Microsoft.Z3.Z3_ast_vector
System.IntPtr Z3_ast_vector
Definition: NativeContext.cs:29
Z3_fixedpoint_get_rules
Z3_ast_vector Z3_API Z3_fixedpoint_get_rules(Z3_context c, Z3_fixedpoint f)
Retrieve set of rules from fixedpoint context.
Z3_lbool
Z3_lbool
Lifted Boolean type: false, undefined, true.
Definition: z3_api.h:59
Z3_fixedpoint_from_file
Z3_ast_vector Z3_API Z3_fixedpoint_from_file(Z3_context c, Z3_fixedpoint f, Z3_string s)
Parse an SMT-LIB2 file with fixedpoint rules. Add the rules to the current fixedpoint context....
Z3_fixedpoint_add_cover
void Z3_API Z3_fixedpoint_add_cover(Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred, Z3_ast property)
Add property about the predicate pred. Add a property of predicate pred at level. It gets pushed forw...
Z3_fixedpoint_add_rule
void Z3_API Z3_fixedpoint_add_rule(Z3_context c, Z3_fixedpoint d, Z3_ast rule, Z3_symbol name)
Add a universal Horn clause as a named rule. The horn_rule should be of the form:
Z3_fixedpoint_dec_ref
void Z3_API Z3_fixedpoint_dec_ref(Z3_context c, Z3_fixedpoint d)
Decrement the reference counter of the given fixedpoint context.
z3::expr_vector
ast_vector_tpl< expr > expr_vector
Definition: z3++.h:75
Z3_fixedpoint_get_answer
Z3_ast Z3_API Z3_fixedpoint_get_answer(Z3_context c, Z3_fixedpoint d)
Retrieve a formula that encodes satisfying answers to the query.
Z3_fixedpoint_query
Z3_lbool Z3_API Z3_fixedpoint_query(Z3_context c, Z3_fixedpoint d, Z3_ast query)
Pose a query against the asserted rules.
Z3_fixedpoint_register_relation
void Z3_API Z3_fixedpoint_register_relation(Z3_context c, Z3_fixedpoint d, Z3_func_decl f)
Register relation as Fixedpoint defined. Fixedpoint defined relations have least-fixedpoint semantics...
z3::to_check_result
check_result to_check_result(Z3_lbool l)
Definition: z3++.h:146
Z3_fixedpoint_to_string
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.
Microsoft.Z3.Z3_ast
System.IntPtr Z3_ast
Definition: NativeContext.cs:28
Z3_fixedpoint_set_params
void Z3_API Z3_fixedpoint_set_params(Z3_context c, Z3_fixedpoint f, Z3_params p)
Set parameters on fixedpoint context.
Z3_fixedpoint_inc_ref
void Z3_API Z3_fixedpoint_inc_ref(Z3_context c, Z3_fixedpoint d)
Increment the reference counter of the given fixedpoint context.
z3::object::check_error
Z3_error_code check_error() const
Definition: z3++.h:452
z3::object::ctx
context & ctx() const
Definition: z3++.h:451
Z3_fixedpoint_get_help
Z3_string Z3_API Z3_fixedpoint_get_help(Z3_context c, Z3_fixedpoint f)
Return a string describing all fixedpoint available parameters.
Z3_mk_fixedpoint
Z3_fixedpoint Z3_API Z3_mk_fixedpoint(Z3_context c)
Create a new fixedpoint context.