Problem and Societal Impact:
The Coqaml project addresses critical challenges in the utilization of Coq's extraction mechanism, particularly the fact that unsafe casts are inserted even though they are unwanted for industrial applications. The project has identified that extraction guarantees can only be given for a well-defined subset of Coq code. Present applications, such as the CompCert C compiler, have been shown to fall into this fragment, enabling to prove that their extracted code is indeed guaranteed to be correct. By enhancing the extraction process, Coqaml aimed to make verified components more applicable, ultimately contributing to the broader goal of ensuring correctness and trustworthiness in security-critical applications, including cryptographic primitives and smart contracts.
Regarding the three main objectives of the project, all central goals were reached.
Verification of Coq's Extraction:
We used the MetaCoq ecosystem to provide a machine checked proof that translation from the Coq proof assistant into OCaml is correct. We proved that the OCaml code behaves just like the original Coq program. We reached our main goal to ensure that both researcher and industry trust Coq's extraction process more, so important applications (like CompCert and Fiat-Crypto) can rely on it.
Industrial Applicability Enhancement:
We improved how Coq's extraction works for real-world projects by providing precise conditions when guarantees can be provided. We observed that targeting untyped code both gets rid of unsafe casts and eliminates the need to implement optimizations, which historically were there for readability reasons.
Documentation and Accessibility:
We implemented extraction as a MetaCoq program for easier adaptation by third parties, and improved the MetaCoq ecosystem, addressing the high entrance barrier. We established. MetaCoq and Coqaml as accessible open-source projects in the Coq ecosystem. MetaCoq is now part of the Coq platform and thus by default installed for every user installing Coq, and Coqaml will be included into Coq soon. We organized scientific events to enhance the visibility of MetaCoq and verified extraction, most notably a tutorial at the POPL '24 conference.