author | clasohm |
Fri, 02 Feb 1996 12:05:24 +0100 | |
changeset 1472 | a89803e3d1bd |
parent 1367 | 78bdb2d04771 |
child 1491 | 38a14548baad |
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 \ |
1044 | 25 |
mono Lfp Gfp Nat Inductive Finite Arith Sexp Univ List |
923 | 26 |
|
27 |
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\ |
|
28 |
ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\ |
|
1472 | 29 |
typedef.ML thy_syntax.ML ../Pure/section_utils.ML\ |
944
01d6571fa106
Added dependencies on ../Provers/hypsubst.ML and removed those on
nipkow
parents:
923
diff
changeset
|
30 |
../Provers/hypsubst.ML ../Provers/classical.ML\ |
01d6571fa106
Added dependencies on ../Provers/hypsubst.ML and removed those on
nipkow
parents:
923
diff
changeset
|
31 |
../Provers/simplifier.ML ../Provers/splitter.ML\ |
1044 | 32 |
$(NAMES:%=%.thy) $(NAMES:%=%.ML) |
923 | 33 |
|
1164 | 34 |
$(BIN)/HOL: $(BIN)/Pure $(FILES) |
923 | 35 |
if [ -d $${ISABELLEBIN:?}/Pure ];\ |
36 |
then echo Bad value for ISABELLEBIN: \ |
|
37 |
$(BIN) is the Isabelle source directory; \ |
|
38 |
exit 1; \ |
|
39 |
fi;\ |
|
40 |
case "$(COMP)" in \ |
|
1164 | 41 |
poly*) echo 'make_database"$(BIN)/HOL"; quit();' \ |
1296 | 42 |
| $(COMP) $(BIN)/Pure;\ |
43 |
if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
|
1357 | 44 |
then echo 'open PolyML; make_html := true; exit_use_dir".";' \ |
1296 | 45 |
| $(COMP) $(BIN)/HOL;\ |
1357 | 46 |
else echo 'open PolyML; exit_use_dir".";' \ |
47 |
| $(COMP) $(BIN)/HOL;\ |
|
1296 | 48 |
fi;;\ |
49 |
sml*) if [ "$${MAKE_HTML-undefined}" != "undefined" ];\ |
|
1367 | 50 |
then echo 'make_html := true; exit_use_dir"."; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure;\ |
1357 | 51 |
else echo 'exit_use_dir"."; xML"$(BIN)/HOL" banner;' \ |
1296 | 52 |
| $(BIN)/Pure;\ |
53 |
fi;;\ |
|
923 | 54 |
*) echo Bad value for ISABELLECOMP: \ |
55 |
$(COMP) is not poly or sml; exit 1;;\ |
|
56 |
esac |
|
57 |
||
58 |
$(BIN)/Pure: |
|
59 |
cd ../Pure; $(MAKE) |
|
60 |
||
1164 | 61 |
#### Testing of HOL |
923 | 62 |
|
63 |
#A macro referring to the object-logic (depends on ML compiler) |
|
64 |
LOGIC:sh=case $ISABELLECOMP in \ |
|
1164 | 65 |
poly*) echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\ |
66 |
sml*) echo "$ISABELLEBIN/HOL" ;;\ |
|
923 | 67 |
*) echo "echo Bad value for ISABELLECOMP: \ |
68 |
$ISABELLEBIN is not poly or sml; exit 1" ;;\ |
|
69 |
esac |
|
70 |
||
71 |
##IMP-semantics example |
|
1044 | 72 |
IMP_NAMES = Com Denotation Equiv Properties |
73 |
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML) |
|
923 | 74 |
|
1164 | 75 |
IMP: $(BIN)/HOL $(IMP_FILES) |
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
76 |
echo 'exit_use_dir"IMP";quit();' | $(LOGIC) |
923 | 77 |
|
1336 | 78 |
##Hoare logic |
79 |
Hoare_NAMES = Hoare Arith2 Examples |
|
80 |
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) $(Hoare_NAMES:%=Hoare/%.ML) |
|
81 |
||
82 |
Hoare: $(BIN)/HOL $(Hoare_FILES) |
|
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
83 |
echo 'exit_use_dir"Hoare";quit();' | $(LOGIC) |
1336 | 84 |
|
1164 | 85 |
##The integers in HOL |
1129 | 86 |
INTEG_NAMES = Equiv Integ |
923 | 87 |
|
1044 | 88 |
INTEG_FILES = Integ/ROOT.ML \ |
89 |
$(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML) |
|
923 | 90 |
|
1164 | 91 |
Integ: $(BIN)/HOL $(INTEG_FILES) |
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
92 |
echo 'exit_use_dir"Integ";quit();' | $(LOGIC) |
923 | 93 |
|
94 |
##I/O Automata |
|
1063 | 95 |
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\ |
96 |
Receiver Sender |
|
97 |
IOA_ABP_NAMES = Action Correctness Lemmas |
|
1044 | 98 |
IOA_MT_NAMES = Asig IOA Option Solve |
923 | 99 |
|
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
100 |
IOA_FILES = IOA/NTP/ROOT.ML IOA/ABP/ROOT.ML IOA/NTP/Spec.thy\ |
1063 | 101 |
$(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\ |
102 |
IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\ |
|
103 |
IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\ |
|
104 |
IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\ |
|
105 |
$(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\ |
|
1044 | 106 |
$(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML) |
923 | 107 |
|
1164 | 108 |
IOA: $(BIN)/HOL $(IOA_FILES) |
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
109 |
echo 'exit_use_dir"IOA/NTP";quit();' | $(LOGIC) |
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
110 |
echo 'exit_use_dir"IOA/ABP";quit();' | $(LOGIC) |
923 | 111 |
|
112 |
##Properties of substitutions |
|
1044 | 113 |
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas |
923 | 114 |
|
1044 | 115 |
SUBST_FILES = Subst/ROOT.ML \ |
116 |
$(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML) |
|
923 | 117 |
|
1164 | 118 |
Subst: $(BIN)/HOL $(SUBST_FILES) |
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
119 |
echo 'exit_use_dir"Subst";quit();' | $(LOGIC) |
923 | 120 |
|
1125 | 121 |
##Confluence of Lambda-calculus |
1270 | 122 |
LAMBDA_NAMES = Lambda ParRed Commutation Eta |
1125 | 123 |
|
124 |
LAMBDA_FILES = Lambda/ROOT.ML \ |
|
125 |
$(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML) |
|
126 |
||
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
127 |
Lambda: $(BIN)/HOL $(LAMBDA_FILES) |
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
128 |
echo 'exit_use_dir"Lambda";quit();' | $(LOGIC) |
1125 | 129 |
|
1343 | 130 |
##Type inference for MiniML |
1301 | 131 |
MINIML_NAMES = I Maybe MiniML Type W |
132 |
||
1343 | 133 |
MINIML_FILES = MiniML/ROOT.ML \ |
1301 | 134 |
$(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML) |
135 |
||
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
136 |
MiniML: $(BIN)/HOL $(MINIML_FILES) |
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
137 |
echo 'exit_use_dir"MiniML";quit();' | $(LOGIC) |
1301 | 138 |
|
1343 | 139 |
##Lexical analysis |
140 |
LEX_FILES = Auto AutoChopper Chopper Prefix |
|
141 |
||
142 |
LEX_FILES = Lex/ROOT.ML \ |
|
143 |
$(LEX_NAMES:%=Lex/%.thy) $(LEX_NAMES:%=Lex/%.ML) |
|
144 |
||
145 |
Lex: $(BIN)/HOL $(LEX_FILES) |
|
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
146 |
echo 'exit_use_dir"Lex";quit();' | $(LOGIC) |
1343 | 147 |
|
923 | 148 |
##Miscellaneous examples |
1174 | 149 |
EX_NAMES = LexProd MT Acc PropLog Puzzle Qsort LList Rec Simult Term String \ |
150 |
BT Perm |
|
923 | 151 |
|
152 |
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \ |
|
1044 | 153 |
ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML) |
923 | 154 |
|
1164 | 155 |
ex: $(BIN)/HOL $(EX_FILES) |
1350
5bf4a54ba25f
replaced exit_use by exit_use_dir for subdirectories
clasohm
parents:
1343
diff
changeset
|
156 |
echo 'exit_use_dir"ex";quit();' | $(LOGIC) |
923 | 157 |
|
1343 | 158 |
#Full test. |
159 |
test: $(BIN)/HOL IMP Hoare Lex Integ Subst Lambda MiniML IOA ex |
|
923 | 160 |
echo 'Test examples ran successfully' > test |
161 |
||
1164 | 162 |
.PRECIOUS: $(BIN)/Pure $(BIN)/HOL |