author | paulson |
Fri, 11 Oct 1996 10:52:54 +0200 | |
changeset 2091 | 644104f85d14 |
parent 2023 | aa25f20c5d8b |
child 2094 | 2061df98aab5 |
permissions | -rw-r--r-- |
1296 | 1 |
# $Id$ |
923 | 2 |
######################################################################### |
3 |
# # |
|
1164 | 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 \ |
1862 | 25 |
mono Lfp Gfp Nat intr_elim indrule Inductive Finite Arith \ |
2019 | 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\ |
01d6571fa106
Added dependencies on ../Provers/hypsubst.ML and removed those on
nipkow
parents:
923
diff
changeset
|
32 |
../Provers/simplifier.ML ../Provers/splitter.ML\ |
1044 | 33 |
$(NAMES:%=%.thy) $(NAMES:%=%.ML) |
923 | 34 |
|
1164 | 35 |
$(BIN)/HOL: $(BIN)/Pure $(FILES) |
923 | 36 |
if [ -d $${ISABELLEBIN:?}/Pure ];\ |
37 |
then echo Bad value for ISABELLEBIN: \ |
|
38 |
$(BIN) is the Isabelle source directory; \ |
|
39 |
exit 1; \ |
|
40 |
fi;\ |
|
41 |
case "$(COMP)" in \ |
|
1164 | 42 |
poly*) echo 'make_database"$(BIN)/HOL"; quit();' \ |
1296 | 43 |
| $(COMP) $(BIN)/Pure;\ |
1491 | 44 |
if [ "$${MAKE_HTML}" = "true" ]; \ |
1357 | 45 |
then echo 'open PolyML; make_html := true; exit_use_dir".";' \ |
1491 | 46 |
| $(COMP) $(BIN)/HOL;\ |
47 |
elif [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
|
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".";' \ |
|
1357 | 50 |
| $(COMP) $(BIN)/HOL;\ |
2023
aa25f20c5d8b
Calls discgarb -c to realize dramatic space savings!
paulson
parents:
2019
diff
changeset
|
51 |
fi;\ |
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" ]; \ |
1367 | 54 |
then echo 'make_html := true; exit_use_dir"."; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure;\ |
1491 | 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;\ |
|
1357 | 58 |
else echo 'exit_use_dir"."; xML"$(BIN)/HOL" banner;' \ |
1296 | 59 |
| $(BIN)/Pure;\ |
60 |
fi;;\ |
|
923 | 61 |
*) echo Bad value for ISABELLECOMP: \ |
62 |
$(COMP) is not poly or sml; exit 1;;\ |
|
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) |
|
71 |
LOGIC:sh=case $ISABELLECOMP in \ |
|
1164 | 72 |
poly*) echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\ |
73 |
sml*) echo "$ISABELLEBIN/HOL" ;;\ |
|
923 | 74 |
*) echo "echo Bad value for ISABELLECOMP: \ |
75 |
$ISABELLEBIN is not poly or sml; exit 1" ;;\ |
|
76 |
esac |
|
77 |
||
78 |
##IMP-semantics example |
|
1699 | 79 |
IMP_NAMES = Expr Com Natural Transition Denotation Hoare VC |
1044 | 80 |
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML) |
923 | 81 |
|
1164 | 82 |
IMP: $(BIN)/HOL $(IMP_FILES) |
1491 | 83 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
84 |
then echo 'make_html := true; exit_use_dir"IMP";quit();' | $(LOGIC); \ |
|
85 |
else echo 'exit_use_dir"IMP";quit();' | $(LOGIC); \ |
|
86 |
fi |
|
923 | 87 |
|
1336 | 88 |
##Hoare logic |
89 |
Hoare_NAMES = Hoare Arith2 Examples |
|
1491 | 90 |
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) \ |
91 |
$(Hoare_NAMES:%=Hoare/%.ML) |
|
1336 | 92 |
|
93 |
Hoare: $(BIN)/HOL $(Hoare_FILES) |
|
1491 | 94 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
95 |
then echo 'make_html := true; exit_use_dir"Hoare";quit();' | $(LOGIC);\ |
|
96 |
else echo 'exit_use_dir"Hoare";quit();' | $(LOGIC); \ |
|
97 |
fi |
|
1336 | 98 |
|
1164 | 99 |
##The integers in HOL |
1129 | 100 |
INTEG_NAMES = Equiv Integ |
923 | 101 |
|
1044 | 102 |
INTEG_FILES = Integ/ROOT.ML \ |
103 |
$(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML) |
|
923 | 104 |
|
1164 | 105 |
Integ: $(BIN)/HOL $(INTEG_FILES) |
1491 | 106 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
107 |
then echo 'make_html := true; exit_use_dir"Integ";quit();' | $(LOGIC);\ |
|
108 |
else echo 'exit_use_dir"Integ";quit();' | $(LOGIC); \ |
|
109 |
fi |
|
923 | 110 |
|
111 |
##I/O Automata |
|
1063 | 112 |
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\ |
113 |
Receiver Sender |
|
114 |
IOA_ABP_NAMES = Action Correctness Lemmas |
|
2019 | 115 |
IOA_MT_NAMES = Asig IOA Solve |
923 | 116 |
|
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
117 |
IOA_FILES = IOA/NTP/ROOT.ML IOA/ABP/ROOT.ML IOA/NTP/Spec.thy\ |
1063 | 118 |
$(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\ |
119 |
IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\ |
|
120 |
IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\ |
|
121 |
IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\ |
|
122 |
$(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\ |
|
1044 | 123 |
$(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML) |
923 | 124 |
|
1164 | 125 |
IOA: $(BIN)/HOL $(IOA_FILES) |
1491 | 126 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
127 |
then echo 'make_html := true; exit_use_dir"IOA/NTP";quit();' \ |
|
128 |
| $(LOGIC);\ |
|
129 |
echo 'make_html := true; exit_use_dir"IOA/ABP";quit();' \ |
|
130 |
| $(LOGIC);\ |
|
131 |
else echo 'exit_use_dir"IOA/NTP";quit();' | $(LOGIC); \ |
|
132 |
echo 'exit_use_dir"IOA/ABP";quit();' | $(LOGIC); \ |
|
133 |
fi |
|
923 | 134 |
|
1972 | 135 |
|
136 |
##Authentication & Security Protocols |
|
2091 | 137 |
Auth_NAMES = Message Shared NS_Shared OtwayRees OtwayRees_AN Yahalom |
1972 | 138 |
|
139 |
AUTH_FILES = Auth/ROOT.ML $(AUTH_NAMES:%=Auth/%.thy) $(AUTH_NAMES:%=Auth/%.ML) |
|
140 |
||
141 |
Auth: $(BIN)/HOL $(AUTH_FILES) |
|
142 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
|
143 |
then echo 'make_html := true; exit_use_dir"Auth";quit();' | $(LOGIC);\ |
|
144 |
else echo 'exit_use_dir"Auth";quit();' | $(LOGIC); \ |
|
145 |
fi |
|
146 |
||
147 |
||
923 | 148 |
##Properties of substitutions |
1044 | 149 |
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas |
923 | 150 |
|
1044 | 151 |
SUBST_FILES = Subst/ROOT.ML \ |
152 |
$(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML) |
|
923 | 153 |
|
1164 | 154 |
Subst: $(BIN)/HOL $(SUBST_FILES) |
1491 | 155 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
156 |
then echo 'make_html := true; exit_use_dir"Subst";quit();' | $(LOGIC);\ |
|
157 |
else echo 'exit_use_dir"Subst";quit();' | $(LOGIC); \ |
|
158 |
fi |
|
923 | 159 |
|
1125 | 160 |
##Confluence of Lambda-calculus |
1270 | 161 |
LAMBDA_NAMES = Lambda ParRed Commutation Eta |
1125 | 162 |
|
163 |
LAMBDA_FILES = Lambda/ROOT.ML \ |
|
164 |
$(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML) |
|
165 |
||
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
166 |
Lambda: $(BIN)/HOL $(LAMBDA_FILES) |
1491 | 167 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
168 |
then echo 'make_html := true; exit_use_dir"Lambda";quit();' \ |
|
169 |
| $(LOGIC);\ |
|
170 |
else echo 'exit_use_dir"Lambda";quit();' | $(LOGIC); \ |
|
171 |
fi |
|
1125 | 172 |
|
1343 | 173 |
##Type inference for MiniML |
1301 | 174 |
MINIML_NAMES = I Maybe MiniML Type W |
175 |
||
1343 | 176 |
MINIML_FILES = MiniML/ROOT.ML \ |
1301 | 177 |
$(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML) |
178 |
||
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
179 |
MiniML: $(BIN)/HOL $(MINIML_FILES) |
1491 | 180 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
181 |
then echo 'make_html := true; exit_use_dir"MiniML";quit();' \ |
|
182 |
| $(LOGIC);\ |
|
183 |
else echo 'exit_use_dir"MiniML";quit();' | $(LOGIC); \ |
|
184 |
fi |
|
1301 | 185 |
|
1343 | 186 |
##Lexical analysis |
187 |
LEX_FILES = Auto AutoChopper Chopper Prefix |
|
188 |
||
189 |
LEX_FILES = Lex/ROOT.ML \ |
|
190 |
$(LEX_NAMES:%=Lex/%.thy) $(LEX_NAMES:%=Lex/%.ML) |
|
191 |
||
192 |
Lex: $(BIN)/HOL $(LEX_FILES) |
|
1491 | 193 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
194 |
then echo 'make_html := true; exit_use_dir"Lex";quit();' | $(LOGIC);\ |
|
195 |
else echo 'exit_use_dir"Lex";quit();' | $(LOGIC); \ |
|
196 |
fi |
|
1343 | 197 |
|
923 | 198 |
##Miscellaneous examples |
1797 | 199 |
EX_NAMES = String BT Perm Comb InSort Qsort LexProd Puzzle Mutil \ |
200 |
Primes NatSum SList LList Acc PropLog Term Simult MT |
|
923 | 201 |
|
202 |
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \ |
|
1044 | 203 |
ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML) |
923 | 204 |
|
1164 | 205 |
ex: $(BIN)/HOL $(EX_FILES) |
1491 | 206 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
207 |
then echo 'make_html := true; exit_use_dir"ex";quit();' | $(LOGIC);\ |
|
208 |
else echo 'exit_use_dir"ex";quit();' | $(LOGIC); \ |
|
209 |
fi |
|
923 | 210 |
|
1343 | 211 |
#Full test. |
1972 | 212 |
test: $(BIN)/HOL IMP Hoare Lex Integ Auth Subst Lambda MiniML IOA ex |
923 | 213 |
echo 'Test examples ran successfully' > test |
214 |
||
1164 | 215 |
.PRECIOUS: $(BIN)/Pure $(BIN)/HOL |