src/HOL/Makefile
author clasohm
Fri Mar 03 12:02:25 1995 +0100 (1995-03-03)
changeset 923 ff1574a81019
child 944 01d6571fa106
permissions -rw-r--r--
new version of HOL with curried function application
clasohm@923
     1
#########################################################################
clasohm@923
     2
#									#
clasohm@923
     3
# 			Makefile for Isabelle (CHOL)			#
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)
clasohm@923
    21
THYS = HOL.thy Ord.thy Set.thy Fun.thy subset.thy \
clasohm@923
    22
       equalities.thy Prod.thy Trancl.thy Sum.thy WF.thy \
clasohm@923
    23
       mono.thy Lfp.thy Gfp.thy Nat.thy Inductive.thy \
clasohm@923
    24
       Finite.thy Arith.thy Sexp.thy Univ.thy List.thy 
clasohm@923
    25
clasohm@923
    26
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\
clasohm@923
    27
	ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\
clasohm@923
    28
	subtype.ML thy_syntax.ML ../Pure/section_utils.ML\
clasohm@923
    29
	../Provers/classical.ML ../Provers/simplifier.ML \
clasohm@923
    30
	../Provers/splitter.ML ../Provers/ind.ML $(THYS) $(THYS:.thy=.ML)
clasohm@923
    31
clasohm@923
    32
$(BIN)/CHOL:   $(BIN)/Pure  $(FILES) 
clasohm@923
    33
	if [ -d $${ISABELLEBIN:?}/Pure ];\
clasohm@923
    34
           	then echo Bad value for ISABELLEBIN: \
clasohm@923
    35
                	$(BIN) is the Isabelle source directory; \
clasohm@923
    36
                	exit 1; \
clasohm@923
    37
           	fi;\
clasohm@923
    38
	case "$(COMP)" in \
clasohm@923
    39
	poly*)	echo 'make_database"$(BIN)/CHOL"; quit();'  \
clasohm@923
    40
			| $(COMP) $(BIN)/Pure;\
clasohm@923
    41
		echo 'open PolyML; use"ROOT";' | $(COMP) $(BIN)/CHOL ;;\
clasohm@923
    42
	sml*)	echo 'use"ROOT.ML"; xML"$(BIN)/CHOL" banner;' | $(BIN)/Pure ;;\
clasohm@923
    43
	*)	echo Bad value for ISABELLECOMP: \
clasohm@923
    44
                	$(COMP) is not poly or sml; exit 1;;\
clasohm@923
    45
	esac
clasohm@923
    46
clasohm@923
    47
$(BIN)/Pure:
clasohm@923
    48
	cd ../Pure;  $(MAKE)
clasohm@923
    49
clasohm@923
    50
#### Testing of CHOL
clasohm@923
    51
clasohm@923
    52
#A macro referring to the object-logic (depends on ML compiler)
clasohm@923
    53
LOGIC:sh=case $ISABELLECOMP in \
clasohm@923
    54
	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/CHOL" ;;\
clasohm@923
    55
	sml*)	echo "$ISABELLEBIN/CHOL" ;;\
clasohm@923
    56
	*)	echo "echo Bad value for ISABELLECOMP: \
clasohm@923
    57
                	$ISABELLEBIN is not poly or sml; exit 1" ;;\
clasohm@923
    58
	esac
clasohm@923
    59
clasohm@923
    60
##IMP-semantics example
clasohm@923
    61
IMP_THYS = IMP/Com.thy IMP/Denotation.thy IMP/Equiv.thy IMP/Properties.thy
clasohm@923
    62
IMP_FILES = IMP/ROOT.ML $(IMP_THYS) $(IMP_THYS:.thy=.ML)
clasohm@923
    63
clasohm@923
    64
IMP:    $(BIN)/CHOL  $(IMP_FILES)
clasohm@923
    65
	echo 'use"IMP/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    66
clasohm@923
    67
##The integers in CHOL
clasohm@923
    68
INTEG_THYS = Integ/Relation.thy Integ/Equiv.thy Integ/Integ.thy 
clasohm@923
    69
clasohm@923
    70
INTEG_FILES = Integ/ROOT.ML $(INTEG_THYS) $(INTEG_THYS:.thy=.ML)
clasohm@923
    71
clasohm@923
    72
Integ:  $(BIN)/CHOL  $(INTEG_FILES)
clasohm@923
    73
	echo 'use"Integ/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    74
clasohm@923
    75
##I/O Automata
clasohm@923
    76
IOA_THYS = IOA/example/Action.thy IOA/example/Channels.thy\
clasohm@923
    77
	   IOA/example/Correctness.thy IOA/example/Impl.thy \
clasohm@923
    78
	   IOA/example/Lemmas.thy IOA/example/Multiset.thy \
clasohm@923
    79
	   IOA/example/Receiver.thy IOA/example/Sender.thy \
clasohm@923
    80
	   IOA/meta_theory/Asig.thy IOA/meta_theory/IOA.thy \
clasohm@923
    81
	   IOA/meta_theory/Option.thy IOA/meta_theory/Solve.thy
clasohm@923
    82
clasohm@923
    83
IOA_FILES = IOA/ROOT.ML IOA/example/Packet.thy IOA/example/Spec.thy\
clasohm@923
    84
	    $(IOA_THYS) $(IOA_THYS:.thy=.ML)
clasohm@923
    85
clasohm@923
    86
IOA:    $(BIN)/CHOL  $(IOA_FILES)
clasohm@923
    87
	echo 'use"IOA/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    88
clasohm@923
    89
##Properties of substitutions
clasohm@923
    90
SUBST_THYS = Subst/AList.thy Subst/Setplus.thy\
clasohm@923
    91
	     Subst/Subst.thy Subst/Unifier.thy\
clasohm@923
    92
	     Subst/UTerm.thy Subst/UTLemmas.thy
clasohm@923
    93
clasohm@923
    94
SUBST_FILES = Subst/ROOT.ML $(SUBST_THYS) $(SUBST_THYS:.thy=.ML)
clasohm@923
    95
clasohm@923
    96
Subst:  $(BIN)/CHOL  $(SUBST_FILES)
clasohm@923
    97
	echo 'use"Subst/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
    98
clasohm@923
    99
##Miscellaneous examples
clasohm@923
   100
EX_THYS = ex/LexProd.thy ex/MT.thy ex/Acc.thy \
clasohm@923
   101
	  ex/PropLog.thy ex/Puzzle.thy ex/Qsort.thy ex/LList.thy \
clasohm@923
   102
	  ex/Rec.thy ex/Simult.thy ex/Term.thy ex/String.thy 
clasohm@923
   103
clasohm@923
   104
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
clasohm@923
   105
           ex/set.ML $(EX_THYS) $(EX_THYS:.thy=.ML)
clasohm@923
   106
clasohm@923
   107
ex:     $(BIN)/CHOL  $(EX_FILES)
clasohm@923
   108
	echo 'use"ex/ROOT.ML";quit();' | $(LOGIC)
clasohm@923
   109
clasohm@923
   110
#Full test.
clasohm@923
   111
test:   $(BIN)/CHOL IMP Integ IOA Subst ex
clasohm@923
   112
	echo 'Test examples ran successfully' > test
clasohm@923
   113
clasohm@923
   114
.PRECIOUS:  $(BIN)/Pure $(BIN)/CHOL