Public Member Functions | |
def | __init__ (self, entry, ctx) |
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 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() 3 >>> e = f_i.entry(0) >>> e [0, 1, 10] >>> e.num_args() 2 >>> e.arg_value(0) 0 >>> e.arg_value(1) 1 >>> try: ... e.arg_value(2) ... except IndexError: ... print("index error") index error
Definition at line 5146 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() 3 >>> e = f_i.entry(0) >>> e.as_list() [0, 1, 10]
Definition at line 5199 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() 3 >>> e = f_i.entry(0) >>> e.num_args() 2
Definition at line 5128 of file z3py.py.
Referenced by 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() 3 >>> e = f_i.entry(0) >>> e [0, 1, 10] >>> e.num_args() 2 >>> e.value() 10
Definition at line 5177 of file z3py.py.
Referenced by FuncEntry.as_list().
ctx |
Definition at line 5122 of file z3py.py.
Referenced by 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(), Fixedpoint.assert_exprs(), ApplyResult.convert_model(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_rules(), Optimize.model(), Fixedpoint.param_descrs(), Optimize.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Fixedpoint.query(), Fixedpoint.set(), Optimize.set(), Tactic.solver(), Fixedpoint.statistics(), Optimize.statistics(), Solver.to_smt2(), Fixedpoint.update_rule(), and FuncEntry.value().
entry |
Definition at line 5121 of file z3py.py.
Referenced by FuncEntry.__del__(), FuncEntry.arg_value(), FuncEntry.num_args(), and FuncEntry.value().