Skip to content
Snippets Groups Projects
Unverified Commit 09826842 authored by Lennard Gäher's avatar Lennard Gäher
Browse files

remove coqproject by default

parent 3d1474c8
No related branches found
No related tags found
1 merge request!34Remove _CoqProject by default
Pipeline #99988 passed
......@@ -16,3 +16,4 @@ _opam
**/case_studies/*/log
**/case_studies/*/Cargo.lock
**/rustc-ice-*
_CoqProject
......@@ -110,3 +110,26 @@ builddep: builddep/refinedrust-builddep.opam
@echo "# Installing package $^."
@opam install $(OPAMFLAGS) $^
.PHONY: builddep
### Generating _CoqProject
define COQPROJECT_BASE_BODY
# RefinedRust core
-Q _build/default/theories/lithium lithium
-Q _build/default/theories/caesium caesium
-Q _build/default/theories/rust_typing refinedrust
-Q _build/default/case_studies/extra_proofs refinedrust.extra_proofs
endef
export COQPROJECT_BASE_BODY
coqproject-base:
@echo "$$COQPROJECT_BASE_BODY" > _CoqProject
case_studies/%.coqproject: coqproject-base
@echo "-Q _build/default/case_studies/$*/output/$* refinedrust.examples.$*" >> _CoqProject
coqproject-case-studies: $(CASE_STUDIES:=.coqproject)
coqproject: coqproject-base coqproject-case-studies
......@@ -102,7 +102,13 @@ The `lib_load_paths` config option influences where the verifier searches for th
The crate-level `rr::include` directive can be used to import these proof files (see the description in `SPEC_FORMAT.md`).
## Proof editing
In order to interactively look at the generated code using a Coq plugin like Coqtail, VSCoq, or Proof General for the editor of your choice, you need to add a line pointing to the directory of the generated code in the `_CoqProject` file.
You can interactively look at the generated Coq code using a Coq plugin like Coqtail, VSCoq, Proof General, or CoqIDE for the editor of your choice.
To do so, your editor needs to know about the Coq project structure.
As RefinedRust uses the `dune` build system to compile the Coq files, if your editor/plugin supports `dune`, it will automatically find the dependencies.
Otherwise, you will need to explicitly tell it how to find the dependencies in `dune`'s build directory.
You can generate a basic `_CoqProject` file that is read by your editor using `make coqproject`, which includes RefinedRust's core and the set of case studies.
If you add a new verification, you can manually add a line for your verification in this file.
See the existing includes for inspiration.
Changes to the `proof_*.v` files in the generated `proofs` folder are persistent and files are not changed once RefinedRust has generated them once.
......
-Q _build/default/theories/lithium lithium
-Q _build/default/theories/caesium caesium
-Q _build/default/theories/rust_typing refinedrust
-Q _build/default/case_studies/extra_proofs refinedrust.extra_proofs
# We sometimes want to locally override notation, and there is no good way to do that with scopes.
-arg -w -arg -notation-overridden
# Cannot use non-canonical projections as it causes massive unification failures
# (https://github.com/coq/coq/issues/6294).
-arg -w -arg -redundant-canonical-projection
# case studies
-Q _build/default/case_studies/tests/output/tests refinedrust.examples.tests
-Q _build/default/case_studies/paper-examples/output/paper_examples refinedrust.examples.paper_examples
-Q _build/default/case_studies/minivec/output/minivec refinedrust.examples.minivec
-Q _build/default/case_studies/evenint/output/evenint refinedrust.examples.evenint
# stdlib
-Q _build/default/stdlib/vec/target/verify/vec stdlib.alloc.vec
-Q _build/default/stdlib/option/target/verify/option stdlib.option.option
-Q _build/default/stdlib/alloc/target/verify/alloc stdlib.alloc.alloc
-Q _build/default/stdlib/spin/target/verify/spin stdlib.spin.spin
-Q _build/default/stdlib/spin/theories/ stdlib.spin.theories
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment