diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-06-28 18:26:34 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-06-28 18:26:34 +0100 |
commit | d8464b57c4f56937b04e1caa37eea3b287dd415c (patch) | |
tree | 575755fa750a950b783a6795f57de3eab3a82aee | |
parent | e72ef9094c1d8239e56c4da126bb3f05341702a2 (diff) | |
parent | 56f1dd7a658dd21bb267dc41fc0301adbd620a6d (diff) | |
download | vericert-d8464b57c4f56937b04e1caa37eea3b287dd415c.tar.gz vericert-d8464b57c4f56937b04e1caa37eea3b287dd415c.zip |
Merge remote-tracking branch 'origin/dev/scheduling' into dev/scheduling
-rw-r--r-- | .envrc | 1 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | default.nix | 22 | ||||
-rw-r--r-- | doc/Makefile | 3 | ||||
-rw-r--r-- | doc/index.rst | 8 | ||||
-rw-r--r-- | flake.lock | 26 | ||||
-rw-r--r-- | flake.nix | 33 | ||||
-rw-r--r-- | shell.nix | 8 | ||||
-rw-r--r-- | src/hls/Gible.v | 6 | ||||
-rw-r--r-- | src/hls/GiblePar.v | 6 | ||||
-rw-r--r-- | src/hls/GiblePargen.v | 6 | ||||
-rw-r--r-- | src/hls/GibleSeqgen.v | 10 | ||||
-rw-r--r-- | src/hls/GibleSeqgenproof.v | 6 | ||||
-rw-r--r-- | src/hls/IfConversionproof.v | 6 |
14 files changed, 89 insertions, 53 deletions
@@ -0,0 +1 @@ +use flake @@ -79,7 +79,6 @@ obj_dir/ /*.v .direnv/ -.envrc creduce_bug_*/ diff --git a/default.nix b/default.nix deleted file mode 100644 index 341c8fc..0000000 --- a/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/00197eff36bb8f7dd7f53a59f730e1fd8e11b1f4.tar.gz") {}; -let - ncoq = coq_8_14; - ncoqPackages = coqPackages_8_14; -in -stdenv.mkDerivation { - name = "vericert"; - src = ./.; - - buildInputs = [ ncoq dune_2 gcc - ncoq.ocaml ncoq.ocamlPackages.findlib ncoq.ocamlPackages.menhir - ncoq.ocamlPackages.ocamlgraph ncoq.ocamlPackages.merlin - ncoq.ocamlPackages.menhirLib - - ncoqPackages.serapi - python3 - python3Packages.alectryon - python3Packages.sphinx_rtd_theme - ]; - - enableParallelBuilding = true; -} diff --git a/doc/Makefile b/doc/Makefile index 8a34845..e4a3988 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,7 +9,7 @@ SOURCEDIR = . BUILDDIR = _build SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct) -VS_DOCS := Compiler.v hls/RTLBlockInstr.v hls/RTLBlockgen.v hls/RTLBlockgenproof.v +VS_DOCS := Compiler.v hls/Gible.v hls/GibleSeq.v hls/GiblePar.v hls/GibleSeqgen.v hls/GibleSeqgenproof.v # Put it first so that "make" without argument is like "make help". help: @@ -20,5 +20,6 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile + mkdir -p src/hls $(foreach d,$(VS_DOCS),cp ../src/$(d) src/$(d);) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/index.rst b/doc/index.rst index 06aa509..f5a7776 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -33,9 +33,11 @@ have all been proven correct, providing a verified translation from C to Verilog :caption: Sources src/Compiler - src/hls/RTLBlockInstr - src/hls/RTLBlockgen - src/hls/RTLBlockgenproof + src/hls/Gible.v + src/hls/GibleSeq.v + src/hls/GiblePar.v + src/hls/GibleSeqgen.v + src/hls/GibleSeqgenproof.v Publications ------------ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..63ef7a4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1656083042, + "narHash": "sha256-G6m/OAIcmoEWeS+DbU70aNv21QB3kZCtJuUo+33s5VY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "dc0380bb215ce001fcfccf4609d902115f87ddf9", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..563797f --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Vericert dependencies"; + + inputs = { nixpkgs.url = "github:nixos/nixpkgs"; }; + + outputs = { self, nixpkgs }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + ncoq = pkgs.coq_8_14; + ncoqPackages = pkgs.coqPackages_8_14; + in { + devShell.x86_64-linux = pkgs.mkShell { + buildInputs = with pkgs; + [ ncoq + dune_2 + gcc + ncoq.ocaml + ncoq.ocamlPackages.findlib + ncoq.ocamlPackages.menhir + ncoq.ocamlPackages.ocamlgraph + ncoq.ocamlPackages.menhirLib + + ncoq.ocamlPackages.ocp-indent + ncoq.ocamlPackages.utop + + ncoqPackages.serapi + python3 + python3Packages.alectryon + python3Packages.sphinx_rtd_theme + ]; + }; + }; +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index a80b1be..0000000 --- a/shell.nix +++ /dev/null @@ -1,8 +0,0 @@ -with import <nixpkgs> {}; - -mkShell { - buildInputs = (import ./.).buildInputs ++ [ ocamlPackages.ocp-indent - ocamlPackages.merlin ocamlPackages.utop - # (import ./.) - ]; -} diff --git a/src/hls/Gible.v b/src/hls/Gible.v index 399935b..8971535 100644 --- a/src/hls/Gible.v +++ b/src/hls/Gible.v @@ -16,9 +16,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. -============= -RTLBlockInstr -============= +===== +Gible +===== These instructions are used for ``RTLBlock`` and ``RTLPar``, so that they have consistent instructions, which greatly simplifies the proofs, as they will by diff --git a/src/hls/GiblePar.v b/src/hls/GiblePar.v index 9600d16..fcfb3d0 100644 --- a/src/hls/GiblePar.v +++ b/src/hls/GiblePar.v @@ -30,9 +30,9 @@ Require Import compcert.verilog.Op. Require Import vericert.hls.Gible. (*| -======== -RTLBlock -======== +========= +Gible Seq +========= |*) Module ParBB <: BlockType. diff --git a/src/hls/GiblePargen.v b/src/hls/GiblePargen.v index 3ccb765..778e0cd 100644 --- a/src/hls/GiblePargen.v +++ b/src/hls/GiblePargen.v @@ -40,9 +40,9 @@ Import NE.NonEmptyNotation. #[local] Open Scope pred_op. (*| -========= -RTLPargen -========= +==================== +Gible Par Generation +==================== Abstract Computations ===================== diff --git a/src/hls/GibleSeqgen.v b/src/hls/GibleSeqgen.v index 31dabf8..127ee53 100644 --- a/src/hls/GibleSeqgen.v +++ b/src/hls/GibleSeqgen.v @@ -16,10 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. -=========== -RTLBlockgen -=========== - .. coq:: none |*) @@ -36,6 +32,12 @@ Require Import vericert.hls.GibleSeq. #[local] Open Scope positive. +(*| +==================== +Gible Seq Generation +==================== +|*) + Definition check_valid_node (tc: code) (e: node) := match tc ! e with | Some _ => true diff --git a/src/hls/GibleSeqgenproof.v b/src/hls/GibleSeqgenproof.v index fd336ed..7451510 100644 --- a/src/hls/GibleSeqgenproof.v +++ b/src/hls/GibleSeqgenproof.v @@ -16,9 +16,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. -================ -RTLBlockgenproof -================ +========================== +Gible Seq Generation Proof +========================== .. coq:: none |*) diff --git a/src/hls/IfConversionproof.v b/src/hls/IfConversionproof.v index addc223..12cb2bb 100644 --- a/src/hls/IfConversionproof.v +++ b/src/hls/IfConversionproof.v @@ -133,7 +133,7 @@ Section CORRECTNESS. Proof using. unfold transf_fundef. unfold AST.transf_fundef; intros. destruct f. unfold transf_function. destruct_match; auto. auto. - Qed. + Admitted. Lemma functions_translated: forall (v: Values.val) (f: GibleSeq.fundef), @@ -163,7 +163,7 @@ Section CORRECTNESS. repeat ffts. Qed. - Lemma transf_initial_states : +(*) Lemma transf_initial_states : forall s1, initial_state prog s1 -> exists s2, initial_state tprog s2 /\ match_states None s1 s2. @@ -281,4 +281,6 @@ Section CORRECTNESS. - apply senv_preserved. Qed. + +*) End CORRECTNESS. |