-
Notifications
You must be signed in to change notification settings - Fork 26
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
Update VCLLVM (now Pallas) to LLVM 17, update to newest VerCors version, and convert more instructions to COL #1159
Conversation
Hey nice work, just a quick general comment while you work on this: I've realized that we're starting to do too much logic in the |
Yeah that makes sense I've so far not touched any of the transformation stuff so I don't quite know what goes in rewrite/, resolve/, etc. But indeed I already felt like some of the things I'm adding will be relevant more broadly. |
My current plan is to remove the changes from #1172 such that this can be merged without affecting any other parts of the code. I had some issues with the new Ubuntu 24.02 image (which I'm using to get LLVM-17) but the last few runs seem to have worked instead of being suddenly cancelled. |
… me and which aren't
in the transformations stages
…d clean up ClassToRef
df9ebc4
to
bede2fc
Compare
Marking this as ready for review since I basically just want to add some tests now before merging this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There you go! Good work!
Summary
This PR updates VCLLVM to LLVM 17 and updates it to work with the current VerCors. Additionally more instructions converted into COL, there is support for loops, pointers, structs, and more. This also includes changes to the C and PVL frontends for pointers and ByValueClass encoding. (i.e. structs)
Detailed list of changes
General
Pallas
C (changes superceding #1172 and #1227)
f
of struct valuea
becomesPerm(&a.f, write)
instead ofPerm(a.f, write)
a
becomesPerm(a, write)
(or ifa
is a pointer to a struct you'd havePerm(a, write) ** Perm(*a, write)
)unknownN
in the resulting viper file to help with debuggingPVL
*
and&
operators to PVL to work with pointer values (which could also already be used through thepointer<T>
ADT)--contract-import-file
which allows importing method contracts and types from a PVL file which will replace the function signature/contract of the LLVM function with the same name (this will likely be removed later once Robert's specification stuff gets merged in but is necessary now to test the LLVM frontend)To do: