-
Notifications
You must be signed in to change notification settings - Fork 483
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
Add verified compilation certification component #6413
Conversation
Signed-off-by: Ana Pantilie <[email protected]>
3f18ea9
to
4d32e29
Compare
…lutus into kwxm/metatheory/fix-test2
Signed-off-by: Ana Pantilie <[email protected]>
…lutus into kwxm/metatheory/fix-test2
Signed-off-by: Ana Pantilie <[email protected]>
Signed-off-by: Ana Pantilie <[email protected]>
Signed-off-by: Ana Pantilie <[email protected]>
Signed-off-by: Ana Pantilie <[email protected]>
Signed-off-by: Ana Pantilie <[email protected]>
Signed-off-by: Ana Pantilie <[email protected]>
Signed-off-by: Ana Pantilie <[email protected]>
|
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.
@bezirg has unified the pir
, plc
and uplc
executables into the plutus
executable, which I think is the one you'd want to integrate with.
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.
The integration is great! The log/show information can be improved in the next iteration. The decision process is "working correctly" because it checks that all the changes are instances of implemented translation relations, and obviously the unimplemented ones aren't! We should make a log file with more granular information, and maybe adopt Jacco's approach of having a process for "accepting" unimplemented phases.
@@ -74,4 +87,11 @@ simplifyTerm opts builtinSemanticsVariant = | |||
(Just Refl, Just Refl) -> cse builtinSemanticsVariant | |||
_ -> pure | |||
|
|||
traceAST ast = | |||
case eqT @fun @DefaultFun of |
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.
Why do you need this check here?
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.
If I recall correctly, it's to convert to the Agda representation of terms, the Haskell -> Agda intermediate module uses that:
plutus/plutus-metatheory/src/Untyped.hs
Line 36 in 4066409
conv :: Term NamedDeBruijn DefaultUni DefaultFun a -> UTerm |
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.
I don't get it. If it was for that function, you'd also need to check equality of uni
and DefaultUni
. What breaks if you remove the eqT
check?
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.
Good catch! I accidentally didn't use the fun
type param in the SimplifierTrace type. Fixed now, thanks.
@ana-pantilie Not atm |
Fixes #5941
This PR implements the following:
VerifiedCompilation
component to the Agda codeuplc
executable as a--certify <file-name>
option touplc optimise
; it was necessary to pull it out into a separate package calledplutus-executables
because of cyclic dependenciesNotes:
library plutus-core-execlib
toplutus-executables
becauseplutus-benchmark
andplutus-metatheory
depend on the libraryuplc/plc/pir
executables are no longer supported on Windows because they now depend on the metatheory; is this a problem?TODO in future PRs:
Try it out
To try this out, try:
where
certificate-fibonacci
is the name of the.agda
file that will be created with the proof object.This is currently providing a negative result (the certificate isAs pointed out by @ramsay-t , the result is correct because it's applying optimisations which currently haven't been specified in the certifier!no
), even thoughforce-delay
is clearly being applied! But now we have an example on which to start debugging.Pre-submit checklist: