-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathMakefile
276 lines (232 loc) · 10.1 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
#########################################################################
# Ott #
# #
# Peter Sewell, Computer Laboratory, University of Cambridge #
# Francesco Zappa Nardelli, Moscova project, INRIA Rocquencourt #
# #
# Copyright 2005-2011 #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided that the following conditions #
# are met: #
# 1. Redistributions of source code must retain the above copyright #
# notice, this list of conditions and the following disclaimer. #
# 2. 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. #
# 3. The names of the authors may not be used to endorse or promote #
# products derived from this software without specific prior written #
# permission. #
# #
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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. #
##########################################################################
# make world #############################################################
world:
cd src; $(MAKE) install
world.byt:
cd src; $(MAKE) install.byt
# cleanup ################################################################
clean:
cd src; $(MAKE) clean
rm -f *~
rm -f ott.install
# ott.install file ######################################################
ott.install : built_doc/*
cp ott.install.nodoc ott.install
echo "doc : [" >> ott.install
echo "\"README.md\" { \"README.md\" }" >> ott.install
echo "\"LICENCE\" { \"LICENSE\" }" >> ott.install
echo "\"built_doc/top2.pdf\" { \"doc/ott_manual.pdf\" }" >> ott.install
echo "\"built_doc/top2.html\" { \"doc/ott_manual.html\" }" >> ott.install
echo $(patsubst %, "\"%\"", $(wildcard built_doc/*.png)) >> ott.install
echo "]" >> ott.install
# tests ##################################################################
LATEX = latex
DVIPS = dvips
# normal case, e.g. "make tests/test8.out"
%.out: %.ott
bin/ott \
-o out.thy -o out.v -o outScript.sml \
-o out.tex \
$< \
&& ($(LATEX) out; $(DVIPS) out -o)
%.tex.out: %.ott
bin/ott \
-o out.tex \
$< \
&& ($(LATEX) out; $(DVIPS) out -o)
%.coq.out: %.ott
bin/ott \
-o out.v \
-o out.tex \
$< \
&& ($(LATEX) out; $(DVIPS) out -o)
%.hol.out: %.ott
bin/ott \
-o outScript.sml \
-o out.tex \
$< \
&& ($(LATEX) out; $(DVIPS) out -o)
%.isa.out: %.ott
bin/ott \
-o out.thy \
-o out.tex \
$< \
&& ($(LATEX) out; $(DVIPS) out -o)
# test10 special cases
test10: tests/test10.ott
bin/ott \
-o out.thy -o out.v -o outScript.sml \
-o out.tex \
-parse ":user_syntax: :user_syntax__t: :concrete: \x1'.x1'" \
-parse ":user_syntax: :concrete: \x1'.x1'" \
-parse ":user_syntax: \x1'.x1'" \
-parse ":concrete_t:\x1'.x1'" \
tests/test10.ott \
&& ($(LATEX) out; $(DVIPS) out -o)
test10st_halves: tests/test10st_first_half.ott tests/test10st_second_half.ott
bin/ott -o out.thy -o out.v -o out.tex \
-o outScript.sml \
tests/test10st_first_half.ott \
tests/test10st_second_half.ott \
&& ($(LATEX) out; $(DVIPS) out -o)
test10_isasyn: tests/test10_isasyn.ott
bin/ott -colour true -showraw false \
-o out.thy -o out.v -o out.tex \
-isa_syntax true \
-tex_show_meta true \
tests/test10_isasyn.ott \
&& ($(LATEX) out; $(DVIPS) out -o)
# test 7 special case - ott as a munger
test7afilter: tests/test7b.ott tests/test7t.mng
bin/ott -o out.sty \
-tex_show_meta false \
-tex_wrap false \
-tex_name_prefix ott \
-tex_filter tests/test7t.mng out.tex \
tests/test7b.ott \
&& ($(LATEX) out; $(DVIPS) out -o)
# TAPL examples
SYS_BOOL = \
examples/tapl/common.ott \
examples/tapl/bool.ott
SYS_ARITH = \
examples/tapl/nat.ott \
$(SYS_BOOL)
SYS_UNTYPED = \
examples/tapl/common.ott \
examples/tapl/bool.ott
SYS_PURESIMPLE = \
examples/tapl/common.ott \
examples/tapl/common_typing.ott \
examples/tapl/arrow_typing.ott
SYS_TYBOOL = \
examples/tapl/bool.ott \
examples/tapl/bool_typing.ott \
$(SYS_PURESIMPLE)
SYS_SORTOFFULLSIMPLE = \
examples/tapl/common.ott \
examples/tapl/common_typing.ott \
examples/tapl/common_labels.ott \
examples/tapl/common_index.ott \
examples/tapl/arrow_typing.ott \
examples/tapl/basety.ott \
examples/tapl/bool.ott \
examples/tapl/bool_typing.ott \
examples/tapl/nat.ott \
examples/tapl/nat_typing.ott \
examples/tapl/unit.ott \
examples/tapl/seq.ott \
examples/tapl/ascribe.ott \
examples/tapl/inert.ott \
examples/tapl/let.ott \
examples/tapl/sum.ott \
examples/tapl/variant.ott \
examples/tapl/product.ott \
examples/tapl/tuple.ott \
examples/tapl/record.ott \
examples/tapl/fix.ott
# examples/tapl/arrow.ott \
SYS_ROUGHLYFULLSIMPLE = \
examples/tapl/common.ott \
examples/tapl/common_index.ott \
examples/tapl/common_labels.ott \
examples/tapl/common_typing.ott \
examples/tapl/bool.ott \
examples/tapl/bool_typing.ott \
examples/tapl/nat.ott \
examples/tapl/nat_typing.ott \
examples/tapl/arrow_typing.ott \
examples/tapl/basety.ott \
examples/tapl/unit.ott \
examples/tapl/seq.ott \
examples/tapl/ascribe.ott \
examples/tapl/let.ott \
examples/tapl/product.ott \
examples/tapl/sum.ott \
examples/tapl/fix.ott \
examples/tapl/tuple.ott \
examples/tapl/variant.ott
# examples/tapl/record.ott
SYS_TUPLE = \
examples/tapl/common.ott \
examples/tapl/common_typing.ott \
examples/tapl/common_index.ott \
examples/tapl/unit.ott \
examples/tapl/tuple.ott
# examples/tapl/arrow.ott \
SYS_PURESUB = \
examples/tapl/common.ott \
examples/tapl/common_typing.ott \
examples/tapl/arrow_typing.ott \
examples/tapl/sub_arrow.ott \
examples/tapl/top.ott
SYS_PURERCDSUB = $(SYS_PURESUB) \
examples/tapl/common_labels.ott \
examples/tapl/common_index.ott \
examples/tapl/record.ott \
examples/tapl/sub_record.ott
sys-bool: $(SYS_BOOL)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_BOOL) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-arith: $(SYS_ARITH)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_ARITH) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-untyped: $(SYS_UNTYPED)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_UNTYPED) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-puresimple: $(SYS_PURESIMPLE)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_PURESIMPLE) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-tuple: $(SYS_TUPLE)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_TUPLE) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-tybool: $(SYS_TYBOOL)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_TYBOOL) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-sortoffullsimple: $(SYS_SORTOFFULLSIMPLE)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_SORTOFFULLSIMPLE) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-roughlyfullsimple: $(SYS_ROUGHLYFULLSIMPLE)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_ROUGHLYFULLSIMPLE) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-puresub: $(SYS_PURESUB)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_PURESUB) \
&& ($(LATEX) out; $(DVIPS) out -o)
sys-purercdsub: $(SYS_PURERCDSUB)
bin/ott -merge true -tex_show_meta false -o out.tex -o out.v -o out.thy -o outScript.sml $(SYS_PURERCDSUB) \
&& ($(LATEX) out; $(DVIPS) out -o)
# Jenksin regression
jenkins:
cd regression; \
make run-jenkins