Inheritance diagram for FuncInterp:Public Member Functions | |
| def | __init__ (self, f, ctx) |
| def | __del__ (self) |
| def | else_value (self) |
| def | num_entries (self) |
| def | arity (self) |
| def | entry (self, idx) |
| def | as_list (self) |
| def | __repr__ (self) |
Public Member Functions inherited from Z3PPObject | |
| def | use_pp (self) |
Data Fields | |
| f | |
| ctx | |
| def __init__ | ( | self, | |
| f, | |||
| ctx | |||
| ) |
| def __del__ | ( | self | ) |
| def __repr__ | ( | self | ) |
| def arity | ( | self | ) |
Return the number of arguments for each entry in the function interpretation `self`.
>>> f = Function('f', IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0) == 1, f(1) == 1, f(2) == 0)
>>> s.check()
sat
>>> m = s.model()
>>> m[f].arity()
1
Definition at line 5397 of file z3py.py.
| def as_list | ( | self | ) |
Return the function interpretation as a Python list.
>>> f = Function('f', IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0) == 1, f(1) == 1, f(2) == 0)
>>> s.check()
sat
>>> m = s.model()
>>> m[f]
[0 -> 1, 1 -> 1, 2 -> 0, else -> 1]
>>> m[f].as_list()
[[0, 1], [1, 1], [2, 0], 1]
Definition at line 5435 of file z3py.py.
| def else_value | ( | self | ) |
Return the `else` value for a function interpretation.
Return None if Z3 did not specify the `else` value for
this object.
>>> f = Function('f', IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0) == 1, f(1) == 1, f(2) == 0)
>>> s.check()
sat
>>> m = s.model()
>>> m[f]
[0 -> 1, 1 -> 1, 2 -> 0, else -> 1]
>>> m[f].else_value()
1
Definition at line 5358 of file z3py.py.
Referenced by FuncInterp.as_list().
| def entry | ( | self, | |
| idx | |||
| ) |
Return an entry at position `idx < self.num_entries()` in the function interpretation `self`.
>>> f = Function('f', IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0) == 1, f(1) == 1, f(2) == 0)
>>> s.check()
sat
>>> m = s.model()
>>> m[f]
[0 -> 1, 1 -> 1, 2 -> 0, else -> 1]
>>> m[f].num_entries()
3
>>> m[f].entry(0)
[0, 1]
>>> m[f].entry(1)
[1, 1]
>>> m[f].entry(2)
[2, 0]
Definition at line 5411 of file z3py.py.
Referenced by FuncInterp.as_list().
| def num_entries | ( | self | ) |
Return the number of entries/points in the function interpretation `self`.
>>> f = Function('f', IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0) == 1, f(1) == 1, f(2) == 0)
>>> s.check()
sat
>>> m = s.model()
>>> m[f]
[0 -> 1, 1 -> 1, 2 -> 0, else -> 1]
>>> m[f].num_entries()
3
Definition at line 5381 of file z3py.py.
Referenced by FuncInterp.as_list(), and FuncInterp.entry().
| ctx |
Definition at line 5350 of file z3py.py.
Referenced by Probe.__call__(), FuncInterp.__del__(), ModelRef.__del__(), Statistics.__del__(), Solver.__del__(), Fixedpoint.__del__(), Optimize.__del__(), ApplyResult.__del__(), Tactic.__del__(), Probe.__del__(), Probe.__eq__(), Probe.__ge__(), ModelRef.__getitem__(), Statistics.__getitem__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), ModelRef.__len__(), Statistics.__len__(), ApplyResult.__len__(), Probe.__lt__(), Probe.__ne__(), Statistics.__repr__(), Fixedpoint.add_cover(), Fixedpoint.add_rule(), Optimize.add_soft(), Tactic.apply(), FuncInterp.arity(), ApplyResult.as_expr(), Solver.assert_and_track(), Solver.assert_exprs(), Fixedpoint.assert_exprs(), Optimize.assert_exprs(), Solver.assertions(), Optimize.assertions(), Solver.check(), Optimize.check(), Solver.consequences(), ApplyResult.convert_model(), ModelRef.decls(), FuncInterp.else_value(), FuncInterp.entry(), ModelRef.eval(), Optimize.from_file(), Optimize.from_string(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), ModelRef.get_interp(), Statistics.get_key_value(), Fixedpoint.get_num_levels(), Fixedpoint.get_rules(), ModelRef.get_sort(), ModelRef.get_universe(), Solver.help(), Fixedpoint.help(), Optimize.help(), Tactic.help(), Statistics.keys(), Optimize.maximize(), Optimize.minimize(), Solver.model(), Optimize.model(), FuncInterp.num_entries(), ModelRef.num_sorts(), Optimize.objectives(), Solver.param_descrs(), Fixedpoint.param_descrs(), Optimize.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Solver.pop(), Fixedpoint.pop(), Optimize.pop(), Solver.proof(), Solver.push(), Fixedpoint.push(), Optimize.push(), Fixedpoint.query(), Solver.reason_unknown(), Fixedpoint.reason_unknown(), Optimize.reason_unknown(), Fixedpoint.register_relation(), Solver.reset(), Solver.set(), Fixedpoint.set(), Optimize.set(), Fixedpoint.set_predicate_representation(), ModelRef.sexpr(), Solver.sexpr(), Fixedpoint.sexpr(), Optimize.sexpr(), ApplyResult.sexpr(), Tactic.solver(), Solver.statistics(), Fixedpoint.statistics(), Optimize.statistics(), Solver.to_smt2(), Fixedpoint.to_string(), Solver.translate(), Solver.unsat_core(), and Fixedpoint.update_rule().
| f |
Definition at line 5349 of file z3py.py.
Referenced by FuncInterp.__del__(), FuncInterp.arity(), FuncInterp.else_value(), FuncInterp.entry(), and FuncInterp.num_entries().
1.8.15