Quantifiers. More...
Public Member Functions | |
def | as_ast (self) |
def | get_id (self) |
def | sort (self) |
def | is_forall (self) |
def | weight (self) |
def | num_patterns (self) |
def | pattern (self, idx) |
def | num_no_patterns (self) |
def | no_pattern (self, idx) |
def | body (self) |
def | num_vars (self) |
def | var_name (self, idx) |
def | var_sort (self, idx) |
def | children (self) |
![]() | |
def | sort (self) |
![]() | |
def | as_ast (self) |
def | get_id (self) |
def | sort (self) |
def | sort_kind (self) |
def | __eq__ (self, other) |
def | __ne__ (self, other) |
def | decl (self) |
def | num_args (self) |
def | arg (self, idx) |
def | children (self) |
![]() | |
def | __init__ (self, ast, ctx=None) |
def | __del__ (self) |
def | __str__ (self) |
def | __repr__ (self) |
def | sexpr (self) |
def | as_ast (self) |
def | get_id (self) |
def | ctx_ref (self) |
def | eq (self, other) |
def | translate (self, target) |
def | hash (self) |
![]() | |
def | use_pp (self) |
Additional Inherited Members | |
![]() | |
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 1703 of file z3py.py.
Referenced by QuantifierRef.children().
def children | ( | self | ) |
def get_id | ( | self | ) |
Definition at line 1628 of file z3py.py.
def is_forall | ( | self | ) |
Return `True` if `self` is a universal quantifier. >>> f = Function('f', IntSort(), IntSort()) >>> x = Int('x') >>> q = ForAll(x, f(x) == 0) >>> q.is_forall() True >>> q = Exists(x, f(x) != 0) >>> q.is_forall() False
Definition at line 1635 of file z3py.py.
def no_pattern | ( | self, | |
idx | |||
) |
def num_no_patterns | ( | self | ) |
Return the number of no-patterns.
Definition at line 1693 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 1663 of file z3py.py.
def num_vars | ( | self | ) |
Return the number of variables bounded by this quantifier. >>> f = Function('f', IntSort(), IntSort(), IntSort()) >>> x = Int('x') >>> y = Int('y') >>> q = ForAll([x, y], f(x, y) >= x) >>> q.num_vars() 2
Definition at line 1714 of file z3py.py.
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 1675 of file z3py.py.
def var_name | ( | self, | |
idx | |||
) |
Return a string representing a name used when displaying the quantifier. >>> f = Function('f', IntSort(), IntSort(), IntSort()) >>> x = Int('x') >>> y = Int('y') >>> q = ForAll([x, y], f(x, y) >= x) >>> q.var_name(0) 'x' >>> q.var_name(1) 'y'
Definition at line 1726 of file z3py.py.
def var_sort | ( | self, | |
idx | |||
) |
Return the sort of a bound variable. >>> f = Function('f', IntSort(), RealSort(), IntSort()) >>> x = Int('x') >>> y = Real('y') >>> q = ForAll([x, y], f(x, y) >= x) >>> q.var_sort(0) Int >>> q.var_sort(1) Real
Definition at line 1742 of file z3py.py.
def weight | ( | self | ) |
Return the weight annotation of `self`. >>> f = Function('f', IntSort(), IntSort()) >>> x = Int('x') >>> q = ForAll(x, f(x) == 0) >>> q.weight() 1 >>> q = ForAll(x, f(x) == 0, weight=10) >>> q.weight() 10
Definition at line 1649 of file z3py.py.