All Projects → palmskog → coq-program-verification-template

palmskog / coq-program-verification-template

Licence: MIT license
Template project for program verification in Coq

Programming Languages

Coq
218 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to coq-program-verification-template

frontenso-11ty-starter
Production-ready 11ty+Gulp+Webpack Starter that features Nunjucks, SASS, TailwindCSS (with JIT complier), and ESNext.
Stars: ✭ 24 (-7.69%)
Mutual labels:  template-repository
Actuary
Formalization of the basic actuarial mathematics using Coq
Stars: ✭ 17 (-34.62%)
Mutual labels:  coq
PUMPKIN-PATCH
Proof Updater Mechanically Passing Knowledge Into New Proofs, Assisting The Coq Hacker
Stars: ✭ 43 (+65.38%)
Mutual labels:  coq
stablesort
Stable sort algorithms and their stability proofs in Coq
Stars: ✭ 19 (-26.92%)
Mutual labels:  coq
coqeal
The Coq Effective Algebra Library [maintainers=@CohenCyril,@proux01]
Stars: ✭ 62 (+138.46%)
Mutual labels:  coq
hydra-battles
Variations on Kirby & Paris' hydra battles and other entertaining math in Coq (collaborative, documented, includes exercises) [maintainer=@Casteran]
Stars: ✭ 38 (+46.15%)
Mutual labels:  coq
toychain
A minimalistic blockchain consensus implemented and verified in Coq
Stars: ✭ 103 (+296.15%)
Mutual labels:  coq
imm
Intermediate Memory Model (IMM) and compilation correctness proofs for it
Stars: ✭ 15 (-42.31%)
Mutual labels:  coq
coq-tal
Formalization of Typed Assembly Language (TAL) in Coq
Stars: ✭ 15 (-42.31%)
Mutual labels:  coq
opam-coq-archive
Archive for all Coq related OPAM packages organized in various repositories
Stars: ✭ 101 (+288.46%)
Mutual labels:  coq
react-typescript-starter
Minimalist React 18 starter template with TypeScript ⚛
Stars: ✭ 72 (+176.92%)
Mutual labels:  template-repository
koika
A core language for rule-based hardware design 🦑
Stars: ✭ 103 (+296.15%)
Mutual labels:  coq
coqdocjs
Collection of scripts to improve the output of coqdoc [maintainers=@chdoc,@palmskog]
Stars: ✭ 28 (+7.69%)
Mutual labels:  coq
coq-ecosystem
No description or website provided.
Stars: ✭ 39 (+50%)
Mutual labels:  coq
system-F
Formalization of the polymorphic lambda calculus and its parametricity theorem
Stars: ✭ 20 (-23.08%)
Mutual labels:  coq
CoqCheatSheet
Reference sheet for the Coq language.
Stars: ✭ 15 (-42.31%)
Mutual labels:  coq
shapesafe
SHAPE/S∀F∃: static prover/type-checker for N-D array programming in Scala, a use case of intuitionistic type theory
Stars: ✭ 17 (-34.62%)
Mutual labels:  program-verification
bignums
Coq library of arbitrarily large numbers, providing BigN, BigZ, BigQ that used to be part of the standard library [maintainers=@proux01,@erikmd]
Stars: ✭ 20 (-23.08%)
Mutual labels:  coq
kami
A Platform for High-Level Parametric Hardware Specification and its Modular Verification
Stars: ✭ 119 (+357.69%)
Mutual labels:  coq
hs-to-coq
Convert Haskell source code to Coq source code.
Stars: ✭ 64 (+146.15%)
Mutual labels:  coq

Coq Program Verification Template

CI

Template project for program verification in Coq. Uses the Verified Software Toolchain and a classic binary search program in C as an example.

Meta

Building instructions

Installing dependencies

The recommended way to install Coq and other dependencies is via OPAM, for example:

opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq.8.15.2 coq-compcert.3.11 coq-vst.2.11

Obtaining the project

git clone https://github.com/palmskog/coq-program-verification-template.git
cd coq-program-verification-template

Option 1: building the project using coq_makefile

make   # or make -j <number-of-cores-on-your-machine> 

Option 2: building the project using Dune

dune build

Compiling the program using CompCert (optional)

ccomp -o bsearch src/binary_search.c

File and directory structure

Core files

General configuration

Make configuration

Dune configuration

Caveats

coq_makefile vs. Dune

coq_makefile and Dune builds are independent. However, for local development, it is recommended to use coq_makefile, since Coq IDEs may not be able find files compiled by Dune. Due to its build hygiene requirements, Dune will refuse to build when compiled (.vo) files are present in theories; run make clean to remove them.

Generating Clight for Coq

The Coq representation of the C program (binary_search.v) is kept in version control due to licensing concerns for CompCert's clightgen tool. If you have a license to use clightgen, you can delete the generated file and have the build system regenerate it. To regenerate the file manually, you need to run:

clightgen -o theories/binary_search.v -normalize src/binary_search.c
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].