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 7323 of file z3py.py.

Constructor & Destructor Documentation

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

Definition at line 7326 of file z3py.py.

7326  def __init__(self, fixedpoint=None, ctx=None):
7327  assert fixedpoint is None or ctx is not None
7328  self.ctx = _get_ctx(ctx)
7329  self.fixedpoint = None
7330  if fixedpoint is None:
7331  self.fixedpoint = Z3_mk_fixedpoint(self.ctx.ref())
7332  else:
7333  self.fixedpoint = fixedpoint
7334  Z3_fixedpoint_inc_ref(self.ctx.ref(), self.fixedpoint)
7335  self.vars = []
7336 
Z3_fixedpoint Z3_API Z3_mk_fixedpoint(Z3_context c)
Create a new fixedpoint context.
def __init__
Definition: z3py.py:7326
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 7340 of file z3py.py.

7340  def __del__(self):
7341  if self.fixedpoint is not None and self.ctx.ref() is not None:
7342  Z3_fixedpoint_dec_ref(self.ctx.ref(), self.fixedpoint)
7343 
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:7340

Member Function Documentation

def __deepcopy__ (   self,
  memo = {} 
)

Definition at line 7337 of file z3py.py.

7337  def __deepcopy__(self, memo={}):
7338  return FixedPoint(self.fixedpoint, self.ctx)
7339 
def __deepcopy__
Definition: z3py.py:7337
def __iadd__ (   self,
  fml 
)

Definition at line 7376 of file z3py.py.

7376  def __iadd__(self, fml):
7377  self.add(fml)
7378  return self
7379 
def add(self, args)
Definition: z3py.py:7372
def __iadd__(self, fml)
Definition: z3py.py:7376
def __repr__ (   self)
Return a formatted string with all added rules and constraints.

Definition at line 7537 of file z3py.py.

7537  def __repr__(self):
7538  """Return a formatted string with all added rules and constraints."""
7539  return self.sexpr()
7540 
def __repr__(self)
Definition: z3py.py:7537
def sexpr(self)
Definition: z3py.py:7541
def abstract (   self,
  fml,
  is_forall = True 
)

Definition at line 7574 of file z3py.py.

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

7574  def abstract(self, fml, is_forall=True):
7575  if self.vars == []:
7576  return fml
7577  if is_forall:
7578  return ForAll(self.vars, fml)
7579  else:
7580  return Exists(self.vars, fml)
7581 
7582 
def Exists
Definition: z3py.py:2207
def ForAll
Definition: z3py.py:2189
def abstract
Definition: z3py.py:7574
def add (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 7372 of file z3py.py.

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

7372  def add(self, *args):
7373  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
7374  self.assert_exprs(*args)
7375 
def assert_exprs(self, args)
Definition: z3py.py:7358
def add(self, args)
Definition: z3py.py:7372
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 7499 of file z3py.py.

7499  def add_cover(self, level, predicate, property):
7500  """Add property to predicate for the level'th unfolding.
7501  -1 is treated as infinity (infinity)
7502  """
7503  Z3_fixedpoint_add_cover(self.ctx.ref(), self.fixedpoint, level, predicate.ast, property.ast)
7504 
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:7499
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 7388 of file z3py.py.

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

7388  def add_rule(self, head, body=None, name=None):
7389  """Assert rules defining recursive predicates to the fixedpoint solver.
7390  >>> a = Bool('a')
7391  >>> b = Bool('b')
7392  >>> s = Fixedpoint()
7393  >>> s.register_relation(a.decl())
7394  >>> s.register_relation(b.decl())
7395  >>> s.fact(a)
7396  >>> s.rule(b, a)
7397  >>> s.query(b)
7398  sat
7399  """
7400  if name is None:
7401  name = ""
7402  name = to_symbol(name, self.ctx)
7403  if body is None:
7404  head = self.abstract(head)
7405  Z3_fixedpoint_add_rule(self.ctx.ref(), self.fixedpoint, head.as_ast(), name)
7406  else:
7407  body = _get_args(body)
7408  f = self.abstract(Implies(And(body, self.ctx), head))
7409  Z3_fixedpoint_add_rule(self.ctx.ref(), self.fixedpoint, f.as_ast(), name)
7410 
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:1751
def And(args)
Definition: z3py.py:1815
def abstract
Definition: z3py.py:7574
def add_rule
Definition: z3py.py:7388
def to_symbol
Definition: z3py.py:129
def append (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 7380 of file z3py.py.

7380  def append(self, *args):
7381  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
7382  self.assert_exprs(*args)
7383 
def assert_exprs(self, args)
Definition: z3py.py:7358
def append(self, args)
Definition: z3py.py:7380
def assert_exprs (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver.

Definition at line 7358 of file z3py.py.

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

7358  def assert_exprs(self, *args):
7359  """Assert constraints as background axioms for the fixedpoint solver."""
7360  args = _get_args(args)
7361  s = BoolSort(self.ctx)
7362  for arg in args:
7363  if isinstance(arg, Goal) or isinstance(arg, AstVector):
7364  for f in arg:
7365  f = self.abstract(f)
7366  Z3_fixedpoint_assert(self.ctx.ref(), self.fixedpoint, f.as_ast())
7367  else:
7368  arg = s.cast(arg)
7369  arg = self.abstract(arg)
7370  Z3_fixedpoint_assert(self.ctx.ref(), self.fixedpoint, arg.as_ast())
7371 
def BoolSort
Definition: z3py.py:1657
def assert_exprs(self, args)
Definition: z3py.py:7358
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:7574
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 7565 of file z3py.py.

7565  def declare_var(self, *vars):
7566  """Add variable or several variables.
7567  The added variable or variables will be bound in the rules
7568  and queries
7569  """
7570  vars = _get_args(vars)
7571  for v in vars:
7572  self.vars += [v]
7573 
def declare_var(self, vars)
Definition: z3py.py:7565
def fact (   self,
  head,
  name = None 
)
Assert facts defining recursive predicates to the fixedpoint solver. Alias for add_rule.

Definition at line 7415 of file z3py.py.

7415  def fact(self, head, name=None):
7416  """Assert facts defining recursive predicates to the fixedpoint solver. Alias for add_rule."""
7417  self.add_rule(head, None, name)
7418 
def add_rule
Definition: z3py.py:7388
def get_answer (   self)
Retrieve answer from last query call.

Definition at line 7466 of file z3py.py.

7466  def get_answer(self):
7467  """Retrieve answer from last query call."""
7468  r = Z3_fixedpoint_get_answer(self.ctx.ref(), self.fixedpoint)
7469  return _to_expr_ref(r, self.ctx)
7470 
def get_answer(self)
Definition: z3py.py:7466
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 7533 of file z3py.py.

7533  def get_assertions(self):
7534  """retrieve assertions that have been added to fixedpoint context"""
7535  return AstVector(Z3_fixedpoint_get_assertions(self.ctx.ref(), self.fixedpoint), self.ctx)
7536 
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:7533
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 7492 of file z3py.py.

7492  def get_cover_delta(self, level, predicate):
7493  """Retrieve properties known about predicate for the level'th unfolding.
7494  -1 is treated as the limit (infinity)
7495  """
7496  r = Z3_fixedpoint_get_cover_delta(self.ctx.ref(), self.fixedpoint, level, predicate.ast)
7497  return _to_expr_ref(r, self.ctx)
7498 
def get_cover_delta(self, level, predicate)
Definition: z3py.py:7492
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 7471 of file z3py.py.

7472  """Retrieve a ground cex from last query call."""
7473  r = Z3_fixedpoint_get_ground_sat_answer(self.ctx.ref(), self.fixedpoint)
7474  return _to_expr_ref(r, self.ctx)
7475 
def get_ground_sat_answer(self)
Definition: z3py.py:7471
def get_num_levels (   self,
  predicate 
)
Retrieve number of levels used for predicate in PDR engine

Definition at line 7488 of file z3py.py.

7488  def get_num_levels(self, predicate):
7489  """Retrieve number of levels used for predicate in PDR engine"""
7490  return Z3_fixedpoint_get_num_levels(self.ctx.ref(), self.fixedpoint, predicate.ast)
7491 
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:7488
def get_rule_names_along_trace (   self)
retrieve rule names along the counterexample trace

Definition at line 7480 of file z3py.py.

7481  """retrieve rule names along the counterexample trace"""
7482  # this is a hack as I don't know how to return a list of symbols from C++;
7483  # obtain names as a single string separated by semicolons
7484  names = _symbol2py(self.ctx, Z3_fixedpoint_get_rule_names_along_trace(self.ctx.ref(), self.fixedpoint))
7485  # split into individual names
7486  return names.split(";")
7487 
def get_rule_names_along_trace(self)
Definition: z3py.py:7480
def get_rules (   self)
retrieve rules that have been added to fixedpoint context

Definition at line 7529 of file z3py.py.

7529  def get_rules(self):
7530  """retrieve rules that have been added to fixedpoint context"""
7531  return AstVector(Z3_fixedpoint_get_rules(self.ctx.ref(), self.fixedpoint), self.ctx)
7532 
def get_rules(self)
Definition: z3py.py:7529
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 7476 of file z3py.py.

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

Definition at line 7350 of file z3py.py.

7350  def help(self):
7351  """Display a string describing all available options."""
7352  print(Z3_fixedpoint_get_help(self.ctx.ref(), self.fixedpoint))
7353 
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:7350
def insert (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 7384 of file z3py.py.

7384  def insert(self, *args):
7385  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
7386  self.assert_exprs(*args)
7387 
def assert_exprs(self, args)
Definition: z3py.py:7358
def insert(self, args)
Definition: z3py.py:7384
def param_descrs (   self)
Return the parameter description set.

Definition at line 7354 of file z3py.py.

7354  def param_descrs(self):
7355  """Return the parameter description set."""
7356  return ParamDescrsRef(Z3_fixedpoint_get_param_descrs(self.ctx.ref(), self.fixedpoint), self.ctx)
7357 
def param_descrs(self)
Definition: z3py.py:7354
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 7525 of file z3py.py.

7525  def parse_file(self, f):
7526  """Parse rules and queries from a file"""
7527  return AstVector(Z3_fixedpoint_from_file(self.ctx.ref(), self.fixedpoint, f), self.ctx)
7528 
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:7525
def parse_string (   self,
  s 
)
Parse rules and queries from a string

Definition at line 7521 of file z3py.py.

7521  def parse_string(self, s):
7522  """Parse rules and queries from a string"""
7523  return AstVector(Z3_fixedpoint_from_string(self.ctx.ref(), self.fixedpoint, s), self.ctx)
7524 
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:7521
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 7419 of file z3py.py.

7419  def query(self, *query):
7420  """Query the fixedpoint engine whether formula is derivable.
7421  You can also pass an tuple or list of recursive predicates.
7422  """
7423  query = _get_args(query)
7424  sz = len(query)
7425  if sz >= 1 and isinstance(query[0], FuncDeclRef):
7426  _decls = (FuncDecl * sz)()
7427  i = 0
7428  for q in query:
7429  _decls[i] = q.ast
7430  i = i + 1
7431  r = Z3_fixedpoint_query_relations(self.ctx.ref(), self.fixedpoint, sz, _decls)
7432  else:
7433  if sz == 1:
7434  query = query[0]
7435  else:
7436  query = And(query, self.ctx)
7437  query = self.abstract(query, False)
7438  r = Z3_fixedpoint_query(self.ctx.ref(), self.fixedpoint, query.as_ast())
7439  return CheckSatResult(r)
7440 
def And(args)
Definition: z3py.py:1815
def abstract
Definition: z3py.py:7574
def query(self, query)
Definition: z3py.py:7419
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 7441 of file z3py.py.

7441  def query_from_lvl(self, lvl, *query):
7442  """Query the fixedpoint engine whether formula is derivable starting at the given query level.
7443  """
7444  query = _get_args(query)
7445  sz = len(query)
7446  if sz >= 1 and isinstance(query[0], FuncDecl):
7447  _z3_assert(False, "unsupported")
7448  else:
7449  if sz == 1:
7450  query = query[0]
7451  else:
7452  query = And(query)
7453  query = self.abstract(query, False)
7454  r = Z3_fixedpoint_query_from_lvl(self.ctx.ref(), self.fixedpoint, query.as_ast(), lvl)
7455  return CheckSatResult(r)
7456 
def And(args)
Definition: z3py.py:1815
def abstract
Definition: z3py.py:7574
def query_from_lvl(self, lvl, query)
Definition: z3py.py:7441
def reason_unknown (   self)
Return a string describing why the last `query()` returned `unknown`.

Definition at line 7560 of file z3py.py.

7560  def reason_unknown(self):
7561  """Return a string describing why the last `query()` returned `unknown`.
7562  """
7563  return Z3_fixedpoint_get_reason_unknown(self.ctx.ref(), self.fixedpoint)
7564 
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:7560
def register_relation (   self,
  relations 
)
Register relation as recursive

Definition at line 7505 of file z3py.py.

7505  def register_relation(self, *relations):
7506  """Register relation as recursive"""
7507  relations = _get_args(relations)
7508  for f in relations:
7509  Z3_fixedpoint_register_relation(self.ctx.ref(), self.fixedpoint, f.ast)
7510 
def register_relation(self, relations)
Definition: z3py.py:7505
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 7411 of file z3py.py.

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

Definition at line 7344 of file z3py.py.

7344  def set(self, *args, **keys):
7345  """Set a configuration option. The method `help()` return a string containing all available options.
7346  """
7347  p = args2params(args, keys, self.ctx)
7348  Z3_fixedpoint_set_params(self.ctx.ref(), self.fixedpoint, p.params)
7349 
def args2params
Definition: z3py.py:5398
def set(self, args, keys)
Definition: z3py.py:7344
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 7511 of file z3py.py.

7511  def set_predicate_representation(self, f, *representations):
7512  """Control how relation is represented"""
7513  representations = _get_args(representations)
7514  representations = [to_symbol(s) for s in representations]
7515  sz = len(representations)
7516  args = (Symbol * sz)()
7517  for i in range(sz):
7518  args[i] = representations[i]
7519  Z3_fixedpoint_set_predicate_representation(self.ctx.ref(), self.fixedpoint, f.ast, sz, args)
7520 
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3794
def set_predicate_representation(self, f, representations)
Definition: z3py.py:7511
def to_symbol
Definition: z3py.py:129
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 7541 of file z3py.py.

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

7541  def sexpr(self):
7542  """Return a formatted string (in Lisp-like format) with all added constraints.
7543  We say the string is in s-expression format.
7544  """
7545  return Z3_fixedpoint_to_string(self.ctx.ref(), self.fixedpoint, 0, (Ast * 0)())
7546 
def sexpr(self)
Definition: z3py.py:7541
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 7555 of file z3py.py.

7555  def statistics(self):
7556  """Return statistics for the last `query()`.
7557  """
7558  return Statistics(Z3_fixedpoint_get_statistics(self.ctx.ref(), self.fixedpoint), self.ctx)
7559 
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:6613
def statistics(self)
Definition: z3py.py:7555
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 7547 of file z3py.py.

7547  def to_string(self, queries):
7548  """Return a formatted string (in Lisp-like format) with all added constraints.
7549  We say the string is in s-expression format.
7550  Include also queries.
7551  """
7552  args, len = _to_ast_array(queries)
7553  return Z3_fixedpoint_to_string(self.ctx.ref(), self.fixedpoint, len, args)
7554 
def to_string(self, queries)
Definition: z3py.py:7547
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 7457 of file z3py.py.

7457  def update_rule(self, head, body, name):
7458  """update rule"""
7459  if name is None:
7460  name = ""
7461  name = to_symbol(name, self.ctx)
7462  body = _get_args(body)
7463  f = self.abstract(Implies(And(body, self.ctx), head))
7464  Z3_fixedpoint_update_rule(self.ctx.ref(), self.fixedpoint, f.as_ast(), name)
7465 
def update_rule(self, head, body, name)
Definition: z3py.py:7457
def Implies
Definition: z3py.py:1751
def And(args)
Definition: z3py.py:1815
def abstract
Definition: z3py.py:7574
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:129

Field Documentation

ctx
fixedpoint
vars

Definition at line 7335 of file z3py.py.

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