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

Reduce Array code in easycrypt extraction #865

Open
cassiersg opened this issue Jul 12, 2024 · 0 comments
Open

Reduce Array code in easycrypt extraction #865

cassiersg opened this issue Jul 12, 2024 · 0 comments

Comments

@cassiersg
Copy link
Collaborator

(Summary of discussion consensus in Bristol. - I hope this is faithful. @bgregoir @mbbarbosa @bacelar @strub @lyonel2017)

The current extraction generates non-trivial code around array indexing and sub-arrays.

This code is annoying in easycrypt proofs, since there is no easy way to write generic lemmas about it. Further, it is not easy to verify the correctness of the extraction code in the compiler.

A first step for improving this situation is to define new operators in Array and WArray that correspond to the code generated by the extraction, and use these operators in the extraction.

This breaks existing proofs, but this breakage can be managed by:

  • in the long term: adapt the proofs (should not be too difficult, essentially hint simplify the operators)
  • in the short term: add a (off-by-default) option to keep current behavior

Further changes we proposed but there was no consensus:

  • using only WArray (would simplify the extracted code, but might be less convenient for proving code that doesn't do any typecast, and would break proofs)
  • using variable-length arrays to get rid of theory cloning, with length checks in operators (would break proofs, and is not compatible with a future "circuit" proof technique)
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

No branches or pull requests

1 participant