| author | wenzelm | 
| Tue, 29 Mar 2016 16:20:48 +0200 | |
| changeset 62749 | eba34ff9671c | 
| parent 62716 | d80b9f4990e4 | 
| child 62817 | 744bfd770123 | 
| permissions | -rw-r--r-- | 
| 62643 | 1 | (*** Isabelle/Pure bootstrap ***) | 
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 2 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 3 | (** bootstrap phase 0: Poly/ML setup **) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 4 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 5 | (* initial ML name space *) | 
| 56288 | 6 | |
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 7 | use "ML/ml_system.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 8 | use "ML/ml_name_space.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 9 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 10 | if List.exists (fn (a, _) => a = "FixedInt") (#allStruct ML_Name_Space.global ()) then () | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 11 | else use "ML/fixed_int_dummy.ML"; | 
| 0 | 12 | |
| 26109 
c69c3559355b
more elaborate structure Distribution (filled-in by makedist);
 wenzelm parents: 
25953diff
changeset | 13 | structure Distribution = (*filled-in by makedist*) | 
| 
c69c3559355b
more elaborate structure Distribution (filled-in by makedist);
 wenzelm parents: 
25953diff
changeset | 14 | struct | 
| 32361 
141e5151b918
clarified situation about unidentified repository versions -- in a distributed setting there is not "the" repository;
 wenzelm parents: 
32187diff
changeset | 15 | val version = "unidentified repository version"; | 
| 57649 
a43898f76ae9
further distinction of Isabelle distribution: alert for identified release candidates;
 wenzelm parents: 
56438diff
changeset | 16 | val is_identified = false; | 
| 27642 
c0db1220b071
structure Distribution: swapped default for is_official;
 wenzelm parents: 
27546diff
changeset | 17 | val is_official = false; | 
| 26109 
c69c3559355b
more elaborate structure Distribution (filled-in by makedist);
 wenzelm parents: 
25953diff
changeset | 18 | end; | 
| 11835 | 19 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 20 | |
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 21 | (* multithreading *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 22 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 23 | use "General/exn.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 24 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 25 | val seconds = Time.fromReal; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 26 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 27 | open Thread; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 28 | use "Concurrent/multithreading.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 29 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 30 | use "Concurrent/unsynchronized.ML"; | 
| 62657 | 31 | val _ = ML_Name_Space.forget_val "ref"; | 
| 32 | val _ = ML_Name_Space.forget_type "ref"; | |
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 33 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 34 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 35 | (* pervasive environment *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 36 | |
| 62659 
bb29cc00c31f
hide critical structures of Poly/ML, to make it harder to disrupt the ML environment;
 wenzelm parents: 
62658diff
changeset | 37 | val _ = | 
| 
bb29cc00c31f
hide critical structures of Poly/ML, to make it harder to disrupt the ML environment;
 wenzelm parents: 
62658diff
changeset | 38 | List.app ML_Name_Space.forget_val | 
| 
bb29cc00c31f
hide critical structures of Poly/ML, to make it harder to disrupt the ML environment;
 wenzelm parents: 
62658diff
changeset | 39 | ["isSome", "getOpt", "valOf", "foldl", "foldr", "print", "explode", "concat"]; | 
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 40 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 41 | val ord = SML90.ord; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 42 | val chr = SML90.chr; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 43 | val raw_explode = SML90.explode; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 44 | val implode = SML90.implode; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 45 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 46 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 47 | (* ML runtime system *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 48 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 49 | use "ML/ml_heap.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 50 | use "ML/ml_profiling.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 51 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 52 | val pointer_eq = PolyML.pointerEq; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 53 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 54 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 55 | (* ML toplevel pretty printing *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 56 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 57 | use "ML/ml_pretty.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 58 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 59 | val error_depth = PolyML.error_depth; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 60 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 61 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 62 | (* ML compiler *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 63 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 64 | use "ML/ml_compiler0.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 65 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 66 | PolyML.Compiler.reportUnreferencedIds := true; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 67 | PolyML.Compiler.reportExhaustiveHandlers := true; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 68 | PolyML.Compiler.printInAlphabeticalOrder := false; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 69 | PolyML.Compiler.maxInlineSize := 80; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 70 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 71 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 72 | (* ML debugger *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 73 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 74 | use_no_debug "ML/ml_debugger.ML"; | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 75 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 76 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 77 | |
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 78 | (** bootstrap phase 1: towards ML within position context *) | 
| 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 79 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 80 | (* library of general tools *) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 81 | |
| 21396 | 82 | use "General/basics.ML"; | 
| 0 | 83 | use "library.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 84 | use "General/print_mode.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 85 | use "General/alist.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 86 | use "General/table.ML"; | 
| 43684 | 87 | |
| 88 | use "Concurrent/synchronized.ML"; | |
| 52537 | 89 | use "Concurrent/counter.ML"; | 
| 43684 | 90 | |
| 62585 | 91 | use "General/random.ML"; | 
| 43746 
a41f618c641d
some support for raw messages, which bypass standard Symbol/YXML decoding;
 wenzelm parents: 
43729diff
changeset | 92 | use "General/properties.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 93 | use "General/output.ML"; | 
| 45670 | 94 | use "PIDE/markup.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 95 | use "General/scan.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 96 | use "General/source.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 97 | use "General/symbol.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 98 | use "General/position.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 99 | use "General/symbol_pos.ML"; | 
| 59064 | 100 | use "General/input.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 101 | use "General/antiquote.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 102 | use "ML/ml_lex.ML"; | 
| 56288 | 103 | |
| 62493 | 104 | val {use, use_debug, use_no_debug} =
 | 
| 105 | let | |
| 62494 | 106 | val context: ML_Compiler0.context = | 
| 62493 | 107 |      {name_space = ML_Name_Space.global,
 | 
| 62716 
d80b9f4990e4
explicit print_depth for the sake of Spec_Check.determine_type;
 wenzelm parents: 
62710diff
changeset | 108 | print_depth = NONE, | 
| 62493 | 109 | here = Position.here oo Position.line_file, | 
| 110 | print = writeln, | |
| 62494 | 111 | error = error}; | 
| 62493 | 112 | in | 
| 62494 | 113 | ML_Compiler0.use_operations (fn opt_debug => fn file => | 
| 62493 | 114 | Position.setmp_thread_data (Position.file_only file) | 
| 115 | (fn () => | |
| 62494 | 116 | ML_Compiler0.use_file context | 
| 117 |             {verbose = true, debug = ML_Compiler0.debug_option opt_debug} file
 | |
| 118 | handle ERROR msg => (writeln msg; error "ML error")) ()) | |
| 62493 | 119 | end; | 
| 56434 | 120 | |
| 56288 | 121 | |
| 59054 
61b723761dff
load simple_thread.ML later, such that it benefits from redefined print_exception_trace;
 wenzelm parents: 
59026diff
changeset | 122 | |
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 123 | (** bootstrap phase 2: towards ML within Isar context *) | 
| 56288 | 124 | |
| 125 | (* library of general tools *) | |
| 126 | ||
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 127 | use "General/integer.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 128 | use "General/stack.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 129 | use "General/queue.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 130 | use "General/heap.ML"; | 
| 32015 
7101feb5247e
Support for copy-avoiding functions on pure values, at the cost of readability.
 wenzelm parents: 
31476diff
changeset | 131 | use "General/same.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 132 | use "General/ord_list.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 133 | use "General/balanced_tree.ML"; | 
| 38448 
62d16c415019
added functor Linear_Set, based on former adhoc structures in document.ML;
 wenzelm parents: 
38418diff
changeset | 134 | use "General/linear_set.ML"; | 
| 43593 | 135 | use "General/buffer.ML"; | 
| 43791 | 136 | use "General/pretty.ML"; | 
| 59363 
4660b0409096
added Path.decode in ML, in correspondence to Path.encode in Scala;
 wenzelm parents: 
59203diff
changeset | 137 | use "PIDE/xml.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 138 | use "General/path.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 139 | use "General/url.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 140 | use "General/file.ML"; | 
| 43547 
f3a8476285c6
clarified Binding.pretty/print: no quotes, only markup -- Binding.str_of is rendered obsolete;
 wenzelm parents: 
42504diff
changeset | 141 | use "General/long_name.ML"; | 
| 
f3a8476285c6
clarified Binding.pretty/print: no quotes, only markup -- Binding.str_of is rendered obsolete;
 wenzelm parents: 
42504diff
changeset | 142 | use "General/binding.ML"; | 
| 50800 
c0fb2839d1a9
recovered buffered sockets from 11f622794ad6 -- requires Poly/ML 5.5.x;
 wenzelm parents: 
50757diff
changeset | 143 | use "General/socket_io.ML"; | 
| 56287 | 144 | use "General/seq.ML"; | 
| 145 | use "General/timing.ML"; | |
| 35628 | 146 | use "General/sha1.ML"; | 
| 147 | ||
| 62659 
bb29cc00c31f
hide critical structures of Poly/ML, to make it harder to disrupt the ML environment;
 wenzelm parents: 
62658diff
changeset | 148 | val _ = List.app ML_Name_Space.forget_structure ML_Name_Space.critical_structures; | 
| 
bb29cc00c31f
hide critical structures of Poly/ML, to make it harder to disrupt the ML environment;
 wenzelm parents: 
62658diff
changeset | 149 | |
| 44698 | 150 | use "PIDE/yxml.ML"; | 
| 56303 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 151 | use "PIDE/document_id.ML"; | 
| 44698 | 152 | |
| 56053 
030531cc4c62
tables with changes relative to some common base version -- support for efficient join/merge of big global tables with small local updates;
 wenzelm parents: 
55672diff
changeset | 153 | use "General/change_table.ML"; | 
| 49560 | 154 | use "General/graph.ML"; | 
| 155 | ||
| 60911 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 156 | |
| 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 157 | (* fundamental structures *) | 
| 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 158 | |
| 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 159 | use "name.ML"; | 
| 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 160 | use "term.ML"; | 
| 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 161 | use "context.ML"; | 
| 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 162 | use "context_position.ML"; | 
| 51947 
3301612c4893
support for system options as context-sensitive config options;
 wenzelm parents: 
51933diff
changeset | 163 | use "System/options.ML"; | 
| 60911 
858694df711b
default ML context for forks, e.g. relevant for debugging and toplevel pretty-printing;
 wenzelm parents: 
60630diff
changeset | 164 | use "config.ML"; | 
| 51947 
3301612c4893
support for system options as context-sensitive config options;
 wenzelm parents: 
51933diff
changeset | 165 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 166 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 167 | (* concurrency within the ML runtime *) | 
| 28120 | 168 | |
| 62355 | 169 | use "ML/exn_properties.ML"; | 
| 50911 
ee7fe4230642
more explicit treatment of (optional) exception properties, notably for "serial" -- avoid conflict with startPosition = offset;
 wenzelm parents: 
50800diff
changeset | 170 | |
| 62501 | 171 | use "ML/ml_statistics.ML"; | 
| 50255 | 172 | |
| 61556 | 173 | use "Concurrent/standard_thread.ML"; | 
| 62359 | 174 | use "Concurrent/single_assignment.ML"; | 
| 59054 
61b723761dff
load simple_thread.ML later, such that it benefits from redefined print_exception_trace;
 wenzelm parents: 
59026diff
changeset | 175 | |
| 44247 | 176 | use "Concurrent/par_exn.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 177 | use "Concurrent/task_queue.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 178 | use "Concurrent/future.ML"; | 
| 52798 
9d3c9862d1dd
recovered delay for Document.start_execution (see also 627fb639a2d9), which potentially improves throughput when many consecutive edits arrive;
 wenzelm parents: 
52788diff
changeset | 179 | use "Concurrent/event_timer.ML"; | 
| 62519 | 180 | use "Concurrent/timeout.ML"; | 
| 32815 
1a5e364584ae
separate concurrent/sequential versions of lazy evaluation;
 wenzelm parents: 
32738diff
changeset | 181 | use "Concurrent/lazy.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 182 | use "Concurrent/par_list.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 183 | |
| 44247 | 184 | use "Concurrent/mailbox.ML"; | 
| 32840 | 185 | use "Concurrent/cache.ML"; | 
| 186 | ||
| 50500 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 wenzelm parents: 
50498diff
changeset | 187 | use "PIDE/active.ML"; | 
| 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 wenzelm parents: 
50498diff
changeset | 188 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 189 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 190 | (* inner syntax *) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 191 | |
| 52211 
66bc827e37f8
explicit support for type annotations within printed syntax trees;
 wenzelm parents: 
52140diff
changeset | 192 | use "Syntax/type_annotation.ML"; | 
| 42264 | 193 | use "Syntax/term_position.ML"; | 
| 194 | use "Syntax/lexicon.ML"; | |
| 22679 | 195 | use "Syntax/ast.ML"; | 
| 42288 
2074b31650e6
discontinued special treatment of structure Syntax_Ext (formerly Syn_Ext);
 wenzelm parents: 
42284diff
changeset | 196 | use "Syntax/syntax_ext.ML"; | 
| 22679 | 197 | use "Syntax/parser.ML"; | 
| 42284 | 198 | use "Syntax/syntax_trans.ML"; | 
| 22679 | 199 | use "Syntax/mixfix.ML"; | 
| 200 | use "Syntax/printer.ML"; | |
| 201 | use "Syntax/syntax.ML"; | |
| 202 | ||
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 203 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 204 | (* core of tactical proof system *) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 205 | |
| 42382 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 206 | use "term_ord.ML"; | 
| 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 207 | use "term_subst.ML"; | 
| 43729 | 208 | use "term_xml.ML"; | 
| 55672 
5e25cc741ab9
support for completion within the formal context;
 wenzelm parents: 
55516diff
changeset | 209 | use "General/completion.ML"; | 
| 42382 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 210 | use "General/name_space.ML"; | 
| 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 211 | use "sorts.ML"; | 
| 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 212 | use "type.ML"; | 
| 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 213 | use "logic.ML"; | 
| 
dcd983ee2c29
provide structure Syntax early (before structure Type), back-patch check/uncheck later;
 wenzelm parents: 
42357diff
changeset | 214 | use "Syntax/simple_syntax.ML"; | 
| 30559 
e5987a7ac5df
turned structure NetRules into general Item_Net, which is loaded earlier;
 wenzelm parents: 
30173diff
changeset | 215 | use "net.ML"; | 
| 
e5987a7ac5df
turned structure NetRules into general Item_Net, which is loaded earlier;
 wenzelm parents: 
30173diff
changeset | 216 | use "item_net.ML"; | 
| 18934 | 217 | use "envir.ML"; | 
| 18059 | 218 | use "consts.ML"; | 
| 24257 | 219 | use "primitive_defs.ML"; | 
| 61261 
ddb2da7cb2e4
more explicit Defs.context: use proper name spaces as far as possible;
 wenzelm parents: 
60962diff
changeset | 220 | use "sign.ML"; | 
| 27546 | 221 | use "defs.ML"; | 
| 43795 
ca5896a836ba
recovered some runtime sharing from d6b6c74a8bcf, without the global memory bottleneck;
 wenzelm parents: 
43794diff
changeset | 222 | use "term_sharing.ML"; | 
| 0 | 223 | use "pattern.ML"; | 
| 224 | use "unify.ML"; | |
| 1528 | 225 | use "theory.ML"; | 
| 11511 | 226 | use "proofterm.ML"; | 
| 0 | 227 | use "thm.ML"; | 
| 59026 
30b8a5825a9c
removed some add-ons from modules that are relevant for the inference kernel;
 wenzelm parents: 
58928diff
changeset | 228 | use "more_pattern.ML"; | 
| 
30b8a5825a9c
removed some add-ons from modules that are relevant for the inference kernel;
 wenzelm parents: 
58928diff
changeset | 229 | use "more_unify.ML"; | 
| 22361 | 230 | use "more_thm.ML"; | 
| 26279 | 231 | use "facts.ML"; | 
| 39557 
fe5722fce758
renamed structure PureThy to Pure_Thy and moved most content to Global_Theory, to emphasize that this is global-only;
 wenzelm parents: 
39508diff
changeset | 232 | use "global_theory.ML"; | 
| 3986 | 233 | use "pure_thy.ML"; | 
| 0 | 234 | use "drule.ML"; | 
| 22233 | 235 | use "morphism.ML"; | 
| 19898 | 236 | use "variable.ML"; | 
| 24833 | 237 | use "conv.ML"; | 
| 32187 | 238 | use "goal_display.ML"; | 
| 32169 | 239 | use "tactical.ML"; | 
| 1582 | 240 | use "search.ML"; | 
| 21708 | 241 | use "tactic.ML"; | 
| 41228 
e1fce873b814
renamed structure MetaSimplifier to raw_Simplifer, to emphasize its meaning;
 wenzelm parents: 
40748diff
changeset | 242 | use "raw_simplifier.ML"; | 
| 19417 | 243 | use "conjunction.ML"; | 
| 20225 | 244 | use "assumption.ML"; | 
| 0 | 245 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 246 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 247 | (* Isar -- Intelligible Semi-Automated Reasoning *) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 248 | |
| 56303 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 249 | (*ML support and global execution*) | 
| 49041 
9edfd36a0355
more informative error message from failed goal forks (violating old-style TTY protocol!);
 wenzelm parents: 
48990diff
changeset | 250 | use "ML/ml_syntax.ML"; | 
| 
9edfd36a0355
more informative error message from failed goal forks (violating old-style TTY protocol!);
 wenzelm parents: 
48990diff
changeset | 251 | use "ML/ml_env.ML"; | 
| 56303 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 252 | use "ML/ml_options.ML"; | 
| 62498 | 253 | use_no_debug "ML/exn_debugger.ML"; | 
| 254 | use_no_debug "Isar/runtime.ML"; | |
| 56303 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 255 | use "PIDE/execution.ML"; | 
| 62355 | 256 | use "ML/ml_compiler.ML"; | 
| 49041 
9edfd36a0355
more informative error message from failed goal forks (violating old-style TTY protocol!);
 wenzelm parents: 
48990diff
changeset | 257 | |
| 51551 | 258 | use "skip_proof.ML"; | 
| 49041 
9edfd36a0355
more informative error message from failed goal forks (violating old-style TTY protocol!);
 wenzelm parents: 
48990diff
changeset | 259 | use "goal.ML"; | 
| 
9edfd36a0355
more informative error message from failed goal forks (violating old-style TTY protocol!);
 wenzelm parents: 
48990diff
changeset | 260 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 261 | (*proof context*) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 262 | use "Isar/object_logic.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 263 | use "Isar/rule_cases.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 264 | use "Isar/auto_bind.ML"; | 
| 42241 
dd8029f71e1c
separate module for standard implementation of inner syntax operations;
 wenzelm parents: 
42240diff
changeset | 265 | use "type_infer.ML"; | 
| 42240 
5a4d30cd47a7
moved Isar/local_syntax.ML to Syntax/local_syntax.ML;
 wenzelm parents: 
42012diff
changeset | 266 | use "Syntax/local_syntax.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 267 | use "Isar/proof_context.ML"; | 
| 42405 
13ecdb3057d8
split Type_Infer into early and late part, after Proof_Context;
 wenzelm parents: 
42383diff
changeset | 268 | use "type_infer_context.ML"; | 
| 42243 | 269 | use "Syntax/syntax_phases.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 270 | use "Isar/local_defs.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 271 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 272 | (*outer syntax*) | 
| 58903 | 273 | use "Isar/keyword.ML"; | 
| 36959 
f5417836dbea
renamed structure OuterLex to Token and type token to Token.T, keeping legacy aliases for some time;
 wenzelm parents: 
36955diff
changeset | 274 | use "Isar/token.ML"; | 
| 36949 
080e85d46108
renamed structure OuterKeyword to Keyword and OuterParse to Parse, keeping the old names as legacy aliases for some time;
 wenzelm parents: 
35949diff
changeset | 275 | use "Isar/parse.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 276 | use "Isar/args.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 277 | |
| 57926 
59b2572e8e93
load local_theory.ML before attrib.ML, with subtle change of semantics due to canonical Local_Theory.map_contexts instead of private Local_Theory.map_top;
 wenzelm parents: 
57905diff
changeset | 278 | (*theory specifications*) | 
| 
59b2572e8e93
load local_theory.ML before attrib.ML, with subtle change of semantics due to canonical Local_Theory.map_contexts instead of private Local_Theory.map_top;
 wenzelm parents: 
57905diff
changeset | 279 | use "Isar/local_theory.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 280 | use "Thy/thy_header.ML"; | 
| 57905 
c0c5652e796e
separate module Command_Span: mostly syntactic representation;
 wenzelm parents: 
57649diff
changeset | 281 | use "PIDE/command_span.ML"; | 
| 51265 | 282 | use "Thy/thy_syntax.ML"; | 
| 61454 | 283 | use "Thy/markdown.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 284 | use "Thy/html.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 285 | use "Thy/latex.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 286 | |
| 56203 
76c72f4d0667
clarified bootstrap process: switch to ML with context and antiquotations earlier;
 wenzelm parents: 
56072diff
changeset | 287 | (*ML with context and antiquotations*) | 
| 
76c72f4d0667
clarified bootstrap process: switch to ML with context and antiquotations earlier;
 wenzelm parents: 
56072diff
changeset | 288 | use "ML/ml_context.ML"; | 
| 56205 | 289 | use "ML/ml_antiquotation.ML"; | 
| 56288 | 290 | |
| 62493 | 291 | val {use, use_debug, use_no_debug} =
 | 
| 62494 | 292 | ML_Compiler0.use_operations (fn opt_debug => fn file => | 
| 62493 | 293 | let val flags = ML_Compiler.verbose true (ML_Compiler.debug_flags opt_debug) in | 
| 62490 
39d01eaf5292
ML debugger support in Pure (again, see 3565c9f407ec);
 wenzelm parents: 
62459diff
changeset | 294 | ML_Context.eval_file flags (Path.explode file) | 
| 
39d01eaf5292
ML debugger support in Pure (again, see 3565c9f407ec);
 wenzelm parents: 
62459diff
changeset | 295 | handle ERROR msg => (writeln msg; error "ML error") | 
| 62493 | 296 | end); | 
| 56434 | 297 | |
| 56288 | 298 | |
| 299 | ||
| 62508 
d0b68218ea55
discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
 wenzelm parents: 
62501diff
changeset | 300 | (** bootstrap phase 3: towards Pure.thy and final ML toplevel setup *) | 
| 56203 
76c72f4d0667
clarified bootstrap process: switch to ML with context and antiquotations earlier;
 wenzelm parents: 
56072diff
changeset | 301 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 302 | (*basic proof engine*) | 
| 58009 | 303 | use "par_tactical.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 304 | use "Isar/proof_display.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 305 | use "Isar/attrib.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 306 | use "Isar/context_rules.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 307 | use "Isar/method.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 308 | use "Isar/proof.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 309 | use "Isar/element.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 310 | use "Isar/obtain.ML"; | 
| 60630 | 311 | use "Isar/subgoal.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 312 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 313 | (*local theories and targets*) | 
| 52140 | 314 | use "Isar/locale.ML"; | 
| 38307 
0028571ade2d
split off structure Generic_Target into separate file
 haftmann parents: 
38150diff
changeset | 315 | use "Isar/generic_target.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 316 | use "Isar/overloading.ML"; | 
| 35669 
a91c7ed801b8
added ProofContext.tsig_of -- proforma version for local name space only, not logical content;
 wenzelm parents: 
35628diff
changeset | 317 | use "axclass.ML"; | 
| 38379 
67d71449e85b
more convenient split of class modules: class and class_declaration
 haftmann parents: 
38350diff
changeset | 318 | use "Isar/class.ML"; | 
| 38350 
480b2de9927c
renamed Theory_Target to the more appropriate Named_Target
 haftmann parents: 
38343diff
changeset | 319 | use "Isar/named_target.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 320 | use "Isar/expression.ML"; | 
| 61669 | 321 | use "Isar/interpretation.ML"; | 
| 38379 
67d71449e85b
more convenient split of class modules: class and class_declaration
 haftmann parents: 
38350diff
changeset | 322 | use "Isar/class_declaration.ML"; | 
| 47057 | 323 | use "Isar/bundle.ML"; | 
| 59901 | 324 | use "Isar/experiment.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 325 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 326 | use "simplifier.ML"; | 
| 58660 | 327 | use "Tools/plugin.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 328 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 329 | (*executable theory content*) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 330 | use "Isar/code.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 331 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 332 | (*specifications*) | 
| 36952 
338c3f8229e4
renamed structure SpecParse to Parse_Spec, keeping the old name as alias for some time;
 wenzelm parents: 
36951diff
changeset | 333 | use "Isar/parse_spec.ML"; | 
| 33374 
8099185908a4
Rules that characterize functional/relational specifications.
 wenzelm parents: 
32840diff
changeset | 334 | use "Isar/spec_rules.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 335 | use "Isar/specification.ML"; | 
| 35626 | 336 | use "Isar/typedecl.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 337 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 338 | (*toplevel transactions*) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 339 | use "Isar/proof_node.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 340 | use "Isar/toplevel.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 341 | |
| 56206 | 342 | (*proof term operations*) | 
| 343 | use "Proof/reconstruct.ML"; | |
| 344 | use "Proof/proof_syntax.ML"; | |
| 345 | use "Proof/proof_rewrite_rules.ML"; | |
| 346 | use "Proof/proof_checker.ML"; | |
| 347 | use "Proof/extraction.ML"; | |
| 348 | ||
| 62584 | 349 | (*Isabelle system*) | 
| 350 | if ML_System.platform_is_windows | |
| 351 | then use "System/bash_windows.ML" | |
| 352 | else use "System/bash.ML"; | |
| 353 | use "System/isabelle_system.ML"; | |
| 354 | ||
| 38271 
36187e8443dd
Isar_Document command input via native Isabelle_Process commands, using YXML and XML_Data representation;
 wenzelm parents: 
38266diff
changeset | 355 | (*theory documents*) | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 356 | use "Thy/term_style.ML"; | 
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58903diff
changeset | 357 | use "Isar/outer_syntax.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 358 | use "Thy/thy_output.ML"; | 
| 61619 | 359 | use "Thy/document_antiquotations.ML"; | 
| 49561 | 360 | use "General/graph_display.ML"; | 
| 43712 
3c2c912af2ef
moved Outer_Syntax.load_thy to Thy_Load.load_thy;
 wenzelm parents: 
43684diff
changeset | 361 | use "Thy/present.ML"; | 
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58903diff
changeset | 362 | use "pure_syn.ML"; | 
| 52510 | 363 | use "PIDE/command.ML"; | 
| 52865 
02a7e7180ee5
slightly more general support for one-shot query operations via asynchronous print functions and temporary document overlay;
 wenzelm parents: 
52836diff
changeset | 364 | use "PIDE/query_operation.ML"; | 
| 56208 | 365 | use "PIDE/resources.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 366 | use "Thy/thy_info.ML"; | 
| 59086 
94b2690ad494
node-specific keywords, with session base syntax as default;
 wenzelm parents: 
59064diff
changeset | 367 | use "PIDE/session.ML"; | 
| 59714 
ae322325adbb
tuned protocol -- resolve command positions in ML;
 wenzelm parents: 
59470diff
changeset | 368 | use "PIDE/protocol_message.ML"; | 
| 44185 | 369 | use "PIDE/document.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 370 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 371 | (*theory and proof operations*) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 372 | use "Isar/isar_cmd.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 373 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 374 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 375 | (* Isabelle/Isar system *) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 376 | |
| 48681 
181b91e1d1c1
prefer general Command_Line.tool wrapper (cf. Scala version);
 wenzelm parents: 
48646diff
changeset | 377 | use "System/command_line.ML"; | 
| 45029 
63144ea111f7
abstract System_Channel in ML (cf. Scala version);
 wenzelm parents: 
45026diff
changeset | 378 | use "System/system_channel.ML"; | 
| 52584 | 379 | use "System/message_channel.ML"; | 
| 38412 
c23f3abbf42d
moved isar_document.ML/scala to Pure/System/ -- side-by-side with isar.ML;
 wenzelm parents: 
38379diff
changeset | 380 | use "System/isabelle_process.ML"; | 
| 43748 | 381 | use "System/invoke_scala.ML"; | 
| 45709 
87017fcbad83
clarified modules (again) -- NB: both Document and Protocol are specific to this particular prover;
 wenzelm parents: 
45672diff
changeset | 382 | use "PIDE/protocol.ML"; | 
| 30173 
eabece26b89b
moved isabelle_process.ML, isabelle_process.scala, isar.ML, session.ML to Pure/System/ (together with associated Isar commands);
 wenzelm parents: 
29269diff
changeset | 383 | |
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 384 | |
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 385 | (* miscellaneous tools and packages for Pure Isabelle *) | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 386 | |
| 50686 | 387 | use "Tools/build.ML"; | 
| 31432 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 388 | use "Tools/named_thms.ML"; | 
| 
9858f32f9569
just one ROOT.ML without any cd or ".." -- simplifies ML environment references to bootstrap sources;
 wenzelm parents: 
31335diff
changeset | 389 | |
| 55387 
51f0876f61df
seal system channels at end of Pure bootstrap -- Isabelle/Scala provides official interfaces;
 wenzelm parents: 
55141diff
changeset | 390 | structure Output: OUTPUT = Output; (*seal system channels!*) | 
| 
51f0876f61df
seal system channels at end of Pure bootstrap -- Isabelle/Scala provides official interfaces;
 wenzelm parents: 
55141diff
changeset | 391 | |
| 62665 | 392 | use "ML/ml_pp.ML"; | 
| 48732 
f04320479ff9
simplified Pure bootstrap -- separate pure_setup.ML was required for Alice/ML at some point;
 wenzelm parents: 
48681diff
changeset | 393 | |
| 
f04320479ff9
simplified Pure bootstrap -- separate pure_setup.ML was required for Alice/ML at some point;
 wenzelm parents: 
48681diff
changeset | 394 | |
| 49862 
fb2d8ba7d3a9
more friendly handling of Pure.thy bootstrap errors;
 wenzelm parents: 
49561diff
changeset | 395 | (* the Pure theory *) | 
| 
fb2d8ba7d3a9
more friendly handling of Pure.thy bootstrap errors;
 wenzelm parents: 
49561diff
changeset | 396 | |
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58903diff
changeset | 397 | use "ML/ml_file.ML"; | 
| 56303 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 398 | Runtime.toplevel_program (fn () => Thy_Info.use_thy ("Pure", Position.none));
 | 
| 49862 
fb2d8ba7d3a9
more friendly handling of Pure.thy bootstrap errors;
 wenzelm parents: 
49561diff
changeset | 399 | Context.set_thread_data NONE; | 
| 60937 | 400 | structure Pure = struct val thy = Thy_Info.pure_theory () end; | 
| 49862 
fb2d8ba7d3a9
more friendly handling of Pure.thy bootstrap errors;
 wenzelm parents: 
49561diff
changeset | 401 | |
| 
fb2d8ba7d3a9
more friendly handling of Pure.thy bootstrap errors;
 wenzelm parents: 
49561diff
changeset | 402 | |
| 48879 | 403 | (* ML toplevel commands *) | 
| 404 | ||
| 56303 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 405 | fun use_thys args = | 
| 
4cc3f4db3447
clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
 wenzelm parents: 
56288diff
changeset | 406 | Runtime.toplevel_program (fn () => Thy_Info.use_thys (map (rpair Position.none) args)); | 
| 48927 
ef462b5558eb
theory def/ref position reports, which enable hyperlinks etc.;
 wenzelm parents: 
48879diff
changeset | 407 | val use_thy = use_thys o single; | 
| 48732 
f04320479ff9
simplified Pure bootstrap -- separate pure_setup.ML was required for Alice/ML at some point;
 wenzelm parents: 
48681diff
changeset | 408 | |
| 52487 
48bc24467008
backout dedd7952a62c: static "proofs" value within theory prevents later inferencing with different configuration;
 wenzelm parents: 
52470diff
changeset | 409 | Proofterm.proofs := 0; |