src/HOL/Makefile
author clasohm
Tue Nov 21 13:46:47 1995 +0100 (1995-11-21)
changeset 1357 dac9989eb88f
parent 1350 5bf4a54ba25f
child 1367 78bdb2d04771
permissions -rw-r--r--
replaced exit_use by exit_use_dir
clasohm@1296
     1
# $Id$
clasohm@923
     2
#########################################################################
clasohm@923
     3
#									#
clasohm@1164
     4
# 			Makefile for Isabelle (HOL)			#
clasohm@923
     5
#									#
clasohm@923
     6
#########################################################################
clasohm@923
     7
clasohm@923
     8
#To make the system, cd to this directory and type  
clasohm@1296
     9
#	make
clasohm@923
    10
#To make the system and test it on standard examples, type  
clasohm@1296
    11
#	make test
clasohm@1296
    12
#To generate HTML files for every theory, set the environment variable
clasohm@1296
    13
#MAKE_HTML or add the parameter "MAKE_HTML=".
clasohm@923
    14
clasohm@923
    15
#Environment variable ISABELLECOMP specifies the compiler.
clasohm@923
    16
#Environment variable ISABELLEBIN specifies the destination directory.
clasohm@923
    17
#For Poly/ML, ISABELLEBIN must begin with a /
clasohm@923
    18
clasohm@923
    19
#Makes pure Isabelle (Pure) if this file is ABSENT -- but not 
clasohm@923
    20
#if it is out of date, since this Makefile does not know its dependencies!
clasohm@923
    21
clasohm@923
    22
BIN = $(ISABELLEBIN)
clasohm@923
    23
COMP = $(ISABELLECOMP)
nipkow@1129
    24
NAMES = HOL Ord Set Fun subset equalities Prod Relation Trancl Sum WF \
lcp@1044
    25
       mono Lfp Gfp Nat Inductive Finite Arith Sexp Univ List 
clasohm@923
    26
clasohm@923
    27
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\
clasohm@923
    28
	ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\
clasohm@923
    29
	subtype.ML thy_syntax.ML ../Pure/section_utils.ML\
nipkow@944
    30
	../Provers/hypsubst.ML ../Provers/classical.ML\
nipkow@944
    31
        ../Provers/simplifier.ML ../Provers/splitter.ML\
lcp@1044
    32
 	$(NAMES:%=%.thy) $(NAMES:%=%.ML)
clasohm@923
    33
clasohm@1164
    34
$(BIN)/HOL:   $(BIN)/Pure  $(FILES) 
clasohm@923
    35
	if [ -d $${ISABELLEBIN:?}/Pure ];\
clasohm@923
    36
           	then echo Bad value for ISABELLEBIN: \
clasohm@923
    37
                	$(BIN) is the Isabelle source directory; \
clasohm@923
    38
                	exit 1; \
clasohm@923
    39
           	fi;\
clasohm@923
    40
	case "$(COMP)" in \
clasohm@1164
    41
	poly*)	echo 'make_database"$(BIN)/HOL"; quit();'  \
clasohm@1296
    42
		  | $(COMP) $(BIN)/Pure;\
clasohm@1296
    43
		if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
clasohm@1357
    44
                then echo 'open PolyML; make_html := true; exit_use_dir".";' \
clasohm@1296
    45
                  | $(COMP) $(BIN)/HOL;\
clasohm@1357
    46
		else echo 'open PolyML; exit_use_dir".";' \
clasohm@1357
    47
                       | $(COMP) $(BIN)/HOL;\
clasohm@1296
    48
                fi;;\
clasohm@1296
    49
	sml*)	if [ "$${MAKE_HTML-undefined}" != "undefined" ];\
clasohm@1357
    50
                then echo 'make_html (); exit_use_dir".";                                                 xML"$(BIN)/HOL" banner;' | $(BIN)/Pure;\
clasohm@1357
    51
                else echo 'exit_use_dir"."; xML"$(BIN)/HOL" banner;' \
clasohm@1296
    52
                       | $(BIN)/Pure;\
clasohm@1296
    53
                fi;;\
clasohm@923
    54
	*)	echo Bad value for ISABELLECOMP: \
clasohm@923
    55
                	$(COMP) is not poly or sml; exit 1;;\
clasohm@923
    56
	esac
clasohm@923
    57
clasohm@923
    58
$(BIN)/Pure:
clasohm@923
    59
	cd ../Pure;  $(MAKE)
clasohm@923
    60
clasohm@1164
    61
#### Testing of HOL
clasohm@923
    62
clasohm@923
    63
#A macro referring to the object-logic (depends on ML compiler)
clasohm@923
    64
LOGIC:sh=case $ISABELLECOMP in \
clasohm@1164
    65
	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\
clasohm@1164
    66
	sml*)	echo "$ISABELLEBIN/HOL" ;;\
clasohm@923
    67
	*)	echo "echo Bad value for ISABELLECOMP: \
clasohm@923
    68
                	$ISABELLEBIN is not poly or sml; exit 1" ;;\
clasohm@923
    69
	esac
clasohm@923
    70
clasohm@923
    71
##IMP-semantics example
lcp@1044
    72
IMP_NAMES = Com Denotation Equiv Properties
lcp@1044
    73
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML)
clasohm@923
    74
clasohm@1164
    75
IMP:    $(BIN)/HOL  $(IMP_FILES)
clasohm@1350
    76
	echo 'exit_use_dir"IMP";quit();' | $(LOGIC)
clasohm@923
    77
nipkow@1336
    78
##Hoare logic
nipkow@1336
    79
Hoare_NAMES = Hoare Arith2 Examples
nipkow@1336
    80
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) $(Hoare_NAMES:%=Hoare/%.ML)
nipkow@1336
    81
nipkow@1336
    82
Hoare:  $(BIN)/HOL  $(Hoare_FILES)
clasohm@1350
    83
	echo 'exit_use_dir"Hoare";quit();' | $(LOGIC)
nipkow@1336
    84
clasohm@1164
    85
##The integers in HOL
nipkow@1129
    86
INTEG_NAMES = Equiv Integ 
clasohm@923
    87
lcp@1044
    88
INTEG_FILES = Integ/ROOT.ML \
lcp@1044
    89
              $(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML)
clasohm@923
    90
clasohm@1164
    91
Integ:  $(BIN)/HOL  $(INTEG_FILES)
clasohm@1350
    92
	echo 'exit_use_dir"Integ";quit();' | $(LOGIC)
clasohm@923
    93
clasohm@923
    94
##I/O Automata
nipkow@1063
    95
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\
nipkow@1063
    96
                Receiver Sender
nipkow@1063
    97
IOA_ABP_NAMES = Action Correctness Lemmas
lcp@1044
    98
IOA_MT_NAMES = Asig IOA Option Solve
clasohm@923
    99
clasohm@1350
   100
IOA_FILES = IOA/NTP/ROOT.ML IOA/ABP/ROOT.ML IOA/NTP/Spec.thy\
nipkow@1063
   101
 $(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\
nipkow@1063
   102
 IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\
nipkow@1063
   103
 IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\
nipkow@1063
   104
 IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\
nipkow@1063
   105
 $(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\
lcp@1044
   106
 $(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML)
clasohm@923
   107
clasohm@1164
   108
IOA:    $(BIN)/HOL  $(IOA_FILES)
clasohm@1350
   109
	echo 'exit_use_dir"IOA/NTP";quit();' | $(LOGIC)
clasohm@1350
   110
	echo 'exit_use_dir"IOA/ABP";quit();' | $(LOGIC)
clasohm@923
   111
clasohm@923
   112
##Properties of substitutions
lcp@1044
   113
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
clasohm@923
   114
lcp@1044
   115
SUBST_FILES = Subst/ROOT.ML \
lcp@1044
   116
              $(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
clasohm@923
   117
clasohm@1164
   118
Subst:  $(BIN)/HOL  $(SUBST_FILES)
clasohm@1350
   119
	echo 'exit_use_dir"Subst";quit();' | $(LOGIC)
clasohm@923
   120
nipkow@1125
   121
##Confluence of Lambda-calculus
nipkow@1270
   122
LAMBDA_NAMES = Lambda ParRed Commutation Eta
nipkow@1125
   123
nipkow@1125
   124
LAMBDA_FILES = Lambda/ROOT.ML \
nipkow@1125
   125
              $(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
nipkow@1125
   126
clasohm@1350
   127
Lambda:  $(BIN)/HOL $(LAMBDA_FILES)
clasohm@1350
   128
	echo 'exit_use_dir"Lambda";quit();' | $(LOGIC)
nipkow@1125
   129
nipkow@1343
   130
##Type inference for MiniML
nipkow@1301
   131
MINIML_NAMES = I Maybe MiniML Type W
nipkow@1301
   132
nipkow@1343
   133
MINIML_FILES = MiniML/ROOT.ML \
nipkow@1301
   134
              $(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML)
nipkow@1301
   135
clasohm@1350
   136
MiniML: $(BIN)/HOL  $(MINIML_FILES)
clasohm@1350
   137
	echo 'exit_use_dir"MiniML";quit();' | $(LOGIC)
nipkow@1301
   138
nipkow@1343
   139
##Lexical analysis
nipkow@1343
   140
LEX_FILES = Auto AutoChopper Chopper Prefix
nipkow@1343
   141
nipkow@1343
   142
LEX_FILES = Lex/ROOT.ML \
nipkow@1343
   143
            $(LEX_NAMES:%=Lex/%.thy) $(LEX_NAMES:%=Lex/%.ML)
nipkow@1343
   144
nipkow@1343
   145
Lex:	$(BIN)/HOL  $(LEX_FILES)
clasohm@1350
   146
	echo 'exit_use_dir"Lex";quit();' | $(LOGIC)
nipkow@1343
   147
clasohm@923
   148
##Miscellaneous examples
lcp@1174
   149
EX_NAMES = LexProd MT Acc PropLog Puzzle Qsort LList Rec Simult Term String \
lcp@1174
   150
	   BT Perm
clasohm@923
   151
clasohm@923
   152
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
lcp@1044
   153
           ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
clasohm@923
   154
clasohm@1164
   155
ex:     $(BIN)/HOL  $(EX_FILES)
clasohm@1350
   156
	echo 'exit_use_dir"ex";quit();' | $(LOGIC)
clasohm@923
   157
nipkow@1343
   158
#Full test.
nipkow@1343
   159
test:   $(BIN)/HOL IMP Hoare Lex Integ Subst Lambda MiniML IOA ex
clasohm@923
   160
	echo 'Test examples ran successfully' > test
clasohm@923
   161
clasohm@1164
   162
.PRECIOUS:  $(BIN)/Pure $(BIN)/HOL