vericert

A formally verified high-level synthesis tool based on CompCert and written in Coq.

https://github.com/ymherklotz/vericert

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary

Keywords

coq high-level-synthesis
Last synced: 10 months ago · JSON representation ·

Repository

A formally verified high-level synthesis tool based on CompCert and written in Coq.

Basic Info
  • Host: GitHub
  • Owner: ymherklotz
  • License: gpl-3.0
  • Language: Coq
  • Default Branch: master
  • Homepage: https://vericert.ymhg.org
  • Size: 22.8 MB
Statistics
  • Stars: 92
  • Watchers: 11
  • Forks: 5
  • Open Issues: 4
  • Releases: 0
Topics
coq high-level-synthesis
Created over 6 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog License Citation

README.org

#+title:

#+html: 

A formally verified high-level synthesis (HLS) tool written in Coq, building on top of [[https://github.com/AbsInt/CompCert][CompCert]].
This ensures the correctness of the C to Verilog translation according to our Verilog semantics and
CompCert's C semantics, removing the need to check the resulting hardware for behavioural
correctness.

** Features
   :PROPERTIES:
   :CUSTOM_ID: features
   :END:

Currently all proofs of the following features have been completed.

- all int operations,
- non-recursive function calls,
- local arrays and pointers
- control-flow structures such as if-statements, for-loops, etc...

** Building
   :PROPERTIES:
   :CUSTOM_ID: building
   :END:
To build Vericert, the provided [[/Makefile][Makefile]] can be used.  External dependencies are needed to build the
project, which can be pulled in automatically with [[https://nixos.org/nix/][nix]] using the provided [[/default.nix][default.nix]] and [[/shell.nix][shell.nix]]
files.

The project is written in Coq, a theorem prover, which is extracted to OCaml so that it can then be
compiled and executed. The dependencies of this project are the following:

- [[https://coq.inria.fr/][Coq]]: theorem prover that is used to also program the HLS tool.
- [[https://ocaml.org/][OCaml]]: the OCaml compiler to compile the extracted files.
- [[https://github.com/ocaml/dune][dune]]: build tool for ocaml projects to gather all the ocaml files and compile them in the right
  order.
- [[http://gallium.inria.fr/~fpottier/menhir/][menhir]]: parser generator for ocaml.
- [[https://github.com/ocaml/ocamlfind][findlib]] to find installed OCaml libraries.
- [[https://gcc.gnu.org/][GCC]]: compiler to help build CompCert.

These dependencies can be installed manually, or automatically through Nix.

*** Downloading Vericert and CompCert
    :PROPERTIES:
    :CUSTOM_ID: downloading-compcert
    :END:
CompCert is added as a submodule in the =lib/CompCert= directory. It is needed to run the build
process below, as it is the one dependency that is not downloaded by nix, and has to be downloaded
together with the repository. To clone CompCert together with this project, and check it out at the
correct revision, you can run:

#+begin_src shell
git clone -b v1.2.2 --recursive https://github.com/ymherklotz/vericert
#+end_src

If the repository is already cloned, you can run the following command to make sure that CompCert is
also downloaded and the correct branch is checked out:

#+begin_src shell
git checkout v1.2.2
git submodule update --init
#+end_src

*** Setting up Nix
    :PROPERTIES:
    :CUSTOM_ID: setting-up-nix
    :END:
Nix is a package manager that can create an isolated environment so that the builds are
reproducible. Once nix is installed, it can be used in the following way.

To open a shell which includes all the necessary dependencies, one can use:

#+begin_src shell
nix-shell
#+end_src

which will open a shell that has all the dependencies loaded.

*** Makefile build
    :PROPERTIES:
    :CUSTOM_ID: makefile-build
    :END:
If the dependencies were installed manually, or if one is in the =nix-shell=, the project can be built
by running:

#+begin_src shell
make -j8
#+end_src

and installed locally, or under the =PREFIX= location using:

#+begin_src shell
  make install
#+end_src

Which will install the binary in =./bin/vericert= by default. However, this can be changed by changing
the =PREFIX= environment variable, in which case the binary will be installed in =$PREFIX/bin/vericert=.

** Running
   :PROPERTIES:
   :CUSTOM_ID: running
   :END:
To test out =vericert= you can try the following examples which are in the test folder using the
following:

#+begin_src shell
./bin/vericert test/loop.c -o loop.v
./bin/vericert test/conditional.c -o conditional.v
./bin/vericert test/add.c -o add.v
#+end_src

** Citation

If you use Vericert in any way, please cite it using our [[https://yannherklotz.com/papers/fvhls_oopsla21.pdf][OOPSLA'21 paper]]:

#+begin_src bibtex
@inproceedings{herklotz21_fvhls,
  author = {Herklotz, Yann and Pollard, James D. and Ramanathan, Nadesh and Wickerson, John},
  title = {Formal Verification of High-Level Synthesis},
  year = {2021},
  number = {OOPSLA},
  numpages = {30},
  month = {11},
  journal = {Proc. ACM Program. Lang.},
  volume = {5},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  doi = {10.1145/3485494}
}
#+end_src

** License

This project is licensed under [[https://www.gnu.org/licenses/gpl-3.0.en.html][GPLv3]].  The license can be seen in [[file:LICENSE][LICENSE]].

The following external code and its license is present in this repository:

- [[file:src/pipelining][src/pipelining]] :: MIT

#+begin_src text
Copyright (c) 2008,2009,2010 Jean-Baptiste Tristan and INRIA
#+end_src

Owner

  • Name: Yann Herklotz
  • Login: ymherklotz
  • Kind: user
  • Location: Lausanne
  • Company: EPFL

Postdoc at EPFL in the Verification and Computer Architecture lab.

Citation (CITATION.cff)

# -*- mode: yaml -*-
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Herklotz"
  given-names: "Yann"
  orcid: "https://orcid.org/0000-0002-2329-1029"
- family-names: "Pollard"
  given-names: "James D."
  orcid: "https://orcid.org/0000-0003-1404-1527"
- family-names: "Ramanathan"
  given-names: "Nadesh"
  orcid: "https://orcid.org/0000-0001-9083-8349"
- family-names: "Wickerson"
  given-names: "John"
  orcid: "https://orcid.org/0000-0001-6735-5533"
title: "Vericert"
version: 1.2.2
doi: 10.5281/zenodo.5093839
date-released: 2021-10-01
url: "https://github.com/ymherklotz/vericert"
preferred-citation:
  type: article
  authors:
  - family-names: "Herklotz"
    given-names: "Yann"
    orcid: "https://orcid.org/0000-0002-2329-1029"
  - family-names: "Pollard"
    given-names: "James D."
    orcid: "https://orcid.org/0000-0003-1404-1527"
  - family-names: "Ramanathan"
    given-names: "Nadesh"
    orcid: "https://orcid.org/0000-0001-9083-8349"
  - family-names: "Wickerson"
    given-names: "John"
    orcid: "https://orcid.org/0000-0001-6735-5533"
  doi: "10.1145/3485494"
  journal: "Proc. ACM Program. Lang."
  month: 11
  pages: 30
  title: "Formal Verification of High-Level Synthesis"
  volume: 5
  year: 2021
  number: OOPSLA
  publisher: Association for Computing Machinery
  address: New York, NY, USA

GitHub Events

Total
  • Issues event: 1
  • Watch event: 5
  • Issue comment event: 1
Last Year
  • Issues event: 1
  • Watch event: 5
  • Issue comment event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 1,122
  • Total Committers: 5
  • Avg Commits per committer: 224.4
  • Development Distribution Score (DDS): 0.111
Past Year
  • Commits: 5
  • Committers: 1
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Yann Herklotz g****t@y****m 997
James Pollard j****s@p****v 70
Nadesh Ramanathan n****8@g****m 52
Jianyi Cheng j****g@J****b 2
Yann Herklotz g****t@y****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 7
  • Total pull requests: 9
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 1 month
  • Total issue authors: 5
  • Total pull request authors: 5
  • Average comments per issue: 1.86
  • Average comments per pull request: 0.22
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ymherklotz (2)
  • jianyicheng (2)
  • GTRI-hannah (1)
  • wky17 (1)
  • nanoeng (1)
  • johnwickerson (1)
Pull Request Authors
  • p0llard (3)
  • ymherklotz (2)
  • mpardalos (2)
  • dwRchyngqxs (1)
  • jianyicheng (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
proxy.golang.org: github.com/ymherklotz/vericert
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.5%
Dependent repos count: 5.7%
Last synced: 10 months ago

Dependencies

scripts/docker/Dockerfile docker
  • nixos/nix latest build