-
Notifications
You must be signed in to change notification settings - Fork 109
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
Refactoring to allow for new verification back ends #1329
Conversation
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.
Could you please move all the Java things into Backend::Viper
? For example, the construction of the Viper
object, build Viper program closure, etc.
We just discussed this with Vytautas: it should be enough to store Viper inside an |
If you remove the enum Backend<'v> {
Viper { verifier: viper::Verifier<'v>, verification_context: Rc<VerificationContext<'v>> }
} then making the |
The |
I made it so that the |
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.
Looks good to me.
@fpoli Could you please check that Lazy
is used as you intended?
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.
Lazy
is perfect, thanks! The dump disappeared and the log messages need to be updated, then it's good to be merged.
Co-authored-by: Federico Poli <[email protected]>
4fc9a41
to
f373f15
Compare
I rebased on master. |
The CI failure seems to be unrelated to this PR. @fpoli If you agree, please merge. |
Related to #1321 – this PR aims to abstract away the notion of a verification back end behind an enum, in order to facilitate implementation of new back ends.
Had to make
env
onviper::Verifier
public to do this. I cannot put the call toprogram.to_viper()
inviper
since that would be a cyclic dependency toprusti-common
, and returning anAstFactory
from some method would cause E0502 on call toviper.verify()
.