diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32b25a57..13323c5d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Test Compilation for OCaml +name: Compilation for Griotte # Prevent parallel CI: Stop every workflow of a branch concurrency: @@ -74,3 +74,14 @@ jobs: eval "$(opam env)" opam exec -- dune build --display short -j ${{ env.JOBS_LIMIT }} --trace-file griotte.trc ./pretty-print-trace.sh griotte.trc + + - name: Build docs + run: opam exec -- make html + + - name: Deploy docs (if main branch) + uses: peaceiris/actions-gh-pages@v4 + if: ${{ steps.get_branch.outputs.branch == 'main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./html + destination_dir: dev diff --git a/.gitignore b/.gitignore index dc326721..c12ca8d4 100644 --- a/.gitignore +++ b/.gitignore @@ -297,4 +297,5 @@ Makefile.coq Makefile.coq.conf _build/ +html/ *.trc diff --git a/Makefile b/Makefile index f5c37be9..7ddc811e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ -.PHONY: all theories doc +EXTRA_DIR = rocqdoc_extra +BUILD_DOC_DIR = _build/default/theories/cap_machine.html +PUBLISH_DIR = html -all: theories doc +.PHONY: all theories rocqdoc html + +all: theories rocqdoc theories: dune build --display short --trace-file griotte.trc @@ -8,11 +12,19 @@ theories: pretty-timed: theories ./pretty-print-trace.sh griotte.trc -doc: +rocqdoc: theories dune build @doc --display short +html: rocqdoc + rm -rf $(PUBLISH_DIR) + mkdir $(PUBLISH_DIR) + cp $(BUILD_DOC_DIR)/* $(PUBLISH_DIR) + chmod -R +w $(PUBLISH_DIR) + cp $(EXTRA_DIR)/resources/* $(PUBLISH_DIR) + clean: dune clean + rm -rf $(PUBLISH_DIR) rm -f griotte.trc # Adapted from https://github.com/AbsInt/CompCert/blob/master/Makefile diff --git a/README.md b/README.md index 79a46064..81a760ee 100644 --- a/README.md +++ b/README.md @@ -163,9 +163,6 @@ The organisation of the `theories/` folder is as follows. - `region_invariants_allocation.v`: Lemmas for allocating a range of standard resources. -- `world_interp_allocation_compartments.v`: - Lemmas for allocating standard resources for adversary compartments. - - `model_interp_stack.v`: Definitions and lemmas specific to reasoning about the stack region. @@ -174,6 +171,13 @@ The organisation of the `theories/` folder is as follows. - `world_ghost_theory.v`: Ghost theory of world interpretation. Clean interface with the model to ease the proofs for the user. + +- `world_interp_allocation_compartments.v`: + Lemmas for allocating standard resources for adversary compartments. + +- `world_interp_stack.v`: + Extension of the ghost theory of world interpretation, + specific to stack region. ## Logical relation and FTLR `logrel/` @@ -186,7 +190,7 @@ The organisation of the `theories/` folder is as follows. - `world_interp_stack.v`: A collections of lemmas related to world manipulation in presence of safe-to-share. -- `monotone.v`: Proof of the monotonicity of the value relation with regards to +- `ftlr/monotone.v`: Proof of the monotonicity of the value relation with regards to public future worlds, and private future worlds for non local words. - `fundamental.v`: Contains *Fundamental Theorem of Logical @@ -198,10 +202,6 @@ The organisation of the `theories/` folder is as follows. Definition of resources to have a clean interface with manipulation of the world, for stack region. -- `world_interp_stack.v`: - Extension of the ghost theory of world interpretation, - specific to stack region. - ## Switcher `switcher/` - `switcher.v`: Code of the Griotte switcher. diff --git a/dune-project b/dune-project index e67e85a2..d12e5252 100644 --- a/dune-project +++ b/dune-project @@ -18,7 +18,7 @@ (name griotte) (synopsis "Griotte") (description "Griotte") - (depends ocaml dune rocq-iris equations) + (depends ocaml dune odoc rocq-iris equations) (tags (Rocq CHERIoT "capability machine" Iris))) diff --git a/opam b/opam index afad613b..7daf48ca 100644 --- a/opam +++ b/opam @@ -5,6 +5,7 @@ maintainer: "" authors: [ "anonymous" ] depends: [ "dune" {= "3.21.0"} + "odoc" "rocq-core" {= "9.1.1"} "rocq-stdlib" {= "9.0.0"} "rocq-stdpp" {= "1.13.0"} diff --git a/rocqdoc_extra/LICENSE b/rocqdoc_extra/LICENSE new file mode 100644 index 00000000..9cc94e57 --- /dev/null +++ b/rocqdoc_extra/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2016, Tobias Tebbi +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/rocqdoc_extra/footer.html b/rocqdoc_extra/footer.html new file mode 100644 index 00000000..d0f79a88 --- /dev/null +++ b/rocqdoc_extra/footer.html @@ -0,0 +1,8 @@ + +
+ +