diff --git a/package/version b/package/version index 0b3398645..2f3fb9d02 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.1.539 +0.1.540 diff --git a/pyproject.toml b/pyproject.toml index ab9569d0e..62db5aeac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pyk" -version = "0.1.539" +version = "0.1.540" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/src/pyk/kore/syntax.py b/src/pyk/kore/syntax.py index 5c5b04347..0d6efc8ba 100644 --- a/src/pyk/kore/syntax.py +++ b/src/pyk/kore/syntax.py @@ -250,7 +250,7 @@ def _tag(cls) -> str: @classmethod def from_dict(cls: type[SortApp], dct: Mapping[str, Any]) -> SortApp: cls._check_tag(dct) - return SortApp(name=dct['name'], sorts=(Sort.from_dict(arg) for arg in dct['args'])) + return SortApp(name=dct['name'], sorts=tuple(Sort.from_dict(arg) for arg in dct['args'])) @property def dict(self) -> dict[str, Any]: @@ -449,8 +449,8 @@ def from_dict(cls: type[App], dct: Mapping[str, Any]) -> App: cls._check_tag(dct) return App( symbol=dct['name'], - sorts=(Sort.from_dict(sort) for sort in dct['sorts']), - args=(Pattern.from_dict(arg) for arg in dct['args']), + sorts=tuple(Sort.from_dict(sort) for sort in dct['sorts']), + args=tuple(Pattern.from_dict(arg) for arg in dct['args']), ) @property @@ -847,9 +847,10 @@ def of(cls: type[And], symbol: str, sorts: Iterable[Sort] = (), patterns: Iterab @classmethod def from_dict(cls: type[And], dct: Mapping[str, Any]) -> And: cls._check_tag(dct) - sort = Sort.from_dict(dct['sort']) - ops = [Pattern.from_dict(op) for op in dct['patterns']] - return And(sort=sort, ops=ops) + return And( + sort=Sort.from_dict(dct['sort']), + ops=tuple(Pattern.from_dict(op) for op in dct['patterns']), + ) @final @@ -895,9 +896,10 @@ def of(cls: type[Or], symbol: str, sorts: Iterable[Sort] = (), patterns: Iterabl @classmethod def from_dict(cls: type[Or], dct: Mapping[str, Any]) -> Or: cls._check_tag(dct) - sort = Sort.from_dict(dct['sort']) - ops = [Pattern.from_dict(op) for op in dct['patterns']] - return Or(sort=sort, ops=ops) + return Or( + sort=Sort.from_dict(dct['sort']), + ops=tuple(Pattern.from_dict(op) for op in dct['patterns']), + ) class MLQuant(MLPattern, WithSort):