-
Notifications
You must be signed in to change notification settings - Fork 0
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
Booster crash: custom hooked Map
is stripped of the element sort after LLVM simplification
#321
Comments
We likely need to change how we internalize/externalize Map. The request involves a customized type-safe map, which is hooked. Booster just assumes that it is the same that the built-in untyped Map and "forgets" the sorts of keys and elements, externalizing them as @virgil-serbanuta could you point me to the definition of the customized Map, for reference? |
Map
are internalised as default Map
, sort infromation is lost
Steps to reproduce in the Build the semantics:
Run the proof:
This should produce an error ending with:
|
I've managed to get much closer to the problem, and it's not what we though it was. Looks like the problem manifests when we apply the |
This commit defines an LLVM<>Booster integration test that demonstrates the error. When given a concrete term representing a singleton custom Reduced error message:
We can see that what was |
Seems related: runtimeverification/llvm-backend#788 |
@virgil-serbanuta we'll need to bring somebody who actively works on the LLVM backend to advise. @Baltoli could you have a look? |
Map
are internalised as default Map
, sort infromation is lostMap
is stript of the element sort after LLVM simplification
Map
is stript of the element sort after LLVM simplificationMap
is stripped of the element sort after LLVM simplification
runtimeverification/llvm-backend#788 is indeed related; I think this is the same underlying problem - thanks for the reminder @geo2a. I will need to remind myself of the solution again as it's been a while since I looked at it, but as I recall the gist of it is for us to implement a new set of collection hooks in the backend that behave correctly with respect to sorting in this way. |
This is a temporary fix for #321 until properly addressed upstream by runtimeverification/llvm-backend#886 . The fix involves manually adjusting an injection to the correct sort, since we know the sort of the argument for a given symbol from the `KoreDefintion`, passed to the decoder. --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Jost Berthold <jost.berthold@runtimeverification.com>
Workaround has been merged (correcting the sorts of updated maps from the LLVM backend). Awaiting fix from LLVM backend library. |
A fix has been shipped inti the LLVM backend: runtimeverification/llvm-backend#914 We should revert the workaround and see what happens. |
I've confirmed that with the latest k version, removing our injection fix works for the unit test we originally added to test this behaviour. Do we want to revert the injection fix or leave it in case someone still uses an old version of the llvm-backend? |
Revert your fix, I think - we shouldn't generally be in the habit of supporting old releases in that way. |
I have a query that makes the booster backend stop with an error, while it works when querying the Haskell backend directly.
Bug report: bug-report.zip
Output:
Also, I'm getting this python stack trace + error:
The text was updated successfully, but these errors were encountered: