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

Compiler certification #5893

Open
4 of 9 tasks
ana-pantilie opened this issue Apr 11, 2024 · 0 comments
Open
4 of 9 tasks

Compiler certification #5893

ana-pantilie opened this issue Apr 11, 2024 · 0 comments

Comments

@ana-pantilie
Copy link
Contributor

ana-pantilie commented Apr 11, 2024

Introduction

We want to certify the PIR to UPLC compiler. Part of the motivation behind this feature is:

  • a better guarantee that the end user's high level code behaves the same as the low level code they upload and is run on the chain
  • we want to ensure that proofs of properties of the high level code also translate to the low level code

Jacco has worked on a couple of papers presenting his incremental approach to verification. See https://github.com/jaccokrijnen/plutus-cert/tree/master, https://iohk.io/en/research/library/papers/translation-certification-for-smart-contracts-scp/. His implementation is done in Coq.

Our approach

The idea is to certify that the optimisations done by the compiler on the input code produces code which is equivalent in some way. A part of the work is defining this equivalence.

Based on Jacco's ideas, we will first formalise the optimisations as translation relations between two ASTs. This provides a syntactic specification which will be proven in some language which we need to agree on. The next step is to define the equivalence relation and prove that holds for the two ASTs as well.

The implementation therefore, for each compiler optimisation, expects a before-AST and an after-AST and finds and checks a proof that the two ASTs are equivalent in both the syntatic sense and the semantic sense.

Preliminary phase

Our goal during the preliminary phase is to gather the requirements for a POC.

Action items:

Proof of concept

We have decided on the following:

Action items:

@github-actions github-actions bot added the status: needs triage GH issues that requires triage label Apr 11, 2024
@ana-pantilie ana-pantilie added status: triaged and removed status: needs triage GH issues that requires triage labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants