Skip to content
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

Fix incorrect KMap injections, received from the LLVM library #378

Merged
merged 4 commits into from
Nov 21, 2023

Conversation

goodlyrottenapple
Copy link
Contributor

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.

Copy link
Member

@jberthold jberthold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests could be tweaked, but pre-approving

test/llvm-integration/LLVM.hs Outdated Show resolved Hide resolved
test/llvm-integration/LLVM.hs Outdated Show resolved Hide resolved
mapKItemInjProp api = property $ do
let k = wrapIntTerm 1
let v = wrapIntTerm 2
LLVM.simplifyTerm api testDef (update k v) (SortApp "SortMapValToVal" []) === singleton k v
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add a test for the standard map? (although we should assume that one works 😏 )

goodlyrottenapple and others added 2 commits November 21, 2023 11:33
Co-authored-by: Jost Berthold <jost.berthold@runtimeverification.com>
@goodlyrottenapple goodlyrottenapple merged commit 9f5b527 into main Nov 21, 2023
5 checks passed
@goodlyrottenapple goodlyrottenapple deleted the sam/llvm-kmap-injection-fix branch November 21, 2023 15:12
goodlyrottenapple added a commit that referenced this pull request Dec 11, 2023
goodlyrottenapple added a commit that referenced this pull request Dec 12, 2023
… the LLVM library (#417)

This PR revers #378 which included a temporary fix for incorrect
injection sorts coming back from the LLVM backend. We keep the more
specific error message introduced in said PR, in case similar issues
arise in the future.

Closes #321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants