src/HOL/Makefile
author lcp
Fri Jun 30 11:39:20 1995 +0200 (1995-06-30)
changeset 1174 e57a93d41de0
parent 1164 8e969adf64d6
child 1253 131f72e2cd56
permissions -rw-r--r--
added mention of new theories BT and Perm
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
nipkow@1063
    81
IOA_FILES = IOA/ROOT.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)
lcp@953
    90
	echo 'exit_use"IOA/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    91
clasohm@923
    92
##Properties of substitutions
lcp@1044
    93
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
clasohm@923
    94
lcp@1044
    95
SUBST_FILES = Subst/ROOT.ML \
lcp@1044
    96
              $(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
clasohm@923
    97
clasohm@1164
    98
Subst:  $(BIN)/HOL  $(SUBST_FILES)
lcp@953
    99
	echo 'exit_use"Subst/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   100
nipkow@1125
   101
##Confluence of Lambda-calculus
nipkow@1125
   102
LAMBDA_NAMES = Lambda ParRed Confluence
nipkow@1125
   103
nipkow@1125
   104
LAMBDA_FILES = Lambda/ROOT.ML \
nipkow@1125
   105
              $(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
nipkow@1125
   106
clasohm@1164
   107
Lambda:  $(BIN)/HOL  $(LAMBDA_FILES)
nipkow@1125
   108
	echo 'exit_use"Lambda/ROOT.ML";quit();' | $(LOGIC)
nipkow@1125
   109
clasohm@923
   110
##Miscellaneous examples
lcp@1174
   111
EX_NAMES = LexProd MT Acc PropLog Puzzle Qsort LList Rec Simult Term String \
lcp@1174
   112
	   BT Perm
clasohm@923
   113
clasohm@923
   114
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
lcp@1044
   115
           ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
clasohm@923
   116
clasohm@1164
   117
ex:     $(BIN)/HOL  $(EX_FILES)
lcp@953
   118
	echo 'exit_use"ex/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   119
clasohm@923
   120
#Full test.
clasohm@1164
   121
test:   $(BIN)/HOL IMP Integ IOA Subst Lambda ex
clasohm@923
   122
	echo 'Test examples ran successfully' > test
clasohm@923
   123
clasohm@1164
   124
.PRECIOUS:  $(BIN)/Pure $(BIN)/HOL