Quantifiers. More...
Inheritance diagram for QuantifierRef:Public Member Functions | |
| def | as_ast |
| def | sort |
| def | is_forall |
| def | weight |
| def | num_patterns |
| def | pattern |
| def | num_no_patterns |
| def | no_pattern |
| def | body |
| def | num_vars |
| def | var_name |
| def | var_sort |
| def | children |
Public Member Functions inherited from BoolRef | |
| def | sort |
Public Member Functions inherited from ExprRef | |
| def | as_ast |
| def | sort |
| def | sort_kind |
| def | __eq__ |
| def | __ne__ |
| def | decl |
| def | num_args |
| def | arg |
| def | children |
Public Member Functions inherited from AstRef | |
| def | __init__ |
| def | __del__ |
| def | __str__ |
| def | __repr__ |
| def | sexpr |
| def | as_ast |
| def | ctx_ref |
| def | eq |
| def | translate |
| def | hash |
Public Member Functions inherited from Z3PPObject | |
| def | use_pp |
Additional Inherited Members | |
Data Fields inherited from AstRef | |
| ast | |
| ctx | |
Quantifiers.
Universally and Existentially quantified formulas.
| def body | ( | self | ) |
Return the expression being quantified.
>>> f = Function('f', IntSort(), IntSort())
>>> x = Int('x')
>>> q = ForAll(x, f(x) == 0)
>>> q.body()
f(Var(0)) == 0
Definition at line 1582 of file z3py.py.
Referenced by QuantifierRef.children().
| def children | ( | self | ) |
Return a list containing a single element self.body()
>>> f = Function('f', IntSort(), IntSort())
>>> x = Int('x')
>>> q = ForAll(x, f(x) == 0)
>>> q.children()
[f(Var(0)) == 0]
| def is_forall | ( | self | ) |
| def num_no_patterns | ( | self | ) |
Return the number of no-patterns.
Definition at line 1572 of file z3py.py.
Referenced by QuantifierRef.no_pattern().
| def num_patterns | ( | self | ) |
Return the number of patterns (i.e., quantifier instantiation hints) in `self`.
>>> f = Function('f', IntSort(), IntSort())
>>> g = Function('g', IntSort(), IntSort())
>>> x = Int('x')
>>> q = ForAll(x, f(x) != g(x), patterns = [ f(x), g(x) ])
>>> q.num_patterns()
2
Definition at line 1542 of file z3py.py.
| def num_vars | ( | self | ) |
| def pattern | ( | self, | |
| idx | |||
| ) |
Return a pattern (i.e., quantifier instantiation hints) in `self`.
>>> f = Function('f', IntSort(), IntSort())
>>> g = Function('g', IntSort(), IntSort())
>>> x = Int('x')
>>> q = ForAll(x, f(x) != g(x), patterns = [ f(x), g(x) ])
>>> q.num_patterns()
2
>>> q.pattern(0)
f(Var(0))
>>> q.pattern(1)
g(Var(0))
Definition at line 1554 of file z3py.py.
| def sort | ( | self | ) |
| def var_name | ( | self, | |
| idx | |||
| ) |
| def var_sort | ( | self, | |
| idx | |||
| ) |
| def weight | ( | self | ) |
1.8.2