Public Member Functions | |
| def | __init__ (self, entry, ctx) |
| def | __deepcopy__ |
| def | __del__ (self) |
| def | num_args (self) |
| def | arg_value (self, idx) |
| def | value (self) |
| def | as_list (self) |
| def | __repr__ (self) |
Data Fields | |
| entry | |
| ctx | |
Store the value of the interpretation of a function in a particular point.
| def __init__ | ( | self, | |
| entry, | |||
| ctx | |||
| ) |
| def __del__ | ( | self | ) |
| def __deepcopy__ | ( | self, | |
memo = {} |
|||
| ) |
Definition at line 6080 of file z3py.py.
| def arg_value | ( | self, | |
| idx | |||
| ) |
Return the value of argument `idx`.
>>> f = Function('f', IntSort(), IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0, 1) == 10, f(1, 2) == 20, f(1, 0) == 10)
>>> s.check()
sat
>>> m = s.model()
>>> f_i = m[f]
>>> f_i.num_entries()
1
>>> e = f_i.entry(0)
>>> e
[1, 2, 20]
>>> e.num_args()
2
>>> e.arg_value(0)
1
>>> e.arg_value(1)
2
>>> try:
... e.arg_value(2)
... except IndexError:
... print("index error")
index error
Definition at line 6105 of file z3py.py.
| def as_list | ( | self | ) |
Return entry `self` as a Python list.
>>> f = Function('f', IntSort(), IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0, 1) == 10, f(1, 2) == 20, f(1, 0) == 10)
>>> s.check()
sat
>>> m = s.model()
>>> f_i = m[f]
>>> f_i.num_entries()
1
>>> e = f_i.entry(0)
>>> e.as_list()
[1, 2, 20]
Definition at line 6158 of file z3py.py.
Referenced by FuncEntry.__repr__().
| def num_args | ( | self | ) |
Return the number of arguments in the given entry.
>>> f = Function('f', IntSort(), IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0, 1) == 10, f(1, 2) == 20, f(1, 0) == 10)
>>> s.check()
sat
>>> m = s.model()
>>> f_i = m[f]
>>> f_i.num_entries()
1
>>> e = f_i.entry(0)
>>> e.num_args()
2
Definition at line 6087 of file z3py.py.
Referenced by AstRef.__bool__(), FuncEntry.arg_value(), and FuncEntry.as_list().
| def value | ( | self | ) |
Return the value of the function at point `self`.
>>> f = Function('f', IntSort(), IntSort(), IntSort())
>>> s = Solver()
>>> s.add(f(0, 1) == 10, f(1, 2) == 20, f(1, 0) == 10)
>>> s.check()
sat
>>> m = s.model()
>>> f_i = m[f]
>>> f_i.num_entries()
1
>>> e = f_i.entry(0)
>>> e
[1, 2, 20]
>>> e.num_args()
2
>>> e.value()
20
Definition at line 6136 of file z3py.py.
Referenced by FuncEntry.as_list().
| ctx |
Definition at line 6077 of file z3py.py.
Referenced by FuncEntry.__deepcopy__(), Fixedpoint.__deepcopy__(), Optimize.__deepcopy__(), ApplyResult.__deepcopy__(), Tactic.__deepcopy__(), Probe.__deepcopy__(), Probe.__eq__(), Probe.__ge__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), Probe.__lt__(), Probe.__ne__(), Fixedpoint.add_rule(), Optimize.add_soft(), Tactic.apply(), FuncEntry.arg_value(), ApplyResult.as_expr(), Optimize.assert_and_track(), Fixedpoint.assert_exprs(), Optimize.assert_exprs(), Optimize.assertions(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_ground_sat_answer(), Fixedpoint.get_rule_names_along_trace(), Fixedpoint.get_rules(), Fixedpoint.get_rules_along_trace(), Optimize.model(), Optimize.objectives(), Fixedpoint.param_descrs(), Optimize.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Fixedpoint.query(), Fixedpoint.set(), Optimize.set(), Optimize.set_on_model(), Tactic.solver(), Fixedpoint.statistics(), Optimize.statistics(), Solver.to_smt2(), Optimize.unsat_core(), Fixedpoint.update_rule(), and FuncEntry.value().
| entry |
Definition at line 6076 of file z3py.py.
Referenced by FuncEntry.__deepcopy__(), FuncEntry.__del__(), FuncEntry.arg_value(), FuncEntry.num_args(), and FuncEntry.value().
1.8.10