Skip to content

Commit 39620e6

Browse files
Update cvc5_pythonic_api/cvc5_pythonic.py
Co-authored-by: Daniel Larraz <daniel-larraz@users.noreply.github.com>
1 parent 316c0e5 commit 39620e6

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

cvc5_pythonic_api/cvc5_pythonic.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8688,14 +8688,11 @@ def CreateDatatypes(*ds):
86888688
result.append(dref)
86898689
return tuple(result)
86908690

8691-
class DatatypeSort:
8692-
"""Unresolved datatype sorts."""
8693-
8694-
def __init__(self, name, ctx=None):
8695-
self.name = name
8696-
self.ctx = _get_ctx(ctx)
8697-
self.ast = self.ctx.tm.mkUnresolvedDatatypeSort(name)
8698-
8691+
def DatatypeSort(name, ctx=None):
8692+
"""Create a reference to a sort that will be declared as a recursive datatype"""
8693+
ctx = _get_ctx(ctx)
8694+
s = ctx.tm.mkUnresolvedDatatypeSort(name)
8695+
return SortRef(s, ctx)
86998696

87008697
class DatatypeSortRef(SortRef):
87018698
"""Datatype sorts."""

0 commit comments

Comments
 (0)