mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
merge useful utilities from qsat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f951372f03
commit
f175f864ec
32 changed files with 323 additions and 38 deletions
|
@ -3940,7 +3940,7 @@ class ArraySortRef(SortRef):
|
|||
>>> A.range()
|
||||
Bool
|
||||
"""
|
||||
return _to_sort_ref(Z3_get_array_sort_range(self.ctx_ref(), self.ast), self.ctx)
|
||||
return _to_sort_ref(Z3_get_array_sort_range(self.ctx_ref(), self.ast), self.ctx)
|
||||
|
||||
class ArrayRef(ExprRef):
|
||||
"""Array expressions. """
|
||||
|
@ -4162,6 +4162,16 @@ def Select(a, i):
|
|||
_z3_assert(is_array(a), "First argument must be a Z3 array expression")
|
||||
return a[i]
|
||||
|
||||
def Default(a):
|
||||
""" Return a default value for array expression.
|
||||
>>> b = K(IntSort(), 1)
|
||||
>>> prove(Default(b) == 1)
|
||||
proved
|
||||
"""
|
||||
if __debug__:
|
||||
_z3_assert(is_array(a), "First argument must be a Z3 array expression")
|
||||
return a.mk_default()
|
||||
|
||||
def Map(f, *args):
|
||||
"""Return a Z3 map array expression.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue