src/HOL/Makefile
author nipkow
Fri Nov 17 09:05:21 1995 +0100 (1995-11-17)
changeset 1336 38d66830a046
parent 1329 8987c0df4b2f
child 1343 8770c062b092
permissions -rw-r--r--
Added Hoare.
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@1296
    44
                then echo 'open PolyML; init_html (); exit_use"ROOT";' \
clasohm@1296
    45
                  | $(COMP) $(BIN)/HOL;\
clasohm@1296
    46
		else echo 'open PolyML; exit_use"ROOT";' | $(COMP) $(BIN)/HOL;\
clasohm@1296
    47
                fi;;\
clasohm@1296
    48
	sml*)	if [ "$${MAKE_HTML-undefined}" != "undefined" ];\
clasohm@1296
    49
                then echo 'init_html (); exit_use"ROOT.ML";                                               xML"$(BIN)/HOL" banner;' | $(BIN)/Pure;\
clasohm@1296
    50
                else echo 'exit_use"ROOT.ML"; xML"$(BIN)/HOL" banner;' \
clasohm@1296
    51
                       | $(BIN)/Pure;\
clasohm@1296
    52
                fi;;\
clasohm@923
    53
	*)	echo Bad value for ISABELLECOMP: \
clasohm@923
    54
                	$(COMP) is not poly or sml; exit 1;;\
clasohm@923
    55
	esac
clasohm@923
    56
clasohm@923
    57
$(BIN)/Pure:
clasohm@923
    58
	cd ../Pure;  $(MAKE)
clasohm@923
    59
clasohm@1164
    60
#### Testing of HOL
clasohm@923
    61
clasohm@923
    62
#A macro referring to the object-logic (depends on ML compiler)
clasohm@923
    63
LOGIC:sh=case $ISABELLECOMP in \
clasohm@1164
    64
	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\
clasohm@1164
    65
	sml*)	echo "$ISABELLEBIN/HOL" ;;\
clasohm@923
    66
	*)	echo "echo Bad value for ISABELLECOMP: \
clasohm@923
    67
                	$ISABELLEBIN is not poly or sml; exit 1" ;;\
clasohm@923
    68
	esac
clasohm@923
    69
clasohm@923
    70
##IMP-semantics example
lcp@1044
    71
IMP_NAMES = Com Denotation Equiv Properties
lcp@1044
    72
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML)
clasohm@923
    73
clasohm@1164
    74
IMP:    $(BIN)/HOL  $(IMP_FILES)
lcp@953
    75
	echo 'exit_use"IMP/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    76
nipkow@1336
    77
##Hoare logic
nipkow@1336
    78
Hoare_NAMES = Hoare Arith2 Examples
nipkow@1336
    79
Hoare_FILES = Hoare/ROOT.ML $(Hoare_NAMES:%=Hoare/%.thy) $(Hoare_NAMES:%=Hoare/%.ML)
nipkow@1336
    80
nipkow@1336
    81
Hoare:  $(BIN)/HOL  $(Hoare_FILES)
nipkow@1336
    82
	echo 'exit_use"Hoare/ROOT.ML";quit();' | $(LOGIC)
nipkow@1336
    83
clasohm@1164
    84
##The integers in HOL
nipkow@1129
    85
INTEG_NAMES = Equiv Integ 
clasohm@923
    86
lcp@1044
    87
INTEG_FILES = Integ/ROOT.ML \
lcp@1044
    88
              $(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML)
clasohm@923
    89
clasohm@1164
    90
Integ:  $(BIN)/HOL  $(INTEG_FILES)
lcp@953
    91
	echo 'exit_use"Integ/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    92
clasohm@923
    93
##I/O Automata
nipkow@1063
    94
IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\
nipkow@1063
    95
                Receiver Sender
nipkow@1063
    96
IOA_ABP_NAMES = Action Correctness Lemmas
lcp@1044
    97
IOA_MT_NAMES = Asig IOA Option Solve
clasohm@923
    98
clasohm@1254
    99
IOA_FILES = IOA/ROOT_NTP.ML IOA/ROOT_ABP.ML IOA/NTP/Spec.thy\
nipkow@1063
   100
 $(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\
nipkow@1063
   101
 IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\
nipkow@1063
   102
 IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\
nipkow@1063
   103
 IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\
nipkow@1063
   104
 $(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\
lcp@1044
   105
 $(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML)
clasohm@923
   106
clasohm@1164
   107
IOA:    $(BIN)/HOL  $(IOA_FILES)
clasohm@1253
   108
	echo 'exit_use"IOA/ROOT_NTP.ML";quit();' | $(LOGIC)
clasohm@1264
   109
#	echo 'exit_use"IOA/ROOT_ABP.ML";quit();' | $(LOGIC)
clasohm@923
   110
clasohm@923
   111
##Properties of substitutions
lcp@1044
   112
SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
clasohm@923
   113
lcp@1044
   114
SUBST_FILES = Subst/ROOT.ML \
lcp@1044
   115
              $(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
clasohm@923
   116
clasohm@1164
   117
Subst:  $(BIN)/HOL  $(SUBST_FILES)
lcp@953
   118
	echo 'exit_use"Subst/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   119
nipkow@1125
   120
##Confluence of Lambda-calculus
nipkow@1270
   121
LAMBDA_NAMES = Lambda ParRed Commutation Eta
nipkow@1125
   122
nipkow@1125
   123
LAMBDA_FILES = Lambda/ROOT.ML \
nipkow@1125
   124
              $(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
nipkow@1125
   125
clasohm@1164
   126
Lambda:  $(BIN)/HOL  $(LAMBDA_FILES)
nipkow@1125
   127
	echo 'exit_use"Lambda/ROOT.ML";quit();' | $(LOGIC)
nipkow@1125
   128
nipkow@1301
   129
MINIML_NAMES = I Maybe MiniML Type W
nipkow@1301
   130
nipkow@1301
   131
LAMBDA_FILES = MiniML/ROOT.ML \
nipkow@1301
   132
              $(MINIML_NAMES:%=MiniML/%.thy) $(MINIML_NAMES:%=MiniML/%.ML)
nipkow@1301
   133
nipkow@1301
   134
MiniML: $(BIN)/HOL  $(MINIML_FILES)
nipkow@1301
   135
	echo 'exit_use"MiniML/ROOT.ML";quit();' | $(LOGIC)
nipkow@1301
   136
clasohm@923
   137
##Miscellaneous examples
lcp@1174
   138
EX_NAMES = LexProd MT Acc PropLog Puzzle Qsort LList Rec Simult Term String \
lcp@1174
   139
	   BT Perm
clasohm@923
   140
clasohm@923
   141
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
lcp@1044
   142
           ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
clasohm@923
   143
clasohm@1164
   144
ex:     $(BIN)/HOL  $(EX_FILES)
lcp@953
   145
	echo 'exit_use"ex/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   146
clasohm@1264
   147
#Full test. (IOA has been removed temporarily)
nipkow@1336
   148
test:   $(BIN)/HOL IMP Hoare Integ Subst Lambda MiniML IOA ex
clasohm@923
   149
	echo 'Test examples ran successfully' > test
clasohm@923
   150
clasohm@1164
   151
.PRECIOUS:  $(BIN)/Pure $(BIN)/HOL