Public Member Functions | |
| def | __init__ (self, stats, ctx) |
| def | __del__ (self) |
| def | __repr__ (self) |
| def | __len__ (self) |
| def | __getitem__ (self, idx) |
| def | keys (self) |
| def | get_key_value (self, key) |
| def | __getattr__ (self, name) |
Data Fields | |
| stats | |
| ctx | |
| def __init__ | ( | self, | |
| stats, | |||
| ctx | |||
| ) |
| def __del__ | ( | self | ) |
| def __getattr__ | ( | self, | |
| name | |||
| ) |
Access the value of statistical using attributes.
Remark: to access a counter containing blank spaces (e.g., 'nlsat propagations'),
we should use '_' (e.g., 'nlsat_propagations').
>>> x = Int('x')
>>> s = Then('simplify', 'nlsat').solver()
>>> s.add(x > 0)
>>> s.check()
sat
>>> st = s.statistics()
>>> st.keys()
['nlsat propagations', 'nlsat stages']
>>> st.nlsat_propagations
2
>>> st.nlsat_stages
2
Definition at line 5645 of file z3py.py.
| def __getitem__ | ( | self, | |
| idx | |||
| ) |
Return the value of statistical counter at position `idx`. The result is a pair (key, value).
>>> x = Int('x')
>>> s = Then('simplify', 'nlsat').solver()
>>> s.add(x > 0)
>>> s.check()
sat
>>> st = s.statistics()
>>> len(st)
2
>>> st[0]
('nlsat propagations', 2)
>>> st[1]
('nlsat stages', 2)
Definition at line 5587 of file z3py.py.
| def __len__ | ( | self | ) |
Return the number of statistical counters.
>>> x = Int('x')
>>> s = Then('simplify', 'nlsat').solver()
>>> s.add(x > 0)
>>> s.check()
sat
>>> st = s.statistics()
>>> len(st)
2
Definition at line 5573 of file z3py.py.
| def __repr__ | ( | self | ) |
| def get_key_value | ( | self, | |
| key | |||
| ) |
Return the value of a particular statistical counter.
>>> x = Int('x')
>>> s = Then('simplify', 'nlsat').solver()
>>> s.add(x > 0)
>>> s.check()
sat
>>> st = s.statistics()
>>> st.get_key_value('nlsat propagations')
2
Definition at line 5625 of file z3py.py.
Referenced by Statistics.__getattr__().
| def keys | ( | self | ) |
Return the list of statistical counters.
>>> x = Int('x')
>>> s = Then('simplify', 'nlsat').solver()
>>> s.add(x > 0)
>>> s.check()
sat
>>> st = s.statistics()
>>> st.keys()
['nlsat propagations', 'nlsat stages']
Definition at line 5611 of file z3py.py.
| ctx |
Definition at line 5549 of file z3py.py.
Referenced by Probe.__eq__(), Probe.__ge__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), Probe.__lt__(), Probe.__ne__(), Fixedpoint.add_rule(), Tactic.apply(), ApplyResult.as_expr(), Solver.assert_and_track(), Solver.assert_exprs(), Fixedpoint.assert_exprs(), Solver.assertions(), ApplyResult.convert_model(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_rules(), Solver.model(), Solver.param_descrs(), Fixedpoint.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Solver.proof(), Solver.set(), Fixedpoint.set(), Tactic.solver(), Solver.statistics(), Fixedpoint.statistics(), Solver.to_smt2(), Solver.unsat_core(), and Fixedpoint.update_rule().
| stats |
Definition at line 5548 of file z3py.py.
Referenced by Statistics.__del__(), Statistics.__getitem__(), Statistics.__len__(), Statistics.__repr__(), Statistics.get_key_value(), and Statistics.keys().
1.8.9.1