author | paulson |
Fri, 06 Dec 1996 10:41:35 +0100 | |
changeset 2329 | 55060cfeda1b |
parent 2279 | 2f337bf81085 |
child 2371 | c5dc6f8b385b |
permissions | -rw-r--r-- |
1296 | 1 |
# $Id$ |
923 | 2 |
######################################################################### |
3 |
# # |
|
2094 | 4 |
# Makefile for Isabelle (HOL) # |
923 | 5 |
# # |
6 |
######################################################################### |
|
7 |
||
8 |
#To make the system, cd to this directory and type |
|
1296 | 9 |
# make |
923 | 10 |
#To make the system and test it on standard examples, type |
1296 | 11 |
# make test |
12 |
#To generate HTML files for every theory, set the environment variable |
|
13 |
#MAKE_HTML or add the parameter "MAKE_HTML=". |
|
923 | 14 |
|
15 |
#Environment variable ISABELLECOMP specifies the compiler. |
|
16 |
#Environment variable ISABELLEBIN specifies the destination directory. |
|
17 |
#For Poly/ML, ISABELLEBIN must begin with a / |
|
18 |
||
19 |
#Makes pure Isabelle (Pure) if this file is ABSENT -- but not |
|
20 |
#if it is out of date, since this Makefile does not know its dependencies! |
|
21 |
||
22 |
BIN = $(ISABELLEBIN) |
|
23 |
COMP = $(ISABELLECOMP) |
|
1129 | 24 |
NAMES = HOL Ord Set Fun subset equalities Prod Relation Trancl Sum WF \ |
2094 | 25 |
mono Lfp Gfp Nat intr_elim indrule Inductive Finite Arith \ |
26 |
Sexp Univ List RelPow Option |
|
923 | 27 |
|
28 |
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\ |
|
1981 | 29 |
ind_syntax.ML cladata.ML simpdata.ML\ |
1665 | 30 |
typedef.ML thy_syntax.ML thy_data.ML ../Pure/section_utils.ML\ |
944
01d6571fa106
Added dependencies on ../Provers/hypsubst.ML and removed those on
nipkow
parents:
923
diff
changeset
|
31 |
../Provers/hypsubst.ML ../Provers/classical.ML\ |
2094 | 32 |
../Provers/simplifier.ML ../Provers/splitter.ML\ |
33 |
$(NAMES:%=%.thy) $(NAMES:%=%.ML) |
|
923 | 34 |
|
1164 | 35 |
$(BIN)/HOL: $(BIN)/Pure $(FILES) |
2117 | 36 |
@if [ -d $${ISABELLEBIN:?}/Pure ];\ |
2094 | 37 |
then echo Bad value for ISABELLEBIN: \ |
38 |
$(BIN) is the Isabelle source directory; \ |
|
39 |
exit 1; \ |
|
2117 | 40 |
fi |
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
41 |
@case `basename "$(COMP)"` in \ |
1164 | 42 |
poly*) echo 'make_database"$(BIN)/HOL"; quit();' \ |
1296 | 43 |
| $(COMP) $(BIN)/Pure;\ |
2094 | 44 |
if [ "$${MAKE_HTML}" = "true" ]; \ |
45 |
then echo 'open PolyML; make_html := true; exit_use_dir".";' \ |
|
46 |
| $(COMP) $(BIN)/HOL;\ |
|
1491 | 47 |
elif [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 48 |
then echo 'open PolyML; make_html := true; exit_use_dir"."; make_html := false;' | $(COMP) $(BIN)/HOL;\ |
49 |
else echo 'open PolyML; exit_use_dir".";' \ |
|
50 |
| $(COMP) $(BIN)/HOL;\ |
|
51 |
fi;\ |
|
2023
aa25f20c5d8b
Calls discgarb -c to realize dramatic space savings!
paulson
parents:
2019
diff
changeset
|
52 |
discgarb -c $(BIN)/HOL;;\ |
1491 | 53 |
sml*) if [ "$${MAKE_HTML}" = "true" ]; \ |
2094 | 54 |
then echo 'make_html := true; exit_use_dir"."; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure;\ |
55 |
elif [ "$${MAKE_HTML-undefined}" != "undefined" ];\ |
|
56 |
then echo 'make_html := true; exit_use_dir"."; make_html := false; xML"$(BIN)/HOL" banner;' \ |
|
57 |
| $(BIN)/Pure;\ |
|
58 |
else echo 'exit_use_dir"."; xML"$(BIN)/HOL" banner;' \ |
|
59 |
| $(BIN)/Pure;\ |
|
60 |
fi;;\ |
|
923 | 61 |
*) echo Bad value for ISABELLECOMP: \ |
2117 | 62 |
\"$(COMP)\" is not poly or sml; exit 1;;\ |
923 | 63 |
esac |
64 |
||
65 |
$(BIN)/Pure: |
|
66 |
cd ../Pure; $(MAKE) |
|
67 |
||
1164 | 68 |
#### Testing of HOL |
923 | 69 |
|
70 |
#A macro referring to the object-logic (depends on ML compiler) |
|
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
71 |
# [Thanks to Thomas Santen and Stephan Herrmann from GMD First] |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
72 |
LOGIC=`case \`basename "$(ISABELLECOMP)"\` in \ |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
73 |
poly*) echo "$(ISABELLECOMP) $(ISABELLEBIN)/HOL" ;;\ |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
74 |
sml*) echo "$(ISABELLEBIN)/HOL" ;;\ |
2117 | 75 |
*) echo "echo; echo Bad value for ISABELLECOMP: \ |
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
76 |
$(ISABELLECOMP) is not poly or sml; exit 1" ;;\ |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
77 |
esac` |
923 | 78 |
|
79 |
##IMP-semantics example |
|
1699 | 80 |
IMP_NAMES = Expr Com Natural Transition Denotation Hoare VC |
1044 | 81 |
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML) |
923 | 82 |
|
2094 | 83 |
IMP: $(BIN)/HOL $(IMP_FILES) |
2117 | 84 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 85 |
then echo 'make_html := true; exit_use_dir"IMP";quit();' | $(LOGIC); \ |
86 |
else echo 'exit_use_dir"IMP";quit();' | $(LOGIC); \ |
|
87 |
fi |
|
923 | 88 |
|
1336 | 89 |
##Hoare logic |
90 |
Hoare_NAMES = Hoare Arith2 Examples |
|
1491 | 91 |
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) \ |
2094 | 92 |
$(Hoare_NAMES:%=Hoare/%.ML) |
1336 | 93 |
|
2094 | 94 |
Hoare: $(BIN)/HOL $(Hoare_FILES) |
2117 | 95 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 96 |
then echo 'make_html := true; exit_use_dir"Hoare";quit();' | $(LOGIC);\ |
97 |
else echo 'exit_use_dir"Hoare";quit();' | $(LOGIC); \ |
|
98 |
fi |
|
1336 | 99 |
|
1164 | 100 |
##The integers in HOL |
2279 | 101 |
INTEG_NAMES = Equiv Integ Group Ring Lagrange IntRingDefs IntRing |
923 | 102 |
|
1044 | 103 |
INTEG_FILES = Integ/ROOT.ML \ |
2094 | 104 |
$(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML) |
923 | 105 |
|
2094 | 106 |
Integ: $(BIN)/HOL $(INTEG_FILES) |
2117 | 107 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 108 |
then echo 'make_html := true; exit_use_dir"Integ";quit();' | $(LOGIC);\ |
109 |
else echo 'exit_use_dir"Integ";quit();' | $(LOGIC); \ |
|
110 |
fi |
|
923 | 111 |
|
112 |
##I/O Automata |
|
1063 | 113 |
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\ |
2094 | 114 |
Receiver Sender |
1063 | 115 |
IOA_ABP_NAMES = Action Correctness Lemmas |
2019 | 116 |
IOA_MT_NAMES = Asig IOA Solve |
923 | 117 |
|
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
118 |
IOA_FILES = IOA/NTP/ROOT.ML IOA/ABP/ROOT.ML IOA/NTP/Spec.thy\ |
1063 | 119 |
$(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\ |
120 |
IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\ |
|
121 |
IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\ |
|
122 |
IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\ |
|
123 |
$(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\ |
|
1044 | 124 |
$(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML) |
923 | 125 |
|
2094 | 126 |
IOA: $(BIN)/HOL $(IOA_FILES) |
2117 | 127 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 128 |
then echo 'make_html := true; exit_use_dir"IOA/NTP";quit();' \ |
129 |
| $(LOGIC);\ |
|
130 |
echo 'make_html := true; exit_use_dir"IOA/ABP";quit();' \ |
|
131 |
| $(LOGIC);\ |
|
132 |
else echo 'exit_use_dir"IOA/NTP";quit();' | $(LOGIC); \ |
|
1491 | 133 |
echo 'exit_use_dir"IOA/ABP";quit();' | $(LOGIC); \ |
2094 | 134 |
fi |
923 | 135 |
|
1972 | 136 |
|
137 |
##Authentication & Security Protocols |
|
2117 | 138 |
Auth_NAMES = Message Shared NS_Shared OtwayRees OtwayRees_AN OtwayRees_Bad \ |
2329 | 139 |
WooLam Yahalom Yahalom2 Public NS_Public_Bad NS_Public |
1972 | 140 |
|
141 |
AUTH_FILES = Auth/ROOT.ML $(AUTH_NAMES:%=Auth/%.thy) $(AUTH_NAMES:%=Auth/%.ML) |
|
142 |
||
2094 | 143 |
Auth: $(BIN)/HOL $(AUTH_FILES) |
2117 | 144 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 145 |
then echo 'make_html := true; exit_use_dir"Auth";quit();' | $(LOGIC);\ |
146 |
else echo 'exit_use_dir"Auth";quit();' | $(LOGIC); \ |
|
147 |
fi |
|
1972 | 148 |
|
149 |
||
923 | 150 |
##Properties of substitutions |
1044 | 151 |
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas |
923 | 152 |
|
1044 | 153 |
SUBST_FILES = Subst/ROOT.ML \ |
2094 | 154 |
$(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML) |
923 | 155 |
|
2094 | 156 |
Subst: $(BIN)/HOL $(SUBST_FILES) |
2117 | 157 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 158 |
then echo 'make_html := true; exit_use_dir"Subst";quit();' | $(LOGIC);\ |
159 |
else echo 'exit_use_dir"Subst";quit();' | $(LOGIC); \ |
|
160 |
fi |
|
923 | 161 |
|
1125 | 162 |
##Confluence of Lambda-calculus |
1270 | 163 |
LAMBDA_NAMES = Lambda ParRed Commutation Eta |
1125 | 164 |
|
165 |
LAMBDA_FILES = Lambda/ROOT.ML \ |
|
2094 | 166 |
$(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML) |
1125 | 167 |
|
2094 | 168 |
Lambda: $(BIN)/HOL $(LAMBDA_FILES) |
2117 | 169 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 170 |
then echo 'make_html := true; exit_use_dir"Lambda";quit();' \ |
171 |
| $(LOGIC);\ |
|
172 |
else echo 'exit_use_dir"Lambda";quit();' | $(LOGIC); \ |
|
173 |
fi |
|
1125 | 174 |
|
1343 | 175 |
##Type inference for MiniML |
1301 | 176 |
MINIML_NAMES = I Maybe MiniML Type W |
177 |
||
1343 | 178 |
MINIML_FILES = MiniML/ROOT.ML \ |
2094 | 179 |
$(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML) |
1301 | 180 |
|
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
181 |
MiniML: $(BIN)/HOL $(MINIML_FILES) |
2117 | 182 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 183 |
then echo 'make_html := true; exit_use_dir"MiniML";quit();' \ |
184 |
| $(LOGIC);\ |
|
185 |
else echo 'exit_use_dir"MiniML";quit();' | $(LOGIC); \ |
|
186 |
fi |
|
1301 | 187 |
|
1343 | 188 |
##Lexical analysis |
189 |
LEX_FILES = Auto AutoChopper Chopper Prefix |
|
190 |
||
191 |
LEX_FILES = Lex/ROOT.ML \ |
|
2094 | 192 |
$(LEX_NAMES:%=Lex/%.thy) $(LEX_NAMES:%=Lex/%.ML) |
1343 | 193 |
|
194 |
Lex: $(BIN)/HOL $(LEX_FILES) |
|
2117 | 195 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 196 |
then echo 'make_html := true; exit_use_dir"Lex";quit();' | $(LOGIC);\ |
197 |
else echo 'exit_use_dir"Lex";quit();' | $(LOGIC); \ |
|
198 |
fi |
|
1343 | 199 |
|
923 | 200 |
##Miscellaneous examples |
2279 | 201 |
EX_NAMES = String BT Perm Comb InSort Qsort LexProd \ |
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
202 |
Puzzle Mutil Primes NatSum SList LList Acc PropLog Term Simult MT |
923 | 203 |
|
204 |
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \ |
|
2094 | 205 |
ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML) |
923 | 206 |
|
2094 | 207 |
ex: $(BIN)/HOL $(EX_FILES) |
2117 | 208 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 209 |
then echo 'make_html := true; exit_use_dir"ex";quit();' | $(LOGIC);\ |
210 |
else echo 'exit_use_dir"ex";quit();' | $(LOGIC); \ |
|
211 |
fi |
|
923 | 212 |
|
1343 | 213 |
#Full test. |
2094 | 214 |
test: $(BIN)/HOL IMP Hoare Lex Integ Auth Subst Lambda MiniML IOA ex |
923 | 215 |
echo 'Test examples ran successfully' > test |
216 |
||
1164 | 217 |
.PRECIOUS: $(BIN)/Pure $(BIN)/HOL |