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
Remove back-edge dependency on the K frontend #999
Comments
The packages that are backwards dependencies from the LLVM backend into the frontend:
My thoughts on the various components here and what we should do with them to resolve the back edge:
This is all a pretty viable set of changes to make, I think - on a first look at the set of changes required I thought it might be a trickier job than anticipated, but on a bit more inspection we can pretty easily cut the backwards edge. |
I think the first step to take here is to migrate the error-handling code out of the pattern matcher, and have the frontend do translation on the errors and warnings it sees.
|
Part of: #999 We are currently working on removing the reverse dependency that the LLVM backend has on the K frontend's data structures; this PR takes a first step towards that goal by removing the backend's use of the K exception infrastructure for throwing errors. The K infrastructure is replaced with a simple exception class that the frontend will be able to catch and reinterpret as appropriate. This PR needs a matching change to the K frontend to work, along with appropriate lockstep merging. --------- Co-authored-by: Tamás Tóth <tothtamas28@users.noreply.github.com>
Part of: #999 We are currently working on removing the reverse dependency that the LLVM backend has on the K frontend's data structures; this PR takes a step towards that goal by removing the backend's use of the K Source and Location classes. These classes are only ever used in the matching compiler as simple PODs that carry around data, so they can be replaced trivially with Java classes here. This PR needs a matching change to the K frontend to work, along with appropriate lockstep merging. Also contains a minor fix in 4b644b0 for an edge case in the exhaustiveness checker for rules with no location; we want to propagate an empty optional here rather than `null`.
This PR finalises the removal of the LLVM backend's dependence on the K frontend, now that we have the shared data structures extracted out to the [`scala-kore` repository](https://github.com/runtimeverification/scala-kore). There are a few smaller changes that make up this PR, but the commit history is clean and can be reviewed commit-by-commit. Once this is merged, the LLVM backend will no longer depend on the K Frontend and we will have eliminated the backwards edge in the K dependency graph! Fixes: #999 --------- Co-authored-by: Samuel Balco <goodlyrottenapple@gmail.com> Co-authored-by: rv-jenkins <admin@runtimeverification.com>
Currently, the pattern-matching compiler depends on Scala code in the K frontend to parse KORE. This induces a backwards edge in the K ecosystem dependency graph that's previously been painful to deal with.1 As part of our general work to simplify and reorganise the K ecosystem code, we want to remove this backwards edge in the graph: runtimeverification/k#4063 (comment)
Some thoughts on how we might achieve this:
Footnotes
It doesn't happen often because the KORE language is pretty stable, but when we last made changes (related to
\left-assoc
and\right-assoc
) it was extremely painful for a number of reasons: getting PRs merged in lockstep with each other, people's maven caches getting stale and producing confusing errors, etc. ↩The text was updated successfully, but these errors were encountered: