All Projects → MetaCoq → Metacoq

MetaCoq / Metacoq

Licence: mit
Metaprogramming in Coq

Programming Languages

metaprogramming
66 projects

Labels

Projects that are alternatives of or similar to Metacoq

Coq Of Ocaml
Import OCaml programs to Coq 🐓 🐫
Stars: ✭ 117 (-39.06%)
Mutual labels:  coq
Advent Of Coq 2018
Advent of Code 2018, in Coq! (https://adventofcode.com/2018)
Stars: ✭ 137 (-28.65%)
Mutual labels:  coq
Coq Equations
A function definition package for Coq
Stars: ✭ 158 (-17.71%)
Mutual labels:  coq
Geocoq
A formalization of geometry in Coq based on Tarski's axiom system
Stars: ✭ 128 (-33.33%)
Mutual labels:  coq
Proofs
A selection of formal proofs in Coq.
Stars: ✭ 135 (-29.69%)
Mutual labels:  coq
Vscoq
A Visual Studio Code extension for Coq [[email protected],@fakusb]
Stars: ✭ 138 (-28.12%)
Mutual labels:  coq
Awesome Provable
A curated set of links to formal methods involving provable code.
Stars: ✭ 111 (-42.19%)
Mutual labels:  coq
Jscert
A Coq specification of ECMAScript 5 (JavaScript) with verified reference interpreter
Stars: ✭ 186 (-3.12%)
Mutual labels:  coq
Coq Haskell
A library for formalizing Haskell types and functions in Coq
Stars: ✭ 135 (-29.69%)
Mutual labels:  coq
Kami
Kami - a DSL for designing Hardware in Coq, and the associated semantics and theorems for proving its correctness. Kami is inspired by Bluespec. It is actually a complete rewrite of an older version from MIT
Stars: ✭ 158 (-17.71%)
Mutual labels:  coq
Dot
formalization of the Dependent Object Types (DOT) calculus
Stars: ✭ 132 (-31.25%)
Mutual labels:  coq
Math Classes
A library of abstract interfaces for mathematical structures in Coq [[email protected]]
Stars: ✭ 133 (-30.73%)
Mutual labels:  coq
Verdi Raft
An implementation of the Raft distributed consensus protocol, verified in Coq using the Verdi framework
Stars: ✭ 143 (-25.52%)
Mutual labels:  coq
Fiat
Mostly Automated Synthesis of Correct-by-Construction Programs
Stars: ✭ 119 (-38.02%)
Mutual labels:  coq
Fpga readings
Recipe for FPGA cooking
Stars: ✭ 164 (-14.58%)
Mutual labels:  coq
Iron
Coq formalizations of functional languages.
Stars: ✭ 114 (-40.62%)
Mutual labels:  coq
Bedrock2
A work-in-progress language and compiler for verified low-level programming
Stars: ✭ 138 (-28.12%)
Mutual labels:  coq
Quickchick
Randomized Property-Based Testing Plugin for Coq
Stars: ✭ 188 (-2.08%)
Mutual labels:  coq
Coq Chick Blog
🐣 A blog engine written and proven in Coq
Stars: ✭ 173 (-9.9%)
Mutual labels:  coq
Coqhammer
CoqHammer: An Automated Reasoning Hammer Tool for Coq - Proof Automation for Dependent Type Theory
Stars: ✭ 157 (-18.23%)
Mutual labels:  coq

MetaCoq

MetaCoq

Build status MetaCoq Chat

MetaCoq is a project formalizing Coq in Coq and providing tools for manipulating Coq terms and developing certified plugins (i.e. translations, compilers or tactics) in Coq.

Quick jump

Getting started

Installation instructions

See INSTALL.md

Documentation

See DOC.md

Overview of the project

At the center of this project is the Template-Coq quoting library for Coq. The project currently has a single repository extending Template-Coq with additional features. Each extension is in dedicated folder.

Template-Coq

Template-Coq is a quoting library for Coq. It takes Coq terms and constructs a representation of their syntax tree as a Coq inductive data type. The representation is based on the kernel's term representation.

In addition to this representation of terms, Template Coq includes:

  • Reification of the environment structures, for constant and inductive declarations.

  • Denotation of terms and global declarations

  • A monad for manipulating global declarations, calling the type checker, and inserting them in the global environment, in the style of MTac.

  • A formalisation of the expected typing rules reflecting the ones of Coq

PCUIC

PCUIC, the Polymorphic Cumulative Calculus of Inductive Constructions is a cleaned up version of the term language of Coq and its associated type system, shown equivalent to the one of Coq. This version of the calculus has proofs of standard metatheoretical results:

  • Weakening for global declarations, weakening and substitution for local contexts.

  • Confluence of reduction using a notion of parallel reduction

  • Context conversion and validity of typing.

  • Subject Reduction (case/cofix reduction excluded)

  • Principality: every typeable term has a smallest type.

  • Elimination restrictions: the elimination restrictions ensure that singleton elimination (from Prop to Type) is only allowed on singleton inductives in Prop.

Safe Checker

Implementation of a fuel-free and verified reduction machine, conversion checker and type checker for PCUIC. This relies on a postulate of strong normalization of the reduction relation of PCUIC on well-typed terms. The extracted safe checker is available in Coq through a new vernacular command:

MetaCoq SafeCheck <term>

After importing MetaCoq.SafeChecker.Loader.

To roughly compare the time used to check a definition with Coq's vanilla type-checker, one can use:

MetaCoq CoqCheck <term>

Erasure

An erasure procedure to untyped lambda-calculus accomplishing the same as the Extraction plugin of Coq. The extracted safe erasure is available in Coq through a new vernacular command:

MetaCoq Erase <term>

After importing MetaCoq.Erasure.Loader.

Translations

Examples of translations built on top of this:

Examples

Papers

Team & Credits

Abhishek Anand Danil Annenkov Simon Boulier
Cyril Cohen Yannick Forster Gregory Malecha
Matthieu Sozeau Nicolas Tabareau Théo Winterhalter

MetaCoq is developed by (left to right) Abhishek Anand, Danil Annenkov, Simon Boulier, Cyril Cohen, Yannick Forster, Gregory Malecha, Matthieu Sozeau, Nicolas Tabareau and Théo Winterhalter.

Copyright (c) 2014-2020 Gregory Malecha
Copyright (c) 2015-2020 Abhishek Anand, Matthieu Sozeau
Copyright (c) 2017-2020 Simon Boulier, Nicolas Tabareau, Cyril Cohen
Copyright (c) 2018-2020 Danil Annenkov, Yannick Forster, Théo Winterhalter

This software is distributed under the terms of the MIT license. See LICENSE for details.

Bugs

Please report any bugs or feature requests on the github issue tracker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].