`KVariable` class should store sort directly, strip attributes

Open
#3,120 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by locating the KInner and KVariable implementations and review the attribute-stripping changes referenced in runtimeverification/pyk#167. Trace where Sort and the listed compile-pipeline attributes are consumed, then verify that Sort is stored directly and the attributes are removed at the appropriate stage; decide how Location and Source should be represented for KInner.

Written by the indexing model from the issue text.

Description

We are trying to strip attributes out of the KInner class. Currently, the KVariable uses the KAtt class to store sort information about variables. But this is unfortunate, because at least in pyk, we don't have a global ordering on KAtt, so comparing terms that contain these becomes harder. Here (https://github.com/runtimeverification/pyk/pull/167), we remedy this in pyk, but find that there are several attributes carried by KVariable that need to be just stripped out to remove attributes from the KVariable:

If these attributes are compile-pipeline internal, then they should be stripped after the stage that makes use of them, rather than passed on to other tools further down (like pyk library).

Slack discussion: https://runtimeverification.slack.com/archives/C7E701MFG/p1674584350855989

Another part of the discussion was about what to do with Location/Source attributes. These could be optional attributes of the KInner class.

Dominant language
Python
Stars
591
Forks
163
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from runtimeverification/k

All issues in runtimeverification/k

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.