Skip to content

Releases: MetaCoq/metacoq

MetaCoq 1.3.2 for Coq 8.20

26 Aug 07:59
Compare
Choose a tag to compare

Release 1.3.2 of the MetaCoq project for Coq 8.20 is available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations, and the release notes for 1.3.1 for a summary of the changes w.r.t. previous versions.

The main changes in this new version w.r.t. v1.3.1 are:

What's Changed

  • Proof that reordering of constructors is correct by @mattam82 in #1095
    This allows in particular to switch the representation of Coq booleans so that extracted code matches the ocaml representation of booleans, making interoperability with existing OCaml code easier.

  • Add the force (lazy t) evaluation rule to LambdaBox by @mattam82 in #1089
    We verify that the evaluation rule is preserved by the verified transformations. In particular, this allows the coq-verified-extraction package and certicoq to support coinductive types and cofixpoints by interpreting lazy/force. The verification of the translation from cofixpoints to fixpoints + lazy/force is however still a work in progress.

Full Changelog: v1.3.1-8.19...v1.3.2-8.19

MetaCoq 1.3.2 for Coq 8.19

22 Jul 14:13
462f3ab
Compare
Choose a tag to compare

Release 1.3.2 of the MetaCoq project for Coq 8.19 is available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations, and the release notes for 1.3.1 for a summary of the changes w.r.t. previous versions.

The main changes in this new version w.r.t. v1.3.1 are:

What's Changed

  • Proof that reordering of constructors is correct by @mattam82 in #1095
    This allows in particular to switch the representation of Coq booleans so that extracted code matches the ocaml representation of booleans, making interoperability with existing OCaml code easier.

  • Add the force (lazy t) evaluation rule to LambdaBox by @mattam82 in #1089
    We verify that the evaluation rule is preserved by the verified transformations. In particular, this allows the coq-verified-extraction package and certicoq to support coinductive types and cofixpoints by interpreting lazy/force. The verification of the translation from cofixpoints to fixpoints + lazy/force is however still a work in progress.

Full Changelog: v1.3.1-8.19...v1.3.2-8.19

MetaCoq 1.3.1 for Coq 8.19

18 Mar 10:38
Compare
Choose a tag to compare

We are happy to announce release 1.3.1 of the MetaCoq project for Coq 8.19, available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations.

The main changes in this new version w.r.t. v1.2.1 are:

  • A full integration of the typed erasure phase from the ConCert project in the erasure pipeline, with a complete correctness proof, by @mattam82. Use option MetaCoq Erase -typed to switch it on. It can be configured with the "live" erasure function inside Coq (see erasure_live_test.v)
  • Generalizations of the correctness and simulation lemmas by @yforster @mattam82 and @tabareau, showing in particular that erasure of applications of functions from firstorder types to firstorder types is compiled to applications, justifying separate compilation of functions and their arguments.
  • Using standardization and canonicity, we also show that erased values of programs of firstorder inductive types (non-erasable inductives types for which all constructor argument types are themselves firstorder) are in direct correspondence with their Coq counterparts, allowing sound readback of these values. In other words, evaluating the erased terms under these assumptions faithfully simulates evaluation in Coq. Based on this, CertiCoq and coq-malfunction both implement an Eval variant that reads back Coq values and can be trusted.
  • Support for primitive ints, floats and array literal values. Primitive operations are still treated as axioms to be realized in target languages and the correctness theorems do not apply in their presence yet.
  • Optional passes have been added that replicate the Coq Extraction plugin's functionality, without proof (yet):
    • Inlining of defined constants (e.g. Extract Inline).
    • Reordering of constructors (e.g. part of Extract Inductive). This allows to target different representations in target languages (typically bool in OCaml).
    • Unboxing of singleton unary constructors. For example, exist nat (fun x : nat => x = 1) 1 p : { x : nat | x = 1 } becomes exist 1 after typed erasure and removal of constructor parameters, which can be further unboxed to just 1.
    • CoFixpoints/CoInductives to Lazy/Inductives: cofixpoints and (co)-constructors get translated to fixpoints + lazy/force constructs in lambda-box, allowing efficient evaluation of coinductive terms in target languages (supported only in coq-malfunction/ocaml extraction for now).
    • Beta-reduction. This reduces manifest beta-redexes in the erased terms, especially useful after inlining.

The preprint "Verified Extraction from Coq to OCaml" presents the development of the compilation pipeline from Coq to Malfunction/OCaml, including the correctness proofs mentioned above.

The preprint "Correct and Complete Type Checking and Certified Erasure for Coq, in Coq" presents the development of the sound and complete type checker based on bidirectional typing, the meta-theoretical results (subject reduction, standardization, canonicity and consistency) and the verified erasure procedure of this version of MetaCoq.

MetaCoq integrates Template-Coq, a reification and denotation plugin for Coq terms and global declarations, a Template monad for metaprogramming (including the ability to extract these metaprograms to OCaml for efficiency), a formalisation of Coq's calculus PCUIC in Coq, a relatively efficient, sound and complete type checker for PCUIC, a verified type and proof erasure procedure from PCUIC to untyped lambda calculus and a quotation library. MetaCoq provides a low-level interface to develop certified plugins like translations, compilers or tactics in Coq itself.

You can install MetaCoq directly from sources or using opam install coq-metacoq.
This release will be included in an upcoming Coq Platform.

The current release includes several subpackages, which can be compiled and installed separately if desired:

  • the utils library contains extensions to the standard library (notably for reasoning with All/All-n type-valued predicates) (in directory utils, and as coq-metacoq-utils).
  • the common libraries of basic definitions for the abstract syntax trees shared by multiple languages (common, coq-metacoq-common)
  • the Template-Coq quoting library and plugin (template-coq / coq-metacoq-template)
  • a formalisation of meta-theoretical properties of PCUIC, the calculus underlying Coq (pcuic / coq-metacoq-pcuic)
  • a verified equivalence between Template-Coq and PCUIC typing (in directory template-pcuic and as coq-metacoq-template-pcuic)
  • a total verified type-checker for Coq (safechecker / coq-metacoq-safechecker), usable inside Coq.
  • a plugin interfacing with the extracted type-checker in OCaml, providing the MetaCoq SafeCheck <term> command (safechecker-plugin, coq-metacoq-safechecker-plugin)
  • a verified type and proof erasure function for Coq (erasure / coq-metacoq-erasure), usable inside Coq.
  • a plugin interfacing with the extracted erasure pipeline in OCaml, providing the MetaCoq Erase <term> command (erasure-plugin, coq-metacoq-erasure-plugin)
  • a quoting library, allowing the quotation of terms and type derivations along with associated data structures as ASTs/terms (quotation / coq-metacoq-quotation).
  • a set of example translations from Type Theory to Type Theory (translation/ coq-metacoq-translations).

A good place to start are the files demo.v, safechecker_test.v, erasure_test.v in the test-suite directory.

This version of MetaCoq was developed by Yannick Forster, Jason Gross, Yann Leray, Matthieu Sozeau and Nicolas Tabareau with contributions from Yishuai Li. You are welcome to contribute by opening issues and PRs. A MetaCoq Zulip stream is also available.

The MetaCoq Team

What's Changed

Read more

MetaCoq 1.3.1 for Coq 8.18

18 Mar 09:02
Compare
Choose a tag to compare

We are happy to announce release 1.3.1 of the MetaCoq project for Coq 8.18, available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations.

The main changes in this new version w.r.t. v1.2.1 are:

  • A full integration of the typed erasure phase from the ConCert project in the erasure pipeline, with a complete correctness proof, by @mattam82. Use option MetaCoq Erase -typed to switch it on. It can be configured with the "live" erasure function inside Coq (see erasure_live_test.v)
  • Generalizations of the correctness and simulation lemmas by @yforster @mattam82 and @tabareau, showing in particular that erasure of applications of functions from firstorder types to firstorder types is compiled to applications, justifying separate compilation of functions and their arguments.
  • Using standardization and canonicity, we also show that erased values of programs of firstorder inductive types (non-erasable inductives types for which all constructor argument types are themselves firstorder) are in direct correspondence with their Coq counterparts, allowing sound readback of these values. In other words, evaluating the erased terms under these assumptions faithfully simulates evaluation in Coq. Based on this, CertiCoq and coq-malfunction both implement an Eval variant that reads back Coq values and can be trusted.
  • Support for primitive ints, floats and array literal values. Primitive operations are still treated as axioms to be realized in target languages and the correctness theorems do not apply in their presence yet.
  • Optional passes have been added that replicate the Coq Extraction plugin's functionality, without proof (yet):
    • Inlining of defined constants (e.g. Extract Inline).
    • Reordering of constructors (e.g. part of Extract Inductive). This allows to target different representations in target languages (typically bool in OCaml).
    • Unboxing of singleton unary constructors. For example, exist nat (fun x : nat => x = 1) 1 p : { x : nat | x = 1 } becomes exist 1 after typed erasure and removal of constructor parameters, which can be further unboxed to just 1.
    • CoFixpoints/CoInductives to Lazy/Inductives: cofixpoints and (co)-constructors get translated to fixpoints + lazy/force constructs in lambda-box, allowing efficient evaluation of coinductive terms in target languages (supported only in coq-malfunction/ocaml extraction for now).
    • Beta-reduction. This reduces manifest beta-redexes in the erased terms, especially useful after inlining.

The preprint "Verified Extraction from Coq to OCaml" presents the development of the compilation pipeline from Coq to Malfunction/OCaml, including the correctness proofs mentioned above.

The preprint "Correct and Complete Type Checking and Certified Erasure for Coq, in Coq" presents the development of the sound and complete type checker based on bidirectional typing, the meta-theoretical results (subject reduction, standardization, canonicity and consistency) and the verified erasure procedure of this version of MetaCoq.

MetaCoq integrates Template-Coq, a reification and denotation plugin for Coq terms and global declarations, a Template monad for metaprogramming (including the ability to extract these metaprograms to OCaml for efficiency), a formalisation of Coq's calculus PCUIC in Coq, a relatively efficient, sound and complete type checker for PCUIC, a verified type and proof erasure procedure from PCUIC to untyped lambda calculus and a quotation library. MetaCoq provides a low-level interface to develop certified plugins like translations, compilers or tactics in Coq itself.

You can install MetaCoq directly from sources or using opam install coq-metacoq.
This release will be included in an upcoming Coq Platform.

The current release includes several subpackages, which can be compiled and installed separately if desired:

  • the utils library contains extensions to the standard library (notably for reasoning with All/All-n type-valued predicates) (in directory utils, and as coq-metacoq-utils).
  • the common libraries of basic definitions for the abstract syntax trees shared by multiple languages (common, coq-metacoq-common)
  • the Template-Coq quoting library and plugin (template-coq / coq-metacoq-template)
  • a formalisation of meta-theoretical properties of PCUIC, the calculus underlying Coq (pcuic / coq-metacoq-pcuic)
  • a verified equivalence between Template-Coq and PCUIC typing (in directory template-pcuic and as coq-metacoq-template-pcuic)
  • a total verified type-checker for Coq (safechecker / coq-metacoq-safechecker), usable inside Coq.
  • a plugin interfacing with the extracted type-checker in OCaml, providing the MetaCoq SafeCheck <term> command (safechecker-plugin, coq-metacoq-safechecker-plugin)
  • a verified type and proof erasure function for Coq (erasure / coq-metacoq-erasure), usable inside Coq.
  • a plugin interfacing with the extracted erasure pipeline in OCaml, providing the MetaCoq Erase <term> command (erasure-plugin, coq-metacoq-erasure-plugin)
  • a quoting library, allowing the quotation of terms and type derivations along with associated data structures as ASTs/terms (quotation / coq-metacoq-quotation).
  • a set of example translations from Type Theory to Type Theory (translation/ coq-metacoq-translations).

A good place to start are the files demo.v, safechecker_test.v, erasure_test.v in the test-suite directory.

This version of MetaCoq was developed by Yannick Forster, Jason Gross, Yann Leray, Matthieu Sozeau and Nicolas Tabareau with contributions from Yishuai Li. You are welcome to contribute by opening issues and PRs. A MetaCoq Zulip stream is also available.

The MetaCoq Team

What's Changed

New Contributors

Full Changelog: v1.2.1-8.18...v1.3.1-8.18

MetaCoq 1.3.1 for Coq 8.17

18 Mar 10:37
e4f4fd5
Compare
Choose a tag to compare

We are happy to announce release 1.3.1 of the MetaCoq project for Coq 8.17, available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations.

The main changes in this new version w.r.t. v1.2.1 are:

  • A full integration of the typed erasure phase from the ConCert project in the erasure pipeline, with a complete correctness proof, by @mattam82. Use option MetaCoq Erase -typed to switch it on. It can be configured with the "live" erasure function inside Coq (see erasure_live_test.v)
  • Generalizations of the correctness and simulation lemmas by @yforster @mattam82 and @tabareau, showing in particular that erasure of applications of functions from firstorder types to firstorder types is compiled to applications, justifying separate compilation of functions and their arguments.
  • Using standardization and canonicity, we also show that erased values of programs of firstorder inductive types (non-erasable inductives types for which all constructor argument types are themselves firstorder) are in direct correspondence with their Coq counterparts, allowing sound readback of these values. In other words, evaluating the erased terms under these assumptions faithfully simulates evaluation in Coq. Based on this, CertiCoq and coq-malfunction both implement an Eval variant that reads back Coq values and can be trusted.
  • Support for primitive ints, floats and array literal values. Primitive operations are still treated as axioms to be realized in target languages and the correctness theorems do not apply in their presence yet.
  • Optional passes have been added that replicate the Coq Extraction plugin's functionality, without proof (yet):
    • Inlining of defined constants (e.g. Extract Inline).
    • Reordering of constructors (e.g. part of Extract Inductive). This allows to target different representations in target languages (typically bool in OCaml).
    • Unboxing of singleton unary constructors. For example, exist nat (fun x : nat => x = 1) 1 p : { x : nat | x = 1 } becomes exist 1 after typed erasure and removal of constructor parameters, which can be further unboxed to just 1.
    • CoFixpoints/CoInductives to Lazy/Inductives: cofixpoints and (co)-constructors get translated to fixpoints + lazy/force constructs in lambda-box, allowing efficient evaluation of coinductive terms in target languages (supported only in coq-malfunction/ocaml extraction for now).
    • Beta-reduction. This reduces manifest beta-redexes in the erased terms, especially useful after inlining.

The preprint "Verified Extraction from Coq to OCaml" presents the development of the compilation pipeline from Coq to Malfunction/OCaml, including the correctness proofs mentioned above.

The preprint "Correct and Complete Type Checking and Certified Erasure for Coq, in Coq" presents the development of the sound and complete type checker based on bidirectional typing, the meta-theoretical results (subject reduction, standardization, canonicity and consistency) and the verified erasure procedure of this version of MetaCoq.

MetaCoq integrates Template-Coq, a reification and denotation plugin for Coq terms and global declarations, a Template monad for metaprogramming (including the ability to extract these metaprograms to OCaml for efficiency), a formalisation of Coq's calculus PCUIC in Coq, a relatively efficient, sound and complete type checker for PCUIC, a verified type and proof erasure procedure from PCUIC to untyped lambda calculus and a quotation library. MetaCoq provides a low-level interface to develop certified plugins like translations, compilers or tactics in Coq itself.

You can install MetaCoq directly from sources or using opam install coq-metacoq.
This release will be included in an upcoming Coq Platform.

The current release includes several subpackages, which can be compiled and installed separately if desired:

  • the utils library contains extensions to the standard library (notably for reasoning with All/All-n type-valued predicates) (in directory utils, and as coq-metacoq-utils).
  • the common libraries of basic definitions for the abstract syntax trees shared by multiple languages (common, coq-metacoq-common)
  • the Template-Coq quoting library and plugin (template-coq / coq-metacoq-template)
  • a formalisation of meta-theoretical properties of PCUIC, the calculus underlying Coq (pcuic / coq-metacoq-pcuic)
  • a verified equivalence between Template-Coq and PCUIC typing (in directory template-pcuic and as coq-metacoq-template-pcuic)
  • a total verified type-checker for Coq (safechecker / coq-metacoq-safechecker), usable inside Coq.
  • a plugin interfacing with the extracted type-checker in OCaml, providing the MetaCoq SafeCheck <term> command (safechecker-plugin, coq-metacoq-safechecker-plugin)
  • a verified type and proof erasure function for Coq (erasure / coq-metacoq-erasure), usable inside Coq.
  • a plugin interfacing with the extracted erasure pipeline in OCaml, providing the MetaCoq Erase <term> command (erasure-plugin, coq-metacoq-erasure-plugin)
  • a quoting library, allowing the quotation of terms and type derivations along with associated data structures as ASTs/terms (quotation / coq-metacoq-quotation).
  • a set of example translations from Type Theory to Type Theory (translation/ coq-metacoq-translations).

A good place to start are the files demo.v, safechecker_test.v, erasure_test.v in the test-suite directory.

This version of MetaCoq was developed by Yannick Forster, Jason Gross, Yann Leray, Matthieu Sozeau and Nicolas Tabareau with contributions from Yishuai Li. You are welcome to contribute by opening issues and PRs. A MetaCoq Zulip stream is also available.

The MetaCoq Team

What's Changed

New Contributors

Full Changelog: v1.2.1-8.18...v1.3.1-8.18

MetaCoq 1.3 for Coq 8.17

07 Mar 09:35
6037418
Compare
Choose a tag to compare

We are happy to announce release 1.3 of the MetaCoq project for Coq 8.17, available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations.

The main changes in this new version are (w.r.t. v1.2.1):

  • A full integration of the typed erasure phase from the ConCert project in the erasure pipeline, with a complete correctness proof, by @mattam82. Use option MetaCoq Erase -typed to switch it on. It can be configured with the "live" erasure function inside Coq (see erasure_live_test.v)
  • Generalizations of the correctness and simulation lemmas by @yforster @mattam82 and @tabareau, showing in particular that erasure of applications of functions from firstorder types to firstorder types is compiled to applications, justifying separate compilation of functions and their arguments.
  • Using standardization and canonicity, we also show that erased values of programs of firstorder inductive types (non-erasable inductives types for which all constructor argument types are themselves firstorder) are in direct correspondence with their Coq counterparts, allowing sound readback of these values. In other words, evaluating the erased terms under these assumptions faithfully simulates evaluation in Coq. Based on this, CertiCoq and coq-malfunction both implement an Eval variant that reads back Coq values and can be trusted.
  • Support for primitive ints, floats and array literal values. Primitive operations are still treated as axioms to be realized in target languages and the correctness theorems do not apply in their presence yet.
  • Optional passes have been added that replicate the Coq Extraction plugin's functionality, without proof (yet):
    • Inlining of defined constants (e.g. Extract Inline).
    • Reordering of constructors (e.g. part of Extract Inductive). This allows to target different representations in target languages (typically bool in OCaml).
    • Unboxing of singleton unary constructors. For example, exist nat (fun x : nat => x = 1) 1 p : { x : nat | x = 1 } becomes exist 1 after typed erasure and removal of constructor parameters, which can be further unboxed to just 1.
    • CoFixpoints/CoInductives to Lazy/Inductives: cofixpoints and (co)-constructors get translated to fixpoints + lazy/force constructs in lambda-box, allowing efficient evaluation of coinductive terms in target languages (supported only in coq-malfunction/ocaml extraction for now).
    • Beta-reduction. This reduces manifest beta-redexes in the erased terms, especially useful after inlining.

The preprint "Verified Extraction from Coq to OCaml" presents the development of the compilation pipeline from Coq to Malfunction/OCaml, including the correctness proofs mentioned above.

The preprint "Correct and Complete Type Checking and Certified Erasure for Coq, in Coq" presents the development of the sound and complete type checker based on bidirectional typing, the meta-theoretical results (subject reduction, standardization, canonicity and consistency) and the verified erasure procedure of this version of MetaCoq.

MetaCoq integrates Template-Coq, a reification and denotation plugin for Coq terms and global declarations, a Template monad for metaprogramming (including the ability to extract these metaprograms to OCaml for efficiency), a formalisation of Coq's calculus PCUIC in Coq, a relatively efficient, sound and complete type checker for PCUIC, a verified type and proof erasure procedure from PCUIC to untyped lambda calculus and a quotation library. MetaCoq provides a low-level interface to develop certified plugins like translations, compilers or tactics in Coq itself.

You can install MetaCoq directly from sources or using opam install coq-metacoq.
This release will be included in an upcoming Coq Platform.

The current release includes several subpackages, which can be compiled and installed separately if desired:

  • the utils library contains extensions to the standard library (notably for reasoning with All/All-n type-valued predicates) (in directory utils, and as coq-metacoq-utils).
  • the common libraries of basic definitions for the abstract syntax trees shared by multiple languages (common, coq-metacoq-common)
  • the Template-Coq quoting library and plugin (template-coq / coq-metacoq-template)
  • a formalisation of meta-theoretical properties of PCUIC, the calculus underlying Coq (pcuic / coq-metacoq-pcuic)
  • a verified equivalence between Template-Coq and PCUIC typing (in directory template-pcuic and as coq-metacoq-template-pcuic)
  • a total verified type-checker for Coq (safechecker / coq-metacoq-safechecker), usable inside Coq.
  • a plugin interfacing with the extracted type-checker in OCaml, providing the MetaCoq SafeCheck <term> command (safechecker-plugin, coq-metacoq-safechecker-plugin)
  • a verified type and proof erasure function for Coq (erasure / coq-metacoq-erasure), usable inside Coq.
  • a plugin interfacing with the extracted erasure pipeline in OCaml, providing the MetaCoq Erase <term> command (erasure-plugin, coq-metacoq-erasure-plugin)
  • a quoting library, allowing the quotation of terms and type derivations along with associated data structures as ASTs/terms (quotation / coq-metacoq-quotation).
  • a set of example translations from Type Theory to Type Theory (translation/ coq-metacoq-translations).

A good place to start are the files demo.v, safechecker_test.v, erasure_test.v in the test-suite directory.

This version of MetaCoq was developed by Yannick Forster, Jason Gross, Yann Leray, Matthieu Sozeau and Nicolas Tabareau with contributions from Yishuai Li. You are welcome to contribute by opening issues and PRs. A MetaCoq Zulip stream is also available.

The MetaCoq Team

What's Changed

New Contributors

Full Changelog: v1.2.1-8.17...v1.3-8.17

MetaCoq 1.2.1 for Coq 8.18

01 Nov 14:48
Compare
Choose a tag to compare

This is a minor release synchronising the state of coq-8.17 and coq-8.18 to allow publishing an opam package for Coq 8.18. See https://github.com/MetaCoq/metacoq/releases/tag/v1.2-8.17 for detailed release notes.

What's Changed

Additionally, the following adaptions were necessary to work with Coq 8.18:

Show

Full Changelog: v1.2-8.17...v1.2.1-8.18

MetaCoq 1.2.1 for Coq 8.17

01 Nov 14:44
Compare
Choose a tag to compare

This is a minor release synchronising the state of coq-8.17 and coq-8.18 to allow publishing an opam package for Coq 8.18. See https://github.com/MetaCoq/metacoq/releases/tag/v1.2-8.17 for detailed release notes.

What's Changed

Full Changelog: v1.2-8.17...v1.2.1-8.17

MetaCoq 1.2 for Coq 8.17

21 Apr 16:17
Compare
Choose a tag to compare

We are happy to announce release 1.2 of the MetaCoq project for Coq 8.17, available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations.

The main changes in this new version are (w.r.t. v1.1.1):

  • A cleaned-up abstract environment structure for the implementation of the verified type-checker and cleaned-up canonicity and consistency theorems by @tabareau.
  • A new quotation library with a work-in-progress proof of Löb's theorem by @JasonGross.
  • An integration of the typed erasure phase of the ConCert project by @annenkov and @mattam82.
    Beware, adaptation of the correctness proof is not finished and it is not integrated in the extracted pipeline of MetaCoq Erase yet.
  • Reorganization of the packages, separating plugins from theories by @tabareau.

The preprint "Correct and Complete Type Checking and Certified Erasure for Coq, in Coq" presents the development of the sound and complete type checker based on bidirectional typing, the meta-theoretical results (subject reduction, standardization, canonicity and consistency) and the verified erasure procedure of this version of MetaCoq.

MetaCoq integrates Template-Coq, a reification and denotation plugin for Coq terms and global declarations, a Template monad for metaprogramming (including the ability to extract these metaprograms to OCaml for efficiency), a formalisation of Coq's calculus PCUIC in Coq, a relatively efficient, sound and complete type checker for PCUIC, a verified type and proof erasure procedure from PCUIC to untyped lambda calculus and a quotation library. MetaCoq provides a low-level interface to develop certified plugins like translations, compilers or tactics in Coq itself.

You can install MetaCoq directly from sources or using opam install coq-metacoq.
This release will be included in an upcoming Coq Platform.

The current release includes several subpackages, which can be compiled and installed separately if desired:

  • the utils library contains extensions to the standard library (notably for reasoning with All/All-n type-valued predicates) (in directory utils, and as coq-metacoq-utils).
  • the common libraries of basic definitions for the abstract syntax trees shared by multiple languages (common, coq-metacoq-common)
  • the Template-Coq quoting library and plugin (template-coq / coq-metacoq-template)
  • a formalisation of meta-theoretical properties of PCUIC, the calculus underlying Coq (pcuic / coq-metacoq-pcuic)
  • a verified equivalence between Template-Coq and PCUIC typing (in directory template-pcuic and as coq-metacoq-template-pcuic)
  • a total verified type-checker for Coq (safechecker / coq-metacoq-safechecker), usable inside Coq.
  • a plugin interfacing with the extracted type-checker in OCaml, providing the MetaCoq SafeCheck <term> command (safechecker-plugin, coq-metacoq-safechecker-plugin)
  • a verified type and proof erasure function for Coq (erasure / coq-metacoq-erasure), usable inside Coq.
  • a plugin interfacing with the extracted erasure pipeline in OCaml, providing the MetaCoq Erase <term> command (erasure-plugin, coq-metacoq-erasure-plugin)
  • a quoting library, allowing the quotation of terms and type derivations along with associated data structures as ASTs/terms (quotation / coq-metacoq-quotation).
  • a set of example translations from Type Theory to Type Theory (translation/ coq-metacoq-translations).

A good place to start are the files demo.v, safechecker_test.v, erasure_test.v in the test-suite directory.

MetaCoq is developed by Abhishek Anand, Danil Annenkov, Jakob Botsch Nielsen, Simon Boulier, Cyril Cohen, Yannick Forster, Jason Gross, Meven Lennon-Bertrand, Kenji Maillard, Gregory Malecha, Matthieu Sozeau, Nicolas Tabareau, and Théo Winterhalter. You are welcome to contribute by opening issues and PRs. A MetaCoq Zulip stream is also available.

The MetaCoq Team

What's Changed

Read more

MetaCoq 1.2 for Coq 8.16

21 Apr 09:14
74f668a
Compare
Choose a tag to compare

We are happy to announce release 1.2 of the MetaCoq project for Coq 8.16, available both as source and through opam. See the website for a detailed overview of the project, introductory material and related articles and presentations.

The main changes in this new version are (w.r.t. v1.1.1):

  • A cleaned-up abstract environment structure for the implementation of the verified type-checker and cleaned-up canonicity and consistency theorems by @tabareau.
  • A new quotation library with a work-in-progress proof of Löb's theorem by @JasonGross.
  • An integration of the typed erasure phase of the ConCert project by @annenkov and @mattam82.
    Beware, adaptation of the correctness proof is not finished and it is not integrated in the extracted pipeline of MetaCoq Erase yet.
  • Reorganization of the packages, separating plugins from theories by @tabareau.

The preprint "Correct and Complete Type Checking and Certified Erasure for Coq, in Coq" presents the development of the sound and complete type checker based on bidirectional typing, the meta-theoretical results (subject reduction, standardization, canonicity and consistency) and the verified erasure procedure of this version of MetaCoq.

MetaCoq integrates Template-Coq, a reification and denotation plugin for Coq terms and global declarations, a Template monad for metaprogramming (including the ability to extract these metaprograms to OCaml for efficiency), a formalisation of Coq's calculus PCUIC in Coq, a relatively efficient, sound and complete type checker for PCUIC, a verified type and proof erasure procedure from PCUIC to untyped lambda calculus and a quotation library. MetaCoq provides a low-level interface to develop certified plugins like translations, compilers or tactics in Coq itself.

You can install MetaCoq directly from sources or using opam install coq-metacoq.
This release will be included in an upcoming Coq Platform.

The current release includes several subpackages, which can be compiled and installed separately if desired:

  • the utils library contains extensions to the standard library (notably for reasoning with All/All-n type-valued predicates) (in directory utils, and as coq-metacoq-utils).
  • the common libraries of basic definitions for the abstract syntax trees shared by multiple languages (common, coq-metacoq-common)
  • the Template-Coq quoting library and plugin (template-coq / coq-metacoq-template)
  • a formalisation of meta-theoretical properties of PCUIC, the calculus underlying Coq (pcuic / coq-metacoq-pcuic)
  • a verified equivalence between Template-Coq and PCUIC typing (in directory template-pcuic and as coq-metacoq-template-pcuic)
  • a total verified type-checker for Coq (safechecker / coq-metacoq-safechecker), usable inside Coq.
  • a plugin interfacing with the extracted type-checker in OCaml, providing the MetaCoq SafeCheck <term> command (safechecker-plugin, coq-metacoq-safechecker-plugin)
  • a verified type and proof erasure function for Coq (erasure / coq-metacoq-erasure), usable inside Coq.
  • a plugin interfacing with the extracted erasure pipeline in OCaml, providing the MetaCoq Erase <term> command (erasure-plugin, coq-metacoq-erasure-plugin)
  • a quoting library, allowing the quotation of terms and type derivations along with associated data structures as ASTs/terms (quotation / coq-metacoq-quotation).
  • a set of example translations from Type Theory to Type Theory (translation/ coq-metacoq-translations).

A good place to start are the files demo.v, safechecker_test.v, erasure_test.v in the test-suite directory.

MetaCoq is developed by Abhishek Anand, Danil Annenkov, Jakob Botsch Nielsen, Simon Boulier, Cyril Cohen, Yannick Forster, Jason Gross, Meven Lennon-Bertrand, Kenji Maillard, Gregory Malecha, Matthieu Sozeau, Nicolas Tabareau, and Théo Winterhalter. You are welcome to contribute by opening issues and PRs. A MetaCoq Zulip stream is also available.

The MetaCoq Team

What's Changed

Read more