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)
|
|
23 |
@$(ISABELLE_HOME)/bin/isabelle -e "make_html := $(ISABELLE_HTML);" -qu Pure HOL
|
|
24 |
@chmod -w $@
|
|
25 |
|
|
26 |
$(OUT)/Pure:
|
|
27 |
@cd ../Pure; $(ISABELLE_HOME)/bin/isatool make
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
#### Tests and examples
|
|
32 |
|
|
33 |
ISABELLE=$(ISABELLE_HOME)/bin/isabelle -e "make_html := $(ISABELLE_HTML);" -rq
|
|
34 |
|
|
35 |
|
|
36 |
## TFL (requires integration into HOL proper)
|
|
37 |
|
|
38 |
TFL_NAMES = mask tfl thms thry usyntax utils
|
|
39 |
TFL_FILES = ../TFL/ROOT.ML ../TFL/sys.sml \
|
|
40 |
$(TFL_NAMES:%=../TFL/%.sig) $(TFL_NAMES:%=../TFL/%.sml)
|
|
41 |
|
|
42 |
TFL: $(OUT)/HOL $(TFL_FILES)
|
|
43 |
$(ISABELLE) -e 'exit_use_dir"../TFL"; quit();' HOL
|
|
44 |
|
|
45 |
|
|
46 |
## IMP-semantics example
|
|
47 |
|
|
48 |
IMP_NAMES = Expr Com Natural Transition Denotation Hoare VC
|
|
49 |
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML)
|
|
50 |
|
|
51 |
IMP: $(OUT)/HOL $(IMP_FILES)
|
|
52 |
$(ISABELLE) -e 'exit_use_dir"IMP"; quit();' HOL
|
|
53 |
|
|
54 |
|
|
55 |
## Hoare logic
|
|
56 |
|
|
57 |
Hoare_NAMES = Hoare Arith2 Examples
|
|
58 |
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) \
|
|
59 |
$(Hoare_NAMES:%=Hoare/%.ML)
|
|
60 |
|
|
61 |
Hoare: $(OUT)/HOL $(Hoare_FILES)
|
|
62 |
$(ISABELLE) -e 'exit_use_dir"Hoare"; quit();' HOL
|
|
63 |
|
|
64 |
|
|
65 |
## The integers in HOL
|
|
66 |
|
|
67 |
INTEG_NAMES = Equiv Integ Group Ring Lagrange IntRingDefs IntRing
|
|
68 |
|
|
69 |
INTEG_FILES = Integ/ROOT.ML \
|
|
70 |
$(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML)
|
|
71 |
|
|
72 |
Integ: $(OUT)/HOL $(INTEG_FILES)
|
|
73 |
$(ISABELLE) -e 'exit_use_dir"Integ"; quit();' HOL
|
|
74 |
|
|
75 |
|
|
76 |
## I/O Automata
|
|
77 |
|
|
78 |
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet \
|
|
79 |
Receiver Sender
|
|
80 |
IOA_ABP_NAMES = Action Correctness Lemmas
|
|
81 |
IOA_MT_NAMES = Asig IOA Solve
|
|
82 |
|
|
83 |
IOA_FILES = IOA/NTP/ROOT.ML IOA/ABP/ROOT.ML IOA/NTP/Spec.thy \
|
|
84 |
$(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML) \
|
|
85 |
IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy \
|
|
86 |
IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy \
|
|
87 |
IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy \
|
|
88 |
$(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML) \
|
|
89 |
$(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML)
|
|
90 |
|
|
91 |
IOA: $(OUT)/HOL $(IOA_FILES)
|
|
92 |
$(ISABELLE) -e 'exit_use_dir"IOA/NTP"; quit();' HOL
|
|
93 |
$(ISABELLE) -e 'exit_use_dir"IOA/ABP"; quit();' HOL
|
|
94 |
|
|
95 |
|
|
96 |
## Authentication & Security Protocols
|
|
97 |
|
|
98 |
Auth_NAMES = Message Shared NS_Shared OtwayRees OtwayRees_AN OtwayRees_Bad \
|
|
99 |
WooLam Yahalom Yahalom2 Public NS_Public_Bad NS_Public
|
|
100 |
|
|
101 |
AUTH_FILES = Auth/ROOT.ML $(AUTH_NAMES:%=Auth/%.thy) $(AUTH_NAMES:%=Auth/%.ML)
|
|
102 |
|
|
103 |
Auth: $(OUT)/HOL $(AUTH_FILES)
|
|
104 |
$(ISABELLE) -e 'exit_use_dir"Auth"; quit();' HOL
|
|
105 |
|
|
106 |
|
|
107 |
## Properties of substitutions
|
|
108 |
|
|
109 |
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
|
|
110 |
|
|
111 |
SUBST_FILES = Subst/ROOT.ML \
|
|
112 |
$(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
|
|
113 |
|
|
114 |
Subst: $(OUT)/HOL $(SUBST_FILES)
|
|
115 |
$(ISABELLE) -e 'exit_use_dir"Subst"; quit();' HOL
|
|
116 |
|
|
117 |
|
|
118 |
## Confluence of Lambda-calculus
|
|
119 |
|
|
120 |
LAMBDA_NAMES = Lambda ParRed Commutation Eta
|
|
121 |
|
|
122 |
LAMBDA_FILES = Lambda/ROOT.ML \
|
|
123 |
$(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
|
|
124 |
|
|
125 |
Lambda: $(OUT)/HOL $(LAMBDA_FILES)
|
|
126 |
$(ISABELLE) -e 'exit_use_dir"Lambda"; quit();' HOL
|
|
127 |
|
|
128 |
|
|
129 |
## Type inference for MiniML
|
|
130 |
|
|
131 |
MINIML_NAMES = I Maybe MiniML Type W
|
|
132 |
|
|
133 |
MINIML_FILES = MiniML/ROOT.ML \
|
|
134 |
$(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML)
|
|
135 |
|
|
136 |
MiniML: $(OUT)/HOL $(MINIML_FILES)
|
|
137 |
$(ISABELLE) -e 'exit_use_dir"MiniML"; quit();' HOL
|
|
138 |
|
|
139 |
|
|
140 |
## Lexical analysis
|
|
141 |
|
|
142 |
LEX_FILES = Auto AutoChopper Chopper Prefix
|
|
143 |
|
|
144 |
LEX_FILES = Lex/ROOT.ML \
|
|
145 |
$(LEX_NAMES:%=Lex/%.thy) $(LEX_NAMES:%=Lex/%.ML)
|
|
146 |
|
|
147 |
Lex: $(OUT)/HOL $(LEX_FILES)
|
|
148 |
$(ISABELLE) -e 'exit_use_dir"Lex"; quit();' HOL
|
|
149 |
|
|
150 |
|
|
151 |
## Miscellaneous examples
|
|
152 |
|
|
153 |
EX_NAMES = String BT Perm Comb InSort Qsort LexProd \
|
|
154 |
Puzzle Mutil Primes NatSum SList LList Acc PropLog Term Simult MT
|
|
155 |
|
|
156 |
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
|
|
157 |
ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
|
|
158 |
|
|
159 |
ex: $(OUT)/HOL $(EX_FILES)
|
|
160 |
$(ISABELLE) -e 'exit_use_dir"ex"; quit();' HOL
|
|
161 |
|
|
162 |
|
|
163 |
## Full test
|
|
164 |
|
|
165 |
test: $(OUT)/HOL TFL IMP Hoare Lex Integ Auth Subst Lambda MiniML IOA ex
|
|
166 |
echo 'Test examples ran successfully' > test
|
|
167 |
|
|
168 |
|
|
169 |
.PRECIOUS: $(OUT)/Pure $(OUT)/HOL
|