Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyk support for terms with parametric sorts #4653

Open
tothtamas28 opened this issue Oct 3, 2024 · 0 comments
Open

Add pyk support for terms with parametric sorts #4653

tothtamas28 opened this issue Oct 3, 2024 · 0 comments
Labels
pyk Issues transferred from runtimeverification/pyk

Comments

@tothtamas28
Copy link
Contributor

In compiled.json, parametric sorts are represented without structure:

{"node":"KSort","name":"MInt{8}"}

We should either parse these, or modify the JSON format on the Frontend.

For such sorts, KORE-to-KAST attempts to instantiate a sort with an invalid name, thus raises an exception.

ValueError: Expected identifier, got: SortMInt{8}

In KORE-to-KAST, the parameter is truncated:

kore = KoreParser('\dv{SortMInt{Sort8{}}}("0p8")').pattern()
print(kore)
>>> DV(sort=SortApp(name='SortMInt', sorts=(SortApp(name='Sort8', sorts=()),)), value=String(value='0p8'))
kast = kore_to_kast(defn, kore)
print(kast)
>>> KToken(token='0p8', sort=KSort(name='MInt'))
@tothtamas28 tothtamas28 added the pyk Issues transferred from runtimeverification/pyk label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pyk Issues transferred from runtimeverification/pyk
Projects
None yet
Development

No branches or pull requests

1 participant