Skip to content

Commit 13ea432

Browse files
initial initiave to translate bdd hol4 to cakeml
1 parent fa9b2c6 commit 13ea432

File tree

2 files changed

+449
-0
lines changed

2 files changed

+449
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# includes
2+
# ----------------------------------
3+
4+
CAKEMLDIR = ../../../cakeml
5+
6+
DEPENDENCIES = .. \
7+
$(CAKEMLDIR)/misc \
8+
$(CAKEMLDIR)/semantics \
9+
$(CAKEMLDIR)/semantics/proofs \
10+
$(CAKEMLDIR)/basis/pure \
11+
$(CAKEMLDIR)/basis \
12+
$(CAKEMLDIR)/translator \
13+
$(CAKEMLDIR)/cv_translator \
14+
$(CAKEMLDIR)/characteristic \
15+
$(CAKEMLDIR)/compiler/parsing \
16+
$(CAKEMLDIR)/unverified/sexpr-bootstrap
17+
18+
19+
# configuration
20+
# ----------------------------------
21+
HOLHEAP = ../policy_to_table-heap
22+
NEWHOLHEAP = bdd_cake_trans-heap
23+
24+
HEAPINC_EXTRA = wordsLib
25+
26+
27+
# included lines follow
28+
# ----------------------------------
29+
30+
# automatic Holmake targets (all theories and non-"Script.sml" .sml files)
31+
# automatic heap inclusion by name pattern
32+
# ----------------------------------
33+
SMLFILES = $(subst *.sml,, $(patsubst %Script.sml,%Theory.sml,$(wildcard *.sml)))
34+
TARGETS = $(patsubst %.sml,%.uo,$(SMLFILES))
35+
36+
HEAPINC = $(subst *Theory,,$(patsubst %Script.sml,%Theory ,$(wildcard *Script.sml))) \
37+
$(subst *Syntax,,$(patsubst %.sml,% ,$(wildcard *Syntax.sml))) \
38+
$(subst *Simps,, $(patsubst %.sml,% ,$(wildcard *Simps.sml ))) \
39+
$(subst *Lib,, $(patsubst %.sml,% ,$(wildcard *Lib.sml ))) \
40+
$(HEAPINC_EXTRA)
41+
42+
43+
# general configs
44+
# ----------------------------------
45+
all: $(TARGETS) $(if $(NEWHOLHEAP),$(NEWHOLHEAP),)
46+
47+
INCLUDES = $(DEPENDENCIES) $(if $(HOLHEAP),$(shell dirname $(HOLHEAP)),)
48+
49+
EXTRA_CLEANS = $(if $(NEWHOLHEAP),$(NEWHOLHEAP) $(NEWHOLHEAP).o,) $(wildcard *.exe)
50+
51+
OPTIONS = QUIT_ON_FAILURE
52+
53+
default: all
54+
55+
.PHONY: all default
56+
57+
58+
# holheap part
59+
# ----------------------------------
60+
ifdef POLY
61+
62+
$(NEWHOLHEAP): $(TARGETS) $(HOLHEAP)
63+
$(protect $(HOLDIR)/bin/buildheap) $(if $(HOLHEAP),-b $(HOLHEAP),) -o $@ $(HEAPINC)
64+
65+
endif
66+

0 commit comments

Comments
 (0)