2448
|
1 |
#
|
|
2 |
# $Id$
|
|
3 |
#
|
|
4 |
# IsaMakefile for HOL
|
|
5 |
#
|
|
6 |
|
|
7 |
#### Base system
|
|
8 |
|
|
9 |
OUT = $(ISABELLE_OUTPUT_DIR)
|
|
10 |
|
|
11 |
NAMES = HOL Ord Set Fun subset equalities Prod Relation Trancl Sum WF \
|
|
12 |
mono Lfp Gfp Nat intr_elim indrule Inductive Finite Arith \
|
|
13 |
Sexp Univ List RelPow Option
|
|
14 |
|
|
15 |
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML \
|
|
16 |
ind_syntax.ML cladata.ML simpdata.ML \
|
|
17 |
typedef.ML thy_syntax.ML thy_data.ML ../Pure/section_utils.ML \
|
|
18 |
../Provers/hypsubst.ML ../Provers/classical.ML \
|
|
19 |
../Provers/simplifier.ML ../Provers/splitter.ML \
|
|
20 |
$(NAMES:%=%.thy) $(NAMES:%=%.ML)
|
|
21 |
|
|
22 |
$(OUT)/HOL: $(OUT)/Pure $(FILES)
|
2473
|
23 |
@$(ISABELLE) -e "make_html := $(ISABELLE_HTML);" -qu $(OUT)/Pure HOL
|
2448
|
24 |
@chmod -w $@
|
|
25 |
|
|
26 |
$(OUT)/Pure:
|
2473
|
27 |
@cd ../Pure; $(ISATOOL) make
|
2448
|
28 |
|
|
29 |
|
|
30 |
## TFL (requires integration into HOL proper)
|
|
31 |
|
|
32 |
TFL_NAMES = mask tfl thms thry usyntax utils
|
|
33 |
TFL_FILES = ../TFL/ROOT.ML ../TFL/sys.sml \
|
|
34 |
$(TFL_NAMES:%=../TFL/%.sig) $(TFL_NAMES:%=../TFL/%.sml)
|
|
35 |
|
|
36 |
TFL: $(OUT)/HOL $(TFL_FILES)
|
2473
|
37 |
@$(ISABELLE) -e 'exit_use_dir"../TFL"; quit();' HOL
|
|
38 |
|
2448
|
39 |
|
|
40 |
|
2473
|
41 |
#### Tests and examples
|
|
42 |
|
2448
|
43 |
## IMP-semantics example
|
|
44 |
|
|
45 |
IMP_NAMES = Expr Com Natural Transition Denotation Hoare VC
|
|
46 |
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML)
|
|
47 |
|
|
48 |
IMP: $(OUT)/HOL $(IMP_FILES)
|
2473
|
49 |
@$(ISATOOL) testdir $(OUT)/HOL IMP
|
2448
|
50 |
|
|
51 |
|
|
52 |
## Hoare logic
|
|
53 |
|
|
54 |
Hoare_NAMES = Hoare Arith2 Examples
|
|
55 |
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) \
|
|
56 |
$(Hoare_NAMES:%=Hoare/%.ML)
|
|
57 |
|
|
58 |
Hoare: $(OUT)/HOL $(Hoare_FILES)
|
2473
|
59 |
@$(ISATOOL) testdir $(OUT)/HOL Hoare
|
2448
|
60 |
|
|
61 |
|
|
62 |
## The integers in HOL
|
|
63 |
|
|
64 |
INTEG_NAMES = Equiv Integ Group Ring Lagrange IntRingDefs IntRing
|
|
65 |
|
|
66 |
INTEG_FILES = Integ/ROOT.ML \
|
|
67 |
$(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML)
|
|
68 |
|
|
69 |
Integ: $(OUT)/HOL $(INTEG_FILES)
|
2473
|
70 |
@$(ISATOOL) testdir $(OUT)/HOL Integ
|
2448
|
71 |
|
|
72 |
|
|
73 |
## I/O Automata
|
|
74 |
|
|
75 |
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet \
|
|
76 |
Receiver Sender
|
|
77 |
IOA_ABP_NAMES = Action Correctness Lemmas
|
|
78 |
IOA_MT_NAMES = Asig IOA Solve
|
|
79 |
|
|
80 |
IOA_FILES = IOA/NTP/ROOT.ML IOA/ABP/ROOT.ML IOA/NTP/Spec.thy \
|
|
81 |
$(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML) \
|
|
82 |
IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy \
|
|
83 |
IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy \
|
|
84 |
IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy \
|
|
85 |
$(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML) \
|
|
86 |
$(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML)
|
|
87 |
|
|
88 |
IOA: $(OUT)/HOL $(IOA_FILES)
|
2473
|
89 |
@$(ISATOOL) testdir $(OUT)/HOL IOA/NTP
|
|
90 |
@$(ISATOOL) testdir $(OUT)/HOL IOA/ABP
|
2448
|
91 |
|
|
92 |
|
|
93 |
## Authentication & Security Protocols
|
|
94 |
|
|
95 |
Auth_NAMES = Message Shared NS_Shared OtwayRees OtwayRees_AN OtwayRees_Bad \
|
2473
|
96 |
Recur WooLam Yahalom Yahalom2 Public NS_Public_Bad NS_Public
|
2448
|
97 |
|
|
98 |
AUTH_FILES = Auth/ROOT.ML $(AUTH_NAMES:%=Auth/%.thy) $(AUTH_NAMES:%=Auth/%.ML)
|
|
99 |
|
|
100 |
Auth: $(OUT)/HOL $(AUTH_FILES)
|
2473
|
101 |
@$(ISATOOL) testdir $(OUT)/HOL Auth
|
2448
|
102 |
|
|
103 |
|
|
104 |
## Properties of substitutions
|
|
105 |
|
|
106 |
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
|
|
107 |
|
|
108 |
SUBST_FILES = Subst/ROOT.ML \
|
|
109 |
$(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
|
|
110 |
|
|
111 |
Subst: $(OUT)/HOL $(SUBST_FILES)
|
2473
|
112 |
@$(ISATOOL) testdir $(OUT)/HOL Subst
|
2448
|
113 |
|
|
114 |
|
|
115 |
## Confluence of Lambda-calculus
|
|
116 |
|
|
117 |
LAMBDA_NAMES = Lambda ParRed Commutation Eta
|
|
118 |
|
|
119 |
LAMBDA_FILES = Lambda/ROOT.ML \
|
|
120 |
$(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
|
|
121 |
|
|
122 |
Lambda: $(OUT)/HOL $(LAMBDA_FILES)
|
2473
|
123 |
@$(ISATOOL) testdir $(OUT)/HOL Lambda
|
2448
|
124 |
|
|
125 |
|
2527
|
126 |
## Type inference without let
|
|
127 |
|
|
128 |
W0_NAMES = I Maybe MiniML Type W
|
|
129 |
|
|
130 |
W0_FILES = W0/ROOT.ML \
|
|
131 |
$(W0_NAMES:%=W0/%.thy) $(W0_NAMES:%=W0/%.ML)
|
2448
|
132 |
|
2527
|
133 |
W0: $(OUT)/HOL $(W0_FILES)
|
|
134 |
@$(ISATOOL) testdir $(OUT)/HOL W0
|
|
135 |
|
|
136 |
|
|
137 |
## Type inference with let
|
|
138 |
|
|
139 |
MINIML_NAMES = Generalize Instance Maybe MiniML Type W
|
2448
|
140 |
|
|
141 |
MINIML_FILES = MiniML/ROOT.ML \
|
|
142 |
$(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML)
|
|
143 |
|
|
144 |
MiniML: $(OUT)/HOL $(MINIML_FILES)
|
2473
|
145 |
@$(ISATOOL) testdir $(OUT)/HOL MiniML
|
2448
|
146 |
|
|
147 |
|
|
148 |
## Lexical analysis
|
|
149 |
|
|
150 |
LEX_FILES = Auto AutoChopper Chopper Prefix
|
|
151 |
|
|
152 |
LEX_FILES = Lex/ROOT.ML \
|
|
153 |
$(LEX_NAMES:%=Lex/%.thy) $(LEX_NAMES:%=Lex/%.ML)
|
|
154 |
|
|
155 |
Lex: $(OUT)/HOL $(LEX_FILES)
|
2473
|
156 |
@$(ISATOOL) testdir $(OUT)/HOL Lex
|
2448
|
157 |
|
|
158 |
|
2545
|
159 |
## Axiomatic type classes examples
|
|
160 |
|
|
161 |
AXC_GROUP_FILES = Group.ML Group.thy GroupDefs.ML GroupDefs.thy \
|
|
162 |
GroupInsts.thy Monoid.thy MonoidGroupInsts.thy ROOT.ML Sigs.thy
|
|
163 |
|
|
164 |
AXC_LATTICE_FILES = CLattice.ML CLattice.thy LatInsts.ML LatInsts.thy \
|
|
165 |
LatMorph.ML LatMorph.thy LatPreInsts.ML LatPreInsts.thy \
|
|
166 |
Lattice.ML Lattice.thy OrdDefs.ML OrdDefs.thy OrdInsts.thy \
|
|
167 |
Order.ML Order.thy ROOT.ML tools.ML
|
|
168 |
|
|
169 |
AXC_TUTORIAL_FILES = BoolGroupInsts.thy Group.ML Group.thy Monoid.thy \
|
|
170 |
MonoidGroupInsts.thy ProdGroupInsts.thy Product.thy \
|
|
171 |
ProductInsts.thy ROOT.ML Semigroup.thy Semigroups.thy Sigs.thy \
|
|
172 |
Xor.ML Xor.thy
|
|
173 |
|
|
174 |
AXCLASSES_FILES = AxClasses/ROOT.ML \
|
|
175 |
$(AXC_GROUP_FILES:%=AxClasses/Group/%) \
|
|
176 |
$(AXC_LATTICE_FILES:%=AxClasses/Lattice/%) \
|
|
177 |
$(AXC_TUTORIAL_FILES:%=AxClasses/Tutorial/%)
|
|
178 |
|
|
179 |
AxClasses: $(OUT)/HOL $(AXCLASSES_FILES)
|
|
180 |
@$(ISATOOL) testdir $(OUT)/HOL AxClasses
|
|
181 |
@$(ISATOOL) testdir $(OUT)/HOL AxClasses/Group
|
|
182 |
@$(ISATOOL) testdir $(OUT)/HOL AxClasses/Lattice
|
|
183 |
@$(ISATOOL) testdir $(OUT)/HOL AxClasses/Tutorial
|
|
184 |
|
|
185 |
|
2448
|
186 |
## Miscellaneous examples
|
|
187 |
|
|
188 |
EX_NAMES = String BT Perm Comb InSort Qsort LexProd \
|
|
189 |
Puzzle Mutil Primes NatSum SList LList Acc PropLog Term Simult MT
|
|
190 |
|
|
191 |
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
|
|
192 |
ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
|
|
193 |
|
|
194 |
ex: $(OUT)/HOL $(EX_FILES)
|
2473
|
195 |
@$(ISATOOL) testdir $(OUT)/HOL ex
|
2448
|
196 |
|
|
197 |
|
|
198 |
## Full test
|
|
199 |
|
2545
|
200 |
test: $(OUT)/HOL TFL IMP Hoare Lex Integ Auth Subst Lambda W0 MiniML \
|
|
201 |
IOA AxClasses ex
|
2448
|
202 |
echo 'Test examples ran successfully' > test
|
|
203 |
|
|
204 |
|
|
205 |
.PRECIOUS: $(OUT)/Pure $(OUT)/HOL
|