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
Frontend code cleanup + audits #3891
Comments
Baltoli
changed the title
Dead or near-dead frontend code audit
Frontend code cleanup + audits
Jan 18, 2024
rv-jenkins
pushed a commit
that referenced
this issue
Feb 8, 2024
As part of the cleanup discussed in #3891, this PR removes statically dead code as identified by IntelliJ. IntelliJ's analysis reports some false positives, e.g. with dependency injection and usages in Scala code, so I had to manually review and delete everything. It also seems to miss some dead Scala code. The "Batch N" commits just delete dead code, while the following commits perform some easy simplifications I noticed.
Moving this out of the main overview section as it's run its course wrt. active development, but we might still want to take a look at it at some point. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Introduction
As discussed in our year-end review, we want to be making a push towards simplicity and removal of un-needed code across the various K projects in 2024.
The biggest offender in this respect is the K Frontend; this project has been maintained continuously for the best part of 15 years at this point and so presents the greatest opportunity to remove code that is no longer needed. Actionable steps that we identified in the review meeting were to:
Other bits of knowledge transfer that we might want to do as part of this process:
K Frontend Deep Dive (17 Jan 24)
We went through the K Frontend in some detail in a meeting; a brief summary of the main points that we identified there were:
TreeNodes
structure that is generated by the parser; this is the parse tree precursor to the "kore" structure's AST.kast
conversions from KORE, the LLVM backend's pattern matching compiler2).KIL
that today is only really used as an intermediate step between the parser and our inner syntax representation.kprovex
) Java prover that can be removed.KAST
- and for output from Z3).ModuleToKORE
monolith. This code can probably be improved in Java 21 with string templates.K Distribution Deep Dive (24 Jan 24)
A summary of the main points covered when doing our deep dive into the broader K distribution beyond the core Java code:
k-distribution
#3928kast.md
betterLLVM Backend Deep Dive (31 Jan 24)
upcoming
Footnotes
An interesting question would be to compare this inner syntax representation to Pyk's. What representations / decisions did we do differently in each place? Did we learn any lessons representing K inner syntax in Pyk that could be backported to the frontend? ↩
Maybe this code could be pulled out into a separate library? The deployment of these data structures caused us some weirdnesses when we needed to change them during the change to make
\and
and\or
n-ary. ↩The text was updated successfully, but these errors were encountered: