runtimeverification / runtimeverification/haskell-backend
Discussion: removing sort variables from the internal representation(s)
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 224
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
To avoid the overhead of handling sort variables in all matters of internal terms in the new codebase, we should investigate to what extent we can remove sort variables during internalisation
- The only two symbols that have sort variables are
injand built-inif-then-else- We can represent these two symbols with custom nodes in the
Termtype - During internalisation, symbol applications of these symbols are recognised and handled specially.
- The required sort information should already be available in the
KJAppAST node (given we know the two symbols and their sort variable usage).
- We can represent these two symbols with custom nodes in the
- Axioms often use sort variables, but it appears as though rewrite rule axioms do not.
- subsort axioms and functional axioms use a sort variable
Rfor the result sort of\equals - equations (simplification axioms) likewise use sort variables
RandQ0for\equalsand\in - other axiom flavours need to be investigated
For all of the above, it appears as though sort variables are a technicality, an internal representation would not require them to represent the essence of the respective axiom.
- subsort axioms and functional axioms use a sort variable
- The only aliases that use sort variables are
weakExistsFinallyweakAlwaysFinallyandallPathGlobally(not used internally)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the new internal representation around the Term type and the KJApp AST node, then trace internalisation of inj and built-in if-then-else. Investigate which axiom flavours and aliases still require sort variables. Done means the removable sort-variable handling is identified and a viable representation strategy is agreed for the affected symbols and axioms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100