aboutsummaryrefslogtreecommitdiffstats
path: root/docs/building
diff options
context:
space:
mode:
authorymherklotz <ymherklotz@users.noreply.github.com>2021-09-19 00:54:08 +0000
committerymherklotz <ymherklotz@users.noreply.github.com>2021-09-19 00:54:08 +0000
commita6fdaf10c24b5b01921b34b1d2cfc9ef3c23d50d (patch)
tree52ad54ef5468d7755357dd0a2d513af94c3ea9b5 /docs/building
parent20a623794340113684dfeb5a7ff2e78f6a4d35f3 (diff)
downloadvericert-docs-a6fdaf10c24b5b01921b34b1d2cfc9ef3c23d50d.tar.gz
vericert-docs-a6fdaf10c24b5b01921b34b1d2cfc9ef3c23d50d.zip
deploy: 8d74fffc72abb3cc20df691d9d40c73fbd1c0c27
Diffstat (limited to 'docs/building')
-rw-r--r--docs/building/index.html25
1 files changed, 18 insertions, 7 deletions
diff --git a/docs/building/index.html b/docs/building/index.html
index c761f82..43ca1ba 100644
--- a/docs/building/index.html
+++ b/docs/building/index.html
@@ -5,16 +5,27 @@ The project is written in Coq, a theorem prover, which is extracted to OCaml so
Coq: theorem prover that is used to also program the HLS tool."><meta property="og:type" content="article"><meta property="og:url" content="https://vericert.ymhg.org/docs/building/"><title>Building Vericert |</title><link rel=manifest href=/manifest.json><link rel=icon href=/favicon.png type=image/x-icon><link rel=stylesheet href=/book.min.b07e338e07a9a926c141d155a3e6d06d0c41e4afe4d81564015c56799705b0ca.css integrity="sha256-sH4zjgepqSbBQdFVo+bQbQxB5K/k2BVkAVxWeZcFsMo="><script defer src=/en.search.min.09c4470fdacb71a68922c07311d906b9cd808586067883b11db52f10e30e96d4.js integrity="sha256-CcRHD9rLcaaJIsBzEdkGuc2AhYYGeIOxHbUvEOMOltQ="></script></head><body><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><nav><div class=book-brand><a href=/><div id=book-logo></div><span></span></a><p>A formally verified high-level synthesis tool written in Coq.</p></div><div class=book-search><input type=text id=book-search-input placeholder=Search aria-label=Search maxlength=64 data-hotkeys=s/><div class="book-search-spinner hidden"></div><ul id=book-search-results></ul></div><ul><li><a href=https://vericert.ymhg.org/coq-style-guide/>Coq Style Guide</a></li><li><a href=https://vericert.ymhg.org/docs/>Docs</a><ul><li><a href=https://vericert.ymhg.org/docs/building/ class=active>Building Vericert</a></li><li><a href=https://vericert.ymhg.org/docs/unreleased/>Unreleased Features</a></li><li><a href=https://vericert.ymhg.org/docs/using-vericert/>Using Vericert</a></li></ul></li><li><a href=https://vericert.ymhg.org/future/>Future Work</a></li></ul><ul><li><a href=https://github.com/ymherklotz/vericert target=_blank rel=noopener>Github</a></li></ul></nav><script>(function(){var menu=document.querySelector("aside.book-menu nav");addEventListener("beforeunload",function(event){localStorage.setItem("menu.scrollTop",menu.scrollTop);});menu.scrollTop=localStorage.getItem("menu.scrollTop");})();</script></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label>
<strong>Building Vericert</strong>
-<label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><ul><li><a href=#downloading-compcert>Downloading CompCert</a></li><li><a href=#setting-up-nix>Setting up Nix</a></li><li><a href=#makefile-build>Makefile build</a></li><li><a href=#testing>Testing</a></li></ul></li></ul></nav></aside></header><h1>Building Vericert</h1><article class=markdown><p>To build Vericert, the provided Makefile can be used. External dependencies are needed to build the project, which can be pulled in automatically with <a href=https://nixos.org/nix/>nix</a> using the provided <code>default.nix</code> and <code>shell.nix</code> files.</p><p>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:</p><ul><li><a href=https://coq.inria.fr/>Coq</a>: theorem prover that is used to also program the HLS tool.</li><li><a href=https://ocaml.org/>OCaml</a>: the OCaml compiler to compile the extracted files.</li><li><a href=https://github.com/mit-plv/bbv>bbv</a>: an efficient bit vector library.</li><li><a href=https://github.com/ocaml/dune>dune</a>: build tool for ocaml projects to gather all the ocaml files and compile them in the right order.</li><li><a href=http://gallium.inria.fr/~fpottier/menhir/>menhir</a>: parser generator for ocaml.</li><li><a href=https://github.com/ocaml/ocamlfind>findlib</a> to find installed OCaml libraries.</li><li><a href=https://gcc.gnu.org/>GCC</a>: compiler to help build CompCert.</li></ul><p>These dependencies can be installed manually, or automatically through Nix.</p><h2 id=downloading-compcert>Downloading CompCert
-<a class=anchor href=#downloading-compcert>#</a></h2><p>CompCert is added as a submodule in the <code>lib/CompCert</code> 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, you can run:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>git clone --recursive https://github.com/ymherklotz/vericert
-</code></pre></div><p>If the repository is already cloned, you can run the following command to make sure that CompCert is also downloaded:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>git submodule update --init
+<label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><ul><li><a href=#downloading-compcert>Downloading CompCert</a></li><li><a href=#setting-up-nix>Setting up Nix</a></li><li><a href=#makefile-build>Makefile build</a></li><li><a href=#testing>Testing</a></li></ul></li></ul></nav></aside></header><h1>Building Vericert</h1><article class=markdown><p>To build Vericert, the provided Makefile can be used. External dependencies are needed to build the
+project, which can be pulled in automatically with <a href=https://nixos.org/nix/>nix</a> using the provided <code>default.nix</code> and <code>shell.nix</code>
+files.</p><p>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:</p><ul><li><a href=https://coq.inria.fr/>Coq</a>: theorem prover that is used to also program the HLS tool.</li><li><a href=https://ocaml.org/>OCaml</a>: the OCaml compiler to compile the extracted files.</li><li><a href=https://github.com/mit-plv/bbv>bbv</a>: an efficient bit vector library.</li><li><a href=https://github.com/ocaml/dune>dune</a>: build tool for ocaml projects to gather all the ocaml files and compile them in the right
+order.</li><li><a href=http://gallium.inria.fr/~fpottier/menhir/>menhir</a>: parser generator for ocaml.</li><li><a href=https://github.com/ocaml/ocamlfind>findlib</a> to find installed OCaml libraries.</li><li><a href=https://gcc.gnu.org/>GCC</a>: compiler to help build CompCert.</li></ul><p>These dependencies can be installed manually, or automatically through Nix.</p><h2 id=downloading-compcert>Downloading CompCert
+<a class=anchor href=#downloading-compcert>#</a></h2><p>CompCert is added as a submodule in the <code>lib/CompCert</code> 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, you can run:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>git clone --recursive https://github.com/ymherklotz/vericert
+</code></pre></div><p>If the repository is already cloned, you can run the following command to make sure that CompCert is
+also downloaded:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>git submodule update --init
</code></pre></div><h2 id=setting-up-nix>Setting up Nix
-<a class=anchor href=#setting-up-nix>#</a></h2><p>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.</p><p>To open a shell which includes all the necessary dependencies, one can use:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>nix-shell
+<a class=anchor href=#setting-up-nix>#</a></h2><p>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.</p><p>To open a shell which includes all the necessary dependencies, one can use:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>nix-shell
</code></pre></div><p>which will open a shell that has all the dependencies loaded.</p><h2 id=makefile-build>Makefile build
-<a class=anchor href=#makefile-build>#</a></h2><p>If the dependencies were installed manually, or if one is in the <code>nix-shell</code>, the project can be built by running:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>make -j8
+<a class=anchor href=#makefile-build>#</a></h2><p>If the dependencies were installed manually, or if one is in the <code>nix-shell</code>, the project can be built
+by running:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>make -j8
</code></pre></div><p>and installed locally, or under the <code>PREFIX</code> location using:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>make install
-</code></pre></div><p>Which will install the binary in <code>./bin/vericert</code> by default. However, this can be changed by changing the <code>PREFIX</code> environment variable, in which case the binary will be installed in <code>$PREFIX/bin/vericert</code>.</p><h2 id=testing>Testing
-<a class=anchor href=#testing>#</a></h2><p>To test out <code>vericert</code> you can try the following examples which are in the test folder using the following:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>./bin/vericert test/loop.c -o loop.v
+</code></pre></div><p>Which will install the binary in <code>./bin/vericert</code> by default. However, this can be changed by changing
+the <code>PREFIX</code> environment variable, in which case the binary will be installed in <code>$PREFIX/bin/vericert</code>.</p><h2 id=testing>Testing
+<a class=anchor href=#testing>#</a></h2><p>To test out <code>vericert</code> you can try the following examples which are in the test folder using the
+following:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=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
</code></pre></div><p>Or by running the test suite using the following command:</p><div class=highlight><pre class=chroma><code class=language-shell data-lang=shell>make <span class=nb>test</span>