summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSon HO2022-10-21 11:14:15 +0200
committerGitHub2022-10-21 11:14:15 +0200
commitb4be489e7a5753bcc7f8714273ae71260fac53ce (patch)
tree45459740595bcdd70e5f4856b8499d1680d4ab91 /Makefile
parent53a2b8a2989485e8885d02c786206de84c9fd91d (diff)
parentd62563cf9b8ef29ce20e810a5b1da999122c7a2f (diff)
Merge pull request #4 from AeneasVerif/son_update_charon
Update the code to account for changes in Charon
Diffstat (limited to '')
-rw-r--r--Makefile35
1 files changed, 20 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index e92b2b9b..c59aec01 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ ifeq (3.81,$(MAKE_VERSION))
install make, then invoke gmake instead of make)
endif
-all: build-test-verify
+all: build-tests-verify
CHARON_HOME = ../charon
CHARON_EXEC = $(CHARON_HOME)/charon
@@ -25,7 +25,7 @@ SUBDIR :=
# Build the project, test it and verify the generated files
.PHONY: build-test-verify
-build-test-verify: build test verify
+build-tests-verify: build tests verify
# Build the project
.PHONY: build
@@ -33,15 +33,15 @@ build:
dune build src/main.exe
# Test the project by translating test files to F*
-.PHONY: test
-test: build trans-no_nested_borrows trans-paper \
+.PHONY: tests
+tests: build trans-no_nested_borrows trans-paper \
trans-hashmap trans-hashmap_main \
trans-external trans-constants \
- trans-nll-betree_nll trans-nll-betree_main
+ trans-polonius-betree_polonius trans-polonius-betree_main
# Verify the F* files generated by the translation
.PHONY: verify
-verify: build test
+verify: build tests
cd tests && $(MAKE) all
# Reformat the project
@@ -60,8 +60,8 @@ trans-hashmap: SUBDIR:=hashmap
trans-hashmap_main: TRANS_OPTIONS += -template-clauses
trans-hashmap_main: SUBDIR:=hashmap_on_disk
-trans-nll-betree_nll: TRANS_OPTIONS += -test-units -no-split-files -no-state -no-decreases-clauses
-trans-nll-betree_nll: SUBDIR:=misc
+trans-polonius-betree_polonius: TRANS_OPTIONS += -test-units -no-split-files -no-state -no-decreases-clauses
+trans-polonius-betree_polonius: SUBDIR:=misc
trans-constants: TRANS_OPTIONS += -test-units -no-split-files -no-state -no-decreases-clauses
trans-constants: SUBDIR:=misc
@@ -69,26 +69,31 @@ trans-constants: SUBDIR:=misc
trans-external: TRANS_OPTIONS +=
trans-external: SUBDIR:=misc
-trans-nll-betree_main: TRANS_OPTIONS += -template-clauses
-trans-nll-betree_main: SUBDIR:=betree
+trans-polonius-betree_main: TRANS_OPTIONS += -template-clauses
+trans-polonius-betree_main: SUBDIR:=betree
# Generic rules to extract the LLBC from a rust file
# We use the rules in Charon's Makefile to generate the .llbc files: the options
# vary with the test files.
+.PHONY: gen-llbc-polonius-%
+gen-llbc-polonius-%: build
+ cd $(CHARON_HOME)/tests-polonius && $(MAKE) test-$*
+
.PHONY: gen-llbc-%
gen-llbc-%: build
- cd $(CHARON_HOME) && $(MAKE) test-$*
+ cd $(CHARON_HOME)/tests && $(MAKE) test-$*
# Generic rule to test the translation of an LLBC file.
-# Note that the non-linear lifetime files are generated in the tests-nll subdirectory.
+# Note that the files requiring the Polonius borrow-checker are generated
+# in the tests-polonius subdirectory.
.PHONY: trans-%
trans-%: CHARON_TESTS_DIR = $(CHARON_HOME)/tests/llbc
-trans-nll-%: CHARON_TESTS_DIR = $(CHARON_HOME)/tests-nll/llbc
+trans-polonius-%: CHARON_TESTS_DIR = $(CHARON_HOME)/tests-polonius/llbc
-trans-%: gen-llbc-%
+trans-polonius-%: gen-llbc-polonius-%
dune exec -- src/main.exe $(CHARON_TESTS_DIR)/$*.llbc -dest $(DEST_DIR)/$(SUBDIR) $(TRANS_OPTIONS)
-trans-nll-%: gen-llbc-nll-%
+trans-%: gen-llbc-%
dune exec -- src/main.exe $(CHARON_TESTS_DIR)/$*.llbc -dest $(DEST_DIR)/$(SUBDIR) $(TRANS_OPTIONS)
.PHONY: doc