src/HOL/Makefile
author nipkow
Fri Oct 06 11:20:04 1995 +0100 (1995-10-06)
changeset 1270 e3a391e848a9
parent 1264 3eb91524b938
child 1296 ae31bb7774a7
permissions -rw-r--r--
Added dependency on Eta
clasohm@923
     1
#########################################################################
clasohm@923
     2
#									#
clasohm@1164
     3
# 			Makefile for Isabelle (HOL)			#
clasohm@923
     4
#									#
clasohm@923
     5
#########################################################################
clasohm@923
     6
clasohm@923
     7
#To make the system, cd to this directory and type  
clasohm@923
     8
#	make -f Makefile 
clasohm@923
     9
#To make the system and test it on standard examples, type  
clasohm@923
    10
#	make -f Makefile test
clasohm@923
    11
clasohm@923
    12
#Environment variable ISABELLECOMP specifies the compiler.
clasohm@923
    13
#Environment variable ISABELLEBIN specifies the destination directory.
clasohm@923
    14
#For Poly/ML, ISABELLEBIN must begin with a /
clasohm@923
    15
clasohm@923
    16
#Makes pure Isabelle (Pure) if this file is ABSENT -- but not 
clasohm@923
    17
#if it is out of date, since this Makefile does not know its dependencies!
clasohm@923
    18
clasohm@923
    19
BIN = $(ISABELLEBIN)
clasohm@923
    20
COMP = $(ISABELLECOMP)
nipkow@1129
    21
NAMES = HOL Ord Set Fun subset equalities Prod Relation Trancl Sum WF \
lcp@1044
    22
       mono Lfp Gfp Nat Inductive Finite Arith Sexp Univ List 
clasohm@923
    23
clasohm@923
    24
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\
clasohm@923
    25
	ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\
clasohm@923
    26
	subtype.ML thy_syntax.ML ../Pure/section_utils.ML\
nipkow@944
    27
	../Provers/hypsubst.ML ../Provers/classical.ML\
nipkow@944
    28
        ../Provers/simplifier.ML ../Provers/splitter.ML\
lcp@1044
    29
 	$(NAMES:%=%.thy) $(NAMES:%=%.ML)
clasohm@923
    30
clasohm@1164
    31
$(BIN)/HOL:   $(BIN)/Pure  $(FILES) 
clasohm@923
    32
	if [ -d $${ISABELLEBIN:?}/Pure ];\
clasohm@923
    33
           	then echo Bad value for ISABELLEBIN: \
clasohm@923
    34
                	$(BIN) is the Isabelle source directory; \
clasohm@923
    35
                	exit 1; \
clasohm@923
    36
           	fi;\
clasohm@923
    37
	case "$(COMP)" in \
clasohm@1164
    38
	poly*)	echo 'make_database"$(BIN)/HOL"; quit();'  \
clasohm@923
    39
			| $(COMP) $(BIN)/Pure;\
clasohm@1164
    40
		echo 'open PolyML; exit_use"ROOT";' | $(COMP) $(BIN)/HOL ;;\
clasohm@1164
    41
	sml*)	echo 'exit_use"ROOT.ML"; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure ;;\
clasohm@923
    42
	*)	echo Bad value for ISABELLECOMP: \
clasohm@923
    43
                	$(COMP) is not poly or sml; exit 1;;\
clasohm@923
    44
	esac
clasohm@923
    45
clasohm@923
    46
$(BIN)/Pure:
clasohm@923
    47
	cd ../Pure;  $(MAKE)
clasohm@923
    48
clasohm@1164
    49
#### Testing of HOL
clasohm@923
    50
clasohm@923
    51
#A macro referring to the object-logic (depends on ML compiler)
clasohm@923
    52
LOGIC:sh=case $ISABELLECOMP in \
clasohm@1164
    53
	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\
clasohm@1164
    54
	sml*)	echo "$ISABELLEBIN/HOL" ;;\
clasohm@923
    55
	*)	echo "echo Bad value for ISABELLECOMP: \
clasohm@923
    56
                	$ISABELLEBIN is not poly or sml; exit 1" ;;\
clasohm@923
    57
	esac
clasohm@923
    58
clasohm@923
    59
##IMP-semantics example
lcp@1044
    60
IMP_NAMES = Com Denotation Equiv Properties
lcp@1044
    61
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML)
clasohm@923
    62
clasohm@1164
    63
IMP:    $(BIN)/HOL  $(IMP_FILES)
lcp@953
    64
	echo 'exit_use"IMP/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    65
clasohm@1164
    66
##The integers in HOL
nipkow@1129
    67
INTEG_NAMES = Equiv Integ 
clasohm@923
    68
lcp@1044
    69
INTEG_FILES = Integ/ROOT.ML \
lcp@1044
    70
              $(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML)
clasohm@923
    71
clasohm@1164
    72
Integ:  $(BIN)/HOL  $(INTEG_FILES)
lcp@953
    73
	echo 'exit_use"Integ/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    74
clasohm@923
    75
##I/O Automata
nipkow@1063
    76
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\
nipkow@1063
    77
                Receiver Sender
nipkow@1063
    78
IOA_ABP_NAMES = Action Correctness Lemmas
lcp@1044
    79
IOA_MT_NAMES = Asig IOA Option Solve
clasohm@923
    80
clasohm@1254
    81
IOA_FILES = IOA/ROOT_NTP.ML IOA/ROOT_ABP.ML IOA/NTP/Spec.thy\
nipkow@1063
    82
 $(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\
nipkow@1063
    83
 IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\
nipkow@1063
    84
 IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\
nipkow@1063
    85
 IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\
nipkow@1063
    86
 $(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\
lcp@1044
    87
 $(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML)
clasohm@923
    88
clasohm@1164
    89
IOA:    $(BIN)/HOL  $(IOA_FILES)
clasohm@1253
    90
	echo 'exit_use"IOA/ROOT_NTP.ML";quit();' | $(LOGIC)
clasohm@1264
    91
#	echo 'exit_use"IOA/ROOT_ABP.ML";quit();' | $(LOGIC)
clasohm@923
    92
clasohm@923
    93
##Properties of substitutions
lcp@1044
    94
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
clasohm@923
    95
lcp@1044
    96
SUBST_FILES = Subst/ROOT.ML \
lcp@1044
    97
              $(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
clasohm@923
    98
clasohm@1164
    99
Subst:  $(BIN)/HOL  $(SUBST_FILES)
lcp@953
   100
	echo 'exit_use"Subst/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   101
nipkow@1125
   102
##Confluence of Lambda-calculus
nipkow@1270
   103
LAMBDA_NAMES = Lambda ParRed Commutation Eta
nipkow@1125
   104
nipkow@1125
   105
LAMBDA_FILES = Lambda/ROOT.ML \
nipkow@1125
   106
              $(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
nipkow@1125
   107
clasohm@1164
   108
Lambda:  $(BIN)/HOL  $(LAMBDA_FILES)
nipkow@1125
   109
	echo 'exit_use"Lambda/ROOT.ML";quit();' | $(LOGIC)
nipkow@1125
   110
clasohm@923
   111
##Miscellaneous examples
lcp@1174
   112
EX_NAMES = LexProd MT Acc PropLog Puzzle Qsort LList Rec Simult Term String \
lcp@1174
   113
	   BT Perm
clasohm@923
   114
clasohm@923
   115
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
lcp@1044
   116
           ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
clasohm@923
   117
clasohm@1164
   118
ex:     $(BIN)/HOL  $(EX_FILES)
lcp@953
   119
	echo 'exit_use"ex/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   120
clasohm@1264
   121
#Full test. (IOA has been removed temporarily)
clasohm@1264
   122
test:   $(BIN)/HOL IMP Integ Subst Lambda ex
clasohm@923
   123
	echo 'Test examples ran successfully' > test
clasohm@923
   124
clasohm@1164
   125
.PRECIOUS:  $(BIN)/Pure $(BIN)/HOL