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

Eliminate klabel(_) and symbol attributes #2462

Closed
anvacaru opened this issue Jun 4, 2024 · 1 comment · Fixed by #2464
Closed

Eliminate klabel(_) and symbol attributes #2462

anvacaru opened this issue Jun 4, 2024 · 1 comment · Fixed by #2464
Assignees
Labels
enhancement New feature or request

Comments

@anvacaru
Copy link
Contributor

anvacaru commented Jun 4, 2024

The two attributes klabel(_) and symbol will eventually be deprecated. The K code should be updated to use the symbol(_) attribute instead.

@anvacaru anvacaru added the enhancement New feature or request label Jun 4, 2024
@tothtamas28
Copy link
Contributor

Here's a simple script that lets you list the productions in question.

from pyk.kast.att import Atts
from pyk.kast.outer import read_kast_definition
from pyk.kdist import kdist


definition_dir = kdist.get('evm-semantics.llvm')
definition = read_kast_definition(definition_dir / 'compiled.json')

for symbol, production in definition.symbols.items():
    att = production.att
    if all(key in att for key in [Atts.KLABEL, Atts.SYMBOL]):
        print(symbol, att[Atts.SOURCE], att[Atts.LOCATION])

You might need to adjust it a bit to find all productions, e.g. change the kdist target to evm-semantics.haskell, filter for different attributes, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants