src/Pure/ROOT.ML
author nipkow
Sat, 22 Apr 1995 13:25:31 +0200
changeset 1068 e0f2dffab506
parent 922 196ca0973a6d
child 1072 0140ff702b23
permissions -rw-r--r--
HOL.thy: "@" is no longer introduced as a "binder" but has its own explicit translation rule "@x.b" == "Eps(%x.b)". If x is a proper pattern, further translation rules for abstractions with patterns take care of the rest. This is very modular and avoids problems with "binders" such as "!" mentioned below. let now allows pttrn (let (x,y) = t in u) instead of just idt (let x = t in u) Set.thy: UN, INT, ALL, EX, etc all use "pttrn" instead of idt. Same change as for "@" above, except that "@" was a "binder" originally. Prod.thy: Added new syntax for pttrn which allows arbitrarily nested tuples. Two translation rules take care of %pttrn. Unfortunately they cannot be reversed. Hence a little ML-code is used as well. Note that now "! (x,y). ..." is syntactically valid but leads to a translation error. This is because "!" is introduced as a "binder" which means that its translation into lambda-terms is not done by a rewrite rule (aka macro) but by some fixed ML-code which comes after the rewriting stage and does not know how to handle patterns. This looks like a minor blemish since patterns in unbounded quantifiers are not that useful (well, except maybe in unique existence ...). Ideally, there should be two syntactic categories: idts, as we know and love it, which does not admit patterns. patterns, which is what idts has become now. There is one more point where patterns are now allowed but don't make sense: {e | idts . P} where idts is the list of local variables. Univ.thy: converted the defs for <++> and <**> into pattern form. It worked perfectly.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
     1
(*  Title:      Pure/ROOT.ML
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
     6
Root file for Pure Isabelle: all modules in proper order for loading.
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
     7
Loads pure Isabelle into an empty database (see also Makefile).
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
     9
TO DO:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
instantiation of theorems can lead to inconsistent sorting of type vars if
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    11
'a::S is already present and 'a::T is introduced.
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
val banner = "Pure Isabelle";
913
8aaa8c5a567e Updated the "version" variable (which was never done for
lcp
parents: 635
diff changeset
    15
val version = "Isabelle-94 revision 3: March 95";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
print_depth 1;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
use "library.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
use "term.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
use "symtab.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
structure Symtab = SymtabFun();
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    24
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    25
(*Syntax module*)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
cd "Syntax";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
use "ROOT.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
cd "..";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
use "type.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
use "sign.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
use "sequence.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
use "envir.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
use "pattern.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
use "unify.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
use "net.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
use "logic.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
use "thm.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
use "drule.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
use "tctical.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
use "tactic.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
use "goals.ML";
403
4c66b1577753 added "axclass.ML", structure AxClass;
wenzelm
parents: 83
diff changeset
    43
use "axclass.ML";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
(*Will be visible to all object-logics.*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
structure Type = TypeFun(structure Symtab=Symtab and Syntax=Syntax);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
structure Sign = SignFun(structure Type=Type and Syntax=Syntax);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
structure Sequence = SequenceFun();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    49
structure Envir = EnvirFun();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
structure Pattern = PatternFun(structure Sign=Sign and Envir=Envir);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
structure Unify = UnifyFun(structure Sign=Sign and Envir=Envir
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    52
                           and Sequence=Sequence and Pattern=Pattern);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
structure Net = NetFun();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
structure Logic = LogicFun(structure Unify=Unify and Net=Net);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
structure Thm = ThmFun(structure Logic=Logic and Unify=Unify and Net=Net
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    56
                             and Pattern=Pattern);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
structure Drule = DruleFun(structure Logic=Logic and Thm=Thm);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    58
structure Tactical = TacticalFun(structure Logic=Logic and Drule=Drule);
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    59
structure Tactic = TacticFun(structure Logic=Logic and Drule=Drule
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    60
                             and Tactical=Tactical and Net=Net);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
structure Goals = GoalsFun(structure Logic=Logic and Drule=Drule
19
929ad32d63fc Pure/ROOT.ML
wenzelm
parents: 2
diff changeset
    62
                           and Tactic=Tactic and Pattern=Pattern);
618
97b715e65f70 added init_database (somewhat experimental);
wenzelm
parents: 607
diff changeset
    63
structure AxClass = AxClassFun(structure Logic = Logic
403
4c66b1577753 added "axclass.ML", structure AxClass;
wenzelm
parents: 83
diff changeset
    64
  and Goals = Goals and Tactic = Tactic);
635
034fda1c4873 AxClass no longer open;
wenzelm
parents: 618
diff changeset
    65
open BasicSyntax Thm Drule Tactical Tactic Goals;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    66
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    67
structure Pure = struct val thy = pure_thy end;
922
196ca0973a6d added CPure (curried functions) and ProtoPure (ancestor of Pure and CPure)
clasohm
parents: 913
diff changeset
    68
structure CPure = struct val thy = cpure_thy end;
2
c67f44be880f moved use of Thy/ROOT.ML to end of file because Thy/read.ML needs Thm
clasohm
parents: 0
diff changeset
    69
618
97b715e65f70 added init_database (somewhat experimental);
wenzelm
parents: 607
diff changeset
    70
(*Theory parser and loader*)
73
075db6ac7f2f delete_file now has type string -> unit in both NJ and POLY,
clasohm
parents: 19
diff changeset
    71
cd "Thy";
075db6ac7f2f delete_file now has type string -> unit in both NJ and POLY,
clasohm
parents: 19
diff changeset
    72
use "ROOT.ML";
075db6ac7f2f delete_file now has type string -> unit in both NJ and POLY,
clasohm
parents: 19
diff changeset
    73
cd "..";
075db6ac7f2f delete_file now has type string -> unit in both NJ and POLY,
clasohm
parents: 19
diff changeset
    74
618
97b715e65f70 added init_database (somewhat experimental);
wenzelm
parents: 607
diff changeset
    75
use "install_pp.ML";
97b715e65f70 added init_database (somewhat experimental);
wenzelm
parents: 607
diff changeset
    76
fun init_database () = (init_thy_reader (); init_pps ());
97b715e65f70 added init_database (somewhat experimental);
wenzelm
parents: 607
diff changeset
    77