jasmin-lang / jasmin

Language for high-assurance and high-speed cryptography
MIT License
271 stars 55 forks source link

Reduce Array code in easycrypt extraction #865

Open cassiersg opened 4 months ago

cassiersg commented 4 months ago

(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:

Further changes we proposed but there was no consensus: