Z3
Public Member Functions | Data Fields
Fixedpoint Class Reference

Fixedpoint. More...

+ Inheritance diagram for Fixedpoint:

Public Member Functions

def __init__
 
def __deepcopy__
 
def __del__ (self)
 
def set (self, args, keys)
 
def help (self)
 
def param_descrs (self)
 
def assert_exprs (self, args)
 
def add (self, args)
 
def __iadd__ (self, fml)
 
def append (self, args)
 
def insert (self, args)
 
def add_rule
 
def rule
 
def fact
 
def query (self, query)
 
def query_from_lvl (self, lvl, query)
 
def update_rule (self, head, body, name)
 
def get_answer (self)
 
def get_ground_sat_answer (self)
 
def get_rules_along_trace (self)
 
def get_rule_names_along_trace (self)
 
def get_num_levels (self, predicate)
 
def get_cover_delta (self, level, predicate)
 
def add_cover (self, level, predicate, property)
 
def register_relation (self, relations)
 
def set_predicate_representation (self, f, representations)
 
def parse_string (self, s)
 
def parse_file (self, f)
 
def get_rules (self)
 
def get_assertions (self)
 
def __repr__ (self)
 
def sexpr (self)
 
def to_string (self, queries)
 
def statistics (self)
 
def reason_unknown (self)
 
def declare_var (self, vars)
 
def abstract
 
- Public Member Functions inherited from Z3PPObject
def use_pp (self)
 

Data Fields

 ctx
 
 fixedpoint
 
 vars
 

Detailed Description

Fixedpoint.

Fixedpoint API provides methods for solving with recursive predicates

Definition at line 7430 of file z3py.py.

Constructor & Destructor Documentation

def __init__ (   self,
  fixedpoint = None,
  ctx = None 
)

Definition at line 7433 of file z3py.py.

7433  def __init__(self, fixedpoint=None, ctx=None):
7434  assert fixedpoint is None or ctx is not None
7435  self.ctx = _get_ctx(ctx)
7436  self.fixedpoint = None
7437  if fixedpoint is None:
7438  self.fixedpoint = Z3_mk_fixedpoint(self.ctx.ref())
7439  else:
7440  self.fixedpoint = fixedpoint
7441  Z3_fixedpoint_inc_ref(self.ctx.ref(), self.fixedpoint)
7442  self.vars = []
7443 
Z3_fixedpoint Z3_API Z3_mk_fixedpoint(Z3_context c)
Create a new fixedpoint context.
def __init__
Definition: z3py.py:7433
void Z3_API Z3_fixedpoint_inc_ref(Z3_context c, Z3_fixedpoint d)
Increment the reference counter of the given fixedpoint context.
def __del__ (   self)

Definition at line 7447 of file z3py.py.

7447  def __del__(self):
7448  if self.fixedpoint is not None and self.ctx.ref() is not None and Z3_fixedpoint_dec_ref is not None:
7449  Z3_fixedpoint_dec_ref(self.ctx.ref(), self.fixedpoint)
7450 
void Z3_API Z3_fixedpoint_dec_ref(Z3_context c, Z3_fixedpoint d)
Decrement the reference counter of the given fixedpoint context.
def __del__(self)
Definition: z3py.py:7447

Member Function Documentation

def __deepcopy__ (   self,
  memo = {} 
)

Definition at line 7444 of file z3py.py.

7444  def __deepcopy__(self, memo={}):
7445  return FixedPoint(self.fixedpoint, self.ctx)
7446 
def __deepcopy__
Definition: z3py.py:7444
def __iadd__ (   self,
  fml 
)

Definition at line 7483 of file z3py.py.

7483  def __iadd__(self, fml):
7484  self.add(fml)
7485  return self
7486 
def add(self, args)
Definition: z3py.py:7479
def __iadd__(self, fml)
Definition: z3py.py:7483
def __repr__ (   self)
Return a formatted string with all added rules and constraints.

Definition at line 7644 of file z3py.py.

7644  def __repr__(self):
7645  """Return a formatted string with all added rules and constraints."""
7646  return self.sexpr()
7647 
def __repr__(self)
Definition: z3py.py:7644
def sexpr(self)
Definition: z3py.py:7648
def abstract (   self,
  fml,
  is_forall = True 
)

Definition at line 7681 of file z3py.py.

Referenced by Fixedpoint.add_rule(), Fixedpoint.assert_exprs(), Fixedpoint.query(), Fixedpoint.query_from_lvl(), and Fixedpoint.update_rule().

7681  def abstract(self, fml, is_forall=True):
7682  if self.vars == []:
7683  return fml
7684  if is_forall:
7685  return ForAll(self.vars, fml)
7686  else:
7687  return Exists(self.vars, fml)
7688 
7689 
def Exists
Definition: z3py.py:2236
def ForAll
Definition: z3py.py:2218
def abstract
Definition: z3py.py:7681
def add (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 7479 of file z3py.py.

Referenced by Fixedpoint.__iadd__(), and Optimize.__iadd__().

7479  def add(self, *args):
7480  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
7481  self.assert_exprs(*args)
7482 
def assert_exprs(self, args)
Definition: z3py.py:7465
def add(self, args)
Definition: z3py.py:7479
def add_cover (   self,
  level,
  predicate,
  property 
)
Add property to predicate for the level'th unfolding.
-1 is treated as infinity (infinity)

Definition at line 7606 of file z3py.py.

7606  def add_cover(self, level, predicate, property):
7607  """Add property to predicate for the level'th unfolding.
7608  -1 is treated as infinity (infinity)
7609  """
7610  Z3_fixedpoint_add_cover(self.ctx.ref(), self.fixedpoint, level, predicate.ast, property.ast)
7611 
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...
def add_cover(self, level, predicate, property)
Definition: z3py.py:7606
def add_rule (   self,
  head,
  body = None,
  name = None 
)
Assert rules defining recursive predicates to the fixedpoint solver.
>>> a = Bool('a')
>>> b = Bool('b')
>>> s = Fixedpoint()
>>> s.register_relation(a.decl())
>>> s.register_relation(b.decl())
>>> s.fact(a)
>>> s.rule(b, a)
>>> s.query(b)
sat

Definition at line 7495 of file z3py.py.

Referenced by Fixedpoint.fact(), and Fixedpoint.rule().

7495  def add_rule(self, head, body=None, name=None):
7496  """Assert rules defining recursive predicates to the fixedpoint solver.
7497  >>> a = Bool('a')
7498  >>> b = Bool('b')
7499  >>> s = Fixedpoint()
7500  >>> s.register_relation(a.decl())
7501  >>> s.register_relation(b.decl())
7502  >>> s.fact(a)
7503  >>> s.rule(b, a)
7504  >>> s.query(b)
7505  sat
7506  """
7507  if name is None:
7508  name = ""
7509  name = to_symbol(name, self.ctx)
7510  if body is None:
7511  head = self.abstract(head)
7512  Z3_fixedpoint_add_rule(self.ctx.ref(), self.fixedpoint, head.as_ast(), name)
7513  else:
7514  body = _get_args(body)
7515  f = self.abstract(Implies(And(body, self.ctx), head))
7516  Z3_fixedpoint_add_rule(self.ctx.ref(), self.fixedpoint, f.as_ast(), name)
7517 
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: ...
def Implies
Definition: z3py.py:1781
def And(args)
Definition: z3py.py:1845
def abstract
Definition: z3py.py:7681
def add_rule
Definition: z3py.py:7495
def to_symbol
Definition: z3py.py:124
def append (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 7487 of file z3py.py.

7487  def append(self, *args):
7488  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
7489  self.assert_exprs(*args)
7490 
def assert_exprs(self, args)
Definition: z3py.py:7465
def append(self, args)
Definition: z3py.py:7487
def assert_exprs (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver.

Definition at line 7465 of file z3py.py.

Referenced by Fixedpoint.add(), Optimize.add(), Fixedpoint.append(), and Fixedpoint.insert().

7465  def assert_exprs(self, *args):
7466  """Assert constraints as background axioms for the fixedpoint solver."""
7467  args = _get_args(args)
7468  s = BoolSort(self.ctx)
7469  for arg in args:
7470  if isinstance(arg, Goal) or isinstance(arg, AstVector):
7471  for f in arg:
7472  f = self.abstract(f)
7473  Z3_fixedpoint_assert(self.ctx.ref(), self.fixedpoint, f.as_ast())
7474  else:
7475  arg = s.cast(arg)
7476  arg = self.abstract(arg)
7477  Z3_fixedpoint_assert(self.ctx.ref(), self.fixedpoint, arg.as_ast())
7478 
def BoolSort
Definition: z3py.py:1687
def assert_exprs(self, args)
Definition: z3py.py:7465
void Z3_API Z3_fixedpoint_assert(Z3_context c, Z3_fixedpoint d, Z3_ast axiom)
Assert a constraint to the fixedpoint context.
def abstract
Definition: z3py.py:7681
def declare_var (   self,
  vars 
)
Add variable or several variables.
The added variable or variables will be bound in the rules
and queries

Definition at line 7672 of file z3py.py.

7672  def declare_var(self, *vars):
7673  """Add variable or several variables.
7674  The added variable or variables will be bound in the rules
7675  and queries
7676  """
7677  vars = _get_args(vars)
7678  for v in vars:
7679  self.vars += [v]
7680 
def declare_var(self, vars)
Definition: z3py.py:7672
def fact (   self,
  head,
  name = None 
)
Assert facts defining recursive predicates to the fixedpoint solver. Alias for add_rule.

Definition at line 7522 of file z3py.py.

7522  def fact(self, head, name=None):
7523  """Assert facts defining recursive predicates to the fixedpoint solver. Alias for add_rule."""
7524  self.add_rule(head, None, name)
7525 
def add_rule
Definition: z3py.py:7495
def get_answer (   self)
Retrieve answer from last query call.

Definition at line 7573 of file z3py.py.

7573  def get_answer(self):
7574  """Retrieve answer from last query call."""
7575  r = Z3_fixedpoint_get_answer(self.ctx.ref(), self.fixedpoint)
7576  return _to_expr_ref(r, self.ctx)
7577 
def get_answer(self)
Definition: z3py.py:7573
Z3_ast Z3_API Z3_fixedpoint_get_answer(Z3_context c, Z3_fixedpoint d)
Retrieve a formula that encodes satisfying answers to the query.
def get_assertions (   self)
retrieve assertions that have been added to fixedpoint context

Definition at line 7640 of file z3py.py.

7640  def get_assertions(self):
7641  """retrieve assertions that have been added to fixedpoint context"""
7642  return AstVector(Z3_fixedpoint_get_assertions(self.ctx.ref(), self.fixedpoint), self.ctx)
7643 
Z3_ast_vector Z3_API Z3_fixedpoint_get_assertions(Z3_context c, Z3_fixedpoint f)
Retrieve set of background assertions from fixedpoint context.
def get_assertions(self)
Definition: z3py.py:7640
def get_cover_delta (   self,
  level,
  predicate 
)
Retrieve properties known about predicate for the level'th unfolding.
-1 is treated as the limit (infinity)

Definition at line 7599 of file z3py.py.

7599  def get_cover_delta(self, level, predicate):
7600  """Retrieve properties known about predicate for the level'th unfolding.
7601  -1 is treated as the limit (infinity)
7602  """
7603  r = Z3_fixedpoint_get_cover_delta(self.ctx.ref(), self.fixedpoint, level, predicate.ast)
7604  return _to_expr_ref(r, self.ctx)
7605 
def get_cover_delta(self, level, predicate)
Definition: z3py.py:7599
Z3_ast Z3_API Z3_fixedpoint_get_cover_delta(Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred)
def get_ground_sat_answer (   self)
Retrieve a ground cex from last query call.

Definition at line 7578 of file z3py.py.

7579  """Retrieve a ground cex from last query call."""
7580  r = Z3_fixedpoint_get_ground_sat_answer(self.ctx.ref(), self.fixedpoint)
7581  return _to_expr_ref(r, self.ctx)
7582 
def get_ground_sat_answer(self)
Definition: z3py.py:7578
def get_num_levels (   self,
  predicate 
)
Retrieve number of levels used for predicate in PDR engine

Definition at line 7595 of file z3py.py.

7595  def get_num_levels(self, predicate):
7596  """Retrieve number of levels used for predicate in PDR engine"""
7597  return Z3_fixedpoint_get_num_levels(self.ctx.ref(), self.fixedpoint, predicate.ast)
7598 
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. ...
def get_num_levels(self, predicate)
Definition: z3py.py:7595
def get_rule_names_along_trace (   self)
retrieve rule names along the counterexample trace

Definition at line 7587 of file z3py.py.

7588  """retrieve rule names along the counterexample trace"""
7589  # this is a hack as I don't know how to return a list of symbols from C++;
7590  # obtain names as a single string separated by semicolons
7591  names = _symbol2py(self.ctx, Z3_fixedpoint_get_rule_names_along_trace(self.ctx.ref(), self.fixedpoint))
7592  # split into individual names
7593  return names.split(";")
7594 
def get_rule_names_along_trace(self)
Definition: z3py.py:7587
def get_rules (   self)
retrieve rules that have been added to fixedpoint context

Definition at line 7636 of file z3py.py.

7636  def get_rules(self):
7637  """retrieve rules that have been added to fixedpoint context"""
7638  return AstVector(Z3_fixedpoint_get_rules(self.ctx.ref(), self.fixedpoint), self.ctx)
7639 
def get_rules(self)
Definition: z3py.py:7636
Z3_ast_vector Z3_API Z3_fixedpoint_get_rules(Z3_context c, Z3_fixedpoint f)
Retrieve set of rules from fixedpoint context.
def get_rules_along_trace (   self)
retrieve rules along the counterexample trace

Definition at line 7583 of file z3py.py.

7584  """retrieve rules along the counterexample trace"""
7585  return AstVector(Z3_fixedpoint_get_rules_along_trace(self.ctx.ref(), self.fixedpoint), self.ctx)
7586 
def get_rules_along_trace(self)
Definition: z3py.py:7583
def help (   self)
Display a string describing all available options.

Definition at line 7457 of file z3py.py.

7457  def help(self):
7458  """Display a string describing all available options."""
7459  print(Z3_fixedpoint_get_help(self.ctx.ref(), self.fixedpoint))
7460 
Z3_string Z3_API Z3_fixedpoint_get_help(Z3_context c, Z3_fixedpoint f)
Return a string describing all fixedpoint available parameters.
def help(self)
Definition: z3py.py:7457
def insert (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 7491 of file z3py.py.

7491  def insert(self, *args):
7492  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
7493  self.assert_exprs(*args)
7494 
def assert_exprs(self, args)
Definition: z3py.py:7465
def insert(self, args)
Definition: z3py.py:7491
def param_descrs (   self)
Return the parameter description set.

Definition at line 7461 of file z3py.py.

7461  def param_descrs(self):
7462  """Return the parameter description set."""
7463  return ParamDescrsRef(Z3_fixedpoint_get_param_descrs(self.ctx.ref(), self.fixedpoint), self.ctx)
7464 
def param_descrs(self)
Definition: z3py.py:7461
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.
def parse_file (   self,
  f 
)
Parse rules and queries from a file

Definition at line 7632 of file z3py.py.

7632  def parse_file(self, f):
7633  """Parse rules and queries from a file"""
7634  return AstVector(Z3_fixedpoint_from_file(self.ctx.ref(), self.fixedpoint, f), self.ctx)
7635 
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...
def parse_file(self, f)
Definition: z3py.py:7632
def parse_string (   self,
  s 
)
Parse rules and queries from a string

Definition at line 7628 of file z3py.py.

7628  def parse_string(self, s):
7629  """Parse rules and queries from a string"""
7630  return AstVector(Z3_fixedpoint_from_string(self.ctx.ref(), self.fixedpoint, s), self.ctx)
7631 
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...
def parse_string(self, s)
Definition: z3py.py:7628
def query (   self,
  query 
)
Query the fixedpoint engine whether formula is derivable.
   You can also pass an tuple or list of recursive predicates.

Definition at line 7526 of file z3py.py.

7526  def query(self, *query):
7527  """Query the fixedpoint engine whether formula is derivable.
7528  You can also pass an tuple or list of recursive predicates.
7529  """
7530  query = _get_args(query)
7531  sz = len(query)
7532  if sz >= 1 and isinstance(query[0], FuncDeclRef):
7533  _decls = (FuncDecl * sz)()
7534  i = 0
7535  for q in query:
7536  _decls[i] = q.ast
7537  i = i + 1
7538  r = Z3_fixedpoint_query_relations(self.ctx.ref(), self.fixedpoint, sz, _decls)
7539  else:
7540  if sz == 1:
7541  query = query[0]
7542  else:
7543  query = And(query, self.ctx)
7544  query = self.abstract(query, False)
7545  r = Z3_fixedpoint_query(self.ctx.ref(), self.fixedpoint, query.as_ast())
7546  return CheckSatResult(r)
7547 
def And(args)
Definition: z3py.py:1845
def abstract
Definition: z3py.py:7681
def query(self, query)
Definition: z3py.py:7526
Z3_lbool Z3_API Z3_fixedpoint_query(Z3_context c, Z3_fixedpoint d, Z3_ast query)
Pose a query against the asserted rules.
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.
def query_from_lvl (   self,
  lvl,
  query 
)
Query the fixedpoint engine whether formula is derivable starting at the given query level.

Definition at line 7548 of file z3py.py.

7548  def query_from_lvl(self, lvl, *query):
7549  """Query the fixedpoint engine whether formula is derivable starting at the given query level.
7550  """
7551  query = _get_args(query)
7552  sz = len(query)
7553  if sz >= 1 and isinstance(query[0], FuncDecl):
7554  _z3_assert(False, "unsupported")
7555  else:
7556  if sz == 1:
7557  query = query[0]
7558  else:
7559  query = And(query)
7560  query = self.abstract(query, False)
7561  r = Z3_fixedpoint_query_from_lvl(self.ctx.ref(), self.fixedpoint, query.as_ast(), lvl)
7562  return CheckSatResult(r)
7563 
def And(args)
Definition: z3py.py:1845
def abstract
Definition: z3py.py:7681
def query_from_lvl(self, lvl, query)
Definition: z3py.py:7548
def reason_unknown (   self)
Return a string describing why the last `query()` returned `unknown`.

Definition at line 7667 of file z3py.py.

7667  def reason_unknown(self):
7668  """Return a string describing why the last `query()` returned `unknown`.
7669  """
7670  return Z3_fixedpoint_get_reason_unknown(self.ctx.ref(), self.fixedpoint)
7671 
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. ...
def reason_unknown(self)
Definition: z3py.py:7667
def register_relation (   self,
  relations 
)
Register relation as recursive

Definition at line 7612 of file z3py.py.

7612  def register_relation(self, *relations):
7613  """Register relation as recursive"""
7614  relations = _get_args(relations)
7615  for f in relations:
7616  Z3_fixedpoint_register_relation(self.ctx.ref(), self.fixedpoint, f.ast)
7617 
def register_relation(self, relations)
Definition: z3py.py:7612
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...
def rule (   self,
  head,
  body = None,
  name = None 
)
Assert rules defining recursive predicates to the fixedpoint solver. Alias for add_rule.

Definition at line 7518 of file z3py.py.

7518  def rule(self, head, body=None, name=None):
7519  """Assert rules defining recursive predicates to the fixedpoint solver. Alias for add_rule."""
7520  self.add_rule(head, body, name)
7521 
def add_rule
Definition: z3py.py:7495
def set (   self,
  args,
  keys 
)
Set a configuration option. The method `help()` return a string containing all available options.

Definition at line 7451 of file z3py.py.

7451  def set(self, *args, **keys):
7452  """Set a configuration option. The method `help()` return a string containing all available options.
7453  """
7454  p = args2params(args, keys, self.ctx)
7455  Z3_fixedpoint_set_params(self.ctx.ref(), self.fixedpoint, p.params)
7456 
def args2params
Definition: z3py.py:5458
def set(self, args, keys)
Definition: z3py.py:7451
void Z3_API Z3_fixedpoint_set_params(Z3_context c, Z3_fixedpoint f, Z3_params p)
Set parameters on fixedpoint context.
def set_predicate_representation (   self,
  f,
  representations 
)
Control how relation is represented

Definition at line 7618 of file z3py.py.

7618  def set_predicate_representation(self, f, *representations):
7619  """Control how relation is represented"""
7620  representations = _get_args(representations)
7621  representations = [to_symbol(s) for s in representations]
7622  sz = len(representations)
7623  args = (Symbol * sz)()
7624  for i in range(sz):
7625  args[i] = representations[i]
7626  Z3_fixedpoint_set_predicate_representation(self.ctx.ref(), self.fixedpoint, f.ast, sz, args)
7627 
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:4085
def set_predicate_representation(self, f, representations)
Definition: z3py.py:7618
def to_symbol
Definition: z3py.py:124
void Z3_API Z3_fixedpoint_set_predicate_representation(Z3_context c, Z3_fixedpoint d, Z3_func_decl f, unsigned num_relations, Z3_symbol const relation_kinds[])
Configure the predicate representation.
def sexpr (   self)
Return a formatted string (in Lisp-like format) with all added constraints.
We say the string is in s-expression format.

Definition at line 7648 of file z3py.py.

Referenced by Fixedpoint.__repr__(), and Optimize.__repr__().

7648  def sexpr(self):
7649  """Return a formatted string (in Lisp-like format) with all added constraints.
7650  We say the string is in s-expression format.
7651  """
7652  return Z3_fixedpoint_to_string(self.ctx.ref(), self.fixedpoint, 0, (Ast * 0)())
7653 
def sexpr(self)
Definition: z3py.py:7648
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.
def statistics (   self)
Return statistics for the last `query()`.

Definition at line 7662 of file z3py.py.

7662  def statistics(self):
7663  """Return statistics for the last `query()`.
7664  """
7665  return Statistics(Z3_fixedpoint_get_statistics(self.ctx.ref(), self.fixedpoint), self.ctx)
7666 
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.
Statistics.
Definition: z3py.py:6704
def statistics(self)
Definition: z3py.py:7662
def to_string (   self,
  queries 
)
Return a formatted string (in Lisp-like format) with all added constraints.
   We say the string is in s-expression format.
   Include also queries.

Definition at line 7654 of file z3py.py.

7654  def to_string(self, queries):
7655  """Return a formatted string (in Lisp-like format) with all added constraints.
7656  We say the string is in s-expression format.
7657  Include also queries.
7658  """
7659  args, len = _to_ast_array(queries)
7660  return Z3_fixedpoint_to_string(self.ctx.ref(), self.fixedpoint, len, args)
7661 
def to_string(self, queries)
Definition: z3py.py:7654
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.
def update_rule (   self,
  head,
  body,
  name 
)
update rule

Definition at line 7564 of file z3py.py.

7564  def update_rule(self, head, body, name):
7565  """update rule"""
7566  if name is None:
7567  name = ""
7568  name = to_symbol(name, self.ctx)
7569  body = _get_args(body)
7570  f = self.abstract(Implies(And(body, self.ctx), head))
7571  Z3_fixedpoint_update_rule(self.ctx.ref(), self.fixedpoint, f.as_ast(), name)
7572 
def update_rule(self, head, body, name)
Definition: z3py.py:7564
def Implies
Definition: z3py.py:1781
def And(args)
Definition: z3py.py:1845
def abstract
Definition: z3py.py:7681
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. ...
def to_symbol
Definition: z3py.py:124

Field Documentation

ctx
fixedpoint
vars

Definition at line 7442 of file z3py.py.

Referenced by Fixedpoint.abstract(), and Fixedpoint.declare_var().