-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
62 lines (48 loc) · 1.53 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Targets to replay proofs for the concrete interpreter
replay-concrete-proofs=$(patsubst %, replay-concrete-proof-%, auxiliaries semantics interpreter)
replay-symbolic-proofs=$(patsubst %, replay-symbolic-proof-%, collection symbolicInterpreter)
.PHONY: build test doc clean install uninstall \
extract-why3 clean-why3 replay-proofs \
$(replay-concrete-proofs) $(replay-symbolic-proofs)
build: extract-why3
dune build @install
ln -sf _build/install/default/bin .
clean: clean-why3
dune clean
rm -f bin doc
install:
dune install
uninstall:
dune uninstall
doc: build
dune build @doc
[ -e doc ] || ln -s _build/default/_doc/_html doc
test: build
dune runtest
## Extract Why3 to OCaml
extract-why3:
mkdir -p src/why3
rm -f src/why3/*
why3 extract --modular --recursive \
-D ocaml64 \
-D src/language/driver.drv \
-D src/concrete/driver.drv \
-D src/symbolic/driver.drv \
-L src/language \
-L src/concrete \
-L src/symbolic \
-o src/why3 \
interpreter.Interpreter \
symbolicInterpreter.Interpreter
clean-why3:
rm -rf src/why3
## Replay Why3 proofs
replay-proofs: $(replay-concrete-proofs) $(replay-symbolic-proofs)
$(replay-concrete-proofs): replay-concrete-proof-%: src/concrete/%.mlw src/concrete/%/why3session.xml
why3 replay --use-steps --quiet \
-L src/language -L src/concrete \
src/concrete/$*
$(replay-symbolic-proofs): replay-symbolic-proof-%: src/symbolic/%.mlw src/symbolic/%/why3session.xml
why3 replay --use-steps --quiet \
-L src/language -L src/concrete -L src/symbolic \
src/symbolic/$*