Skip to content

Commit

Permalink
Python API test: Add missing test for sort substitution. (cvc5#10506)
Browse files Browse the repository at this point in the history
  • Loading branch information
aniemetz authored Mar 15, 2024
1 parent 0a0a339 commit 27e8c50
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/unit/api/python/test_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,14 @@ def test_sort_scoped_tostring(tm):
assert str(uninterp_sort) == name
assert str(bvsort8) == "(_ BitVec 8)"
assert str(uninterp_sort) == name

def test_sort_substitute(tm):
sortVar0 = tm.mkParamSort("T0")
sortVar1 = tm.mkParamSort("T1")
intSort = tm.getIntegerSort()
realSort = tm.getRealSort()
arraySort0 = tm.mkArraySort(sortVar0, sortVar0)
arraySort1 = tm.mkArraySort(sortVar0, sortVar1)
# Now create instantiations of the defined sorts
arraySort0.substitute(sortVar0, intSort)
arraySort1.substitute([sortVar0, sortVar1], [intSort, realSort])

0 comments on commit 27e8c50

Please sign in to comment.