src/Pure/ROOT.ML
author wenzelm
Tue Aug 28 22:16:06 2012 +0200 (2012-08-28)
changeset 48990 12814717c95c
parent 48927 ef462b5558eb
child 49041 9edfd36a0355
permissions -rw-r--r--
discontinued centralistic changelog;
     1 (** Pure Isabelle **)
     2 
     3 structure Distribution =     (*filled-in by makedist*)
     4 struct
     5   val version = "unidentified repository version";
     6   val is_official = false;
     7 end;
     8 
     9 (*if true then some tools will OMIT some proofs*)
    10 val quick_and_dirty = Unsynchronized.ref false;
    11 
    12 print_depth 10;
    13 
    14 
    15 (* library of general tools *)
    16 
    17 use "General/basics.ML";
    18 use "library.ML";
    19 use "General/print_mode.ML";
    20 use "General/alist.ML";
    21 use "General/table.ML";
    22 
    23 use "Concurrent/simple_thread.ML";
    24 
    25 use "Concurrent/synchronized.ML";
    26 if Multithreading.available then ()
    27 else use "Concurrent/synchronized_sequential.ML";
    28 
    29 use "General/properties.ML";
    30 use "General/output.ML";
    31 use "General/timing.ML";
    32 use "PIDE/markup.ML";
    33 use "PIDE/isabelle_markup.ML";
    34 fun legacy_feature s = warning (Markup.markup Isabelle_Markup.legacy ("Legacy feature! " ^ s));
    35 use "General/scan.ML";
    36 use "General/source.ML";
    37 use "General/symbol.ML";
    38 use "General/seq.ML";
    39 use "General/position.ML";
    40 use "General/symbol_pos.ML";
    41 use "General/antiquote.ML";
    42 use "ML/ml_lex.ML";
    43 use "ML/ml_parse.ML";
    44 use "General/secure.ML";
    45 (*^^^^^ end of basic ML bootstrap ^^^^^*)
    46 use "General/integer.ML";
    47 use "General/stack.ML";
    48 use "General/queue.ML";
    49 use "General/heap.ML";
    50 use "General/same.ML";
    51 use "General/ord_list.ML";
    52 use "General/balanced_tree.ML";
    53 use "General/graph.ML";
    54 use "General/linear_set.ML";
    55 use "General/buffer.ML";
    56 use "General/pretty.ML";
    57 use "General/path.ML";
    58 use "General/url.ML";
    59 use "General/file.ML";
    60 use "General/long_name.ML";
    61 use "General/binding.ML";
    62 
    63 use "General/sha1.ML";
    64 if ML_System.is_polyml then use "General/sha1_polyml.ML" else ();
    65 
    66 use "PIDE/xml.ML";
    67 use "PIDE/yxml.ML";
    68 
    69 
    70 (* concurrency within the ML runtime *)
    71 
    72 use "Concurrent/single_assignment.ML";
    73 if Multithreading.available then ()
    74 else use "Concurrent/single_assignment_sequential.ML";
    75 
    76 if ML_System.is_polyml then use "Concurrent/time_limit.ML" else ();
    77 
    78 if Multithreading.available
    79 then use "Concurrent/bash.ML"
    80 else use "Concurrent/bash_sequential.ML";
    81 
    82 use "Concurrent/par_exn.ML";
    83 use "Concurrent/task_queue.ML";
    84 use "Concurrent/future.ML";
    85 
    86 use "Concurrent/lazy.ML";
    87 if Multithreading.available then ()
    88 else use "Concurrent/lazy_sequential.ML";
    89 
    90 use "Concurrent/par_list.ML";
    91 if Multithreading.available then ()
    92 else use "Concurrent/par_list_sequential.ML";
    93 
    94 use "Concurrent/mailbox.ML";
    95 use "Concurrent/cache.ML";
    96 
    97 
    98 (* fundamental structures *)
    99 
   100 use "name.ML";
   101 use "term.ML";
   102 use "context.ML";
   103 use "context_position.ML";
   104 use "config.ML";
   105 use "System/options.ML";
   106 
   107 
   108 (* inner syntax *)
   109 
   110 use "Syntax/term_position.ML";
   111 use "Syntax/lexicon.ML";
   112 use "Syntax/ast.ML";
   113 use "Syntax/syntax_ext.ML";
   114 use "Syntax/parser.ML";
   115 use "Syntax/syntax_trans.ML";
   116 use "Syntax/mixfix.ML";
   117 use "Syntax/printer.ML";
   118 use "Syntax/syntax.ML";
   119 
   120 
   121 (* core of tactical proof system *)
   122 
   123 use "term_ord.ML";
   124 use "term_subst.ML";
   125 use "term_xml.ML";
   126 use "General/name_space.ML";
   127 use "sorts.ML";
   128 use "type.ML";
   129 use "logic.ML";
   130 use "Syntax/simple_syntax.ML";
   131 use "net.ML";
   132 use "item_net.ML";
   133 use "envir.ML";
   134 use "consts.ML";
   135 use "primitive_defs.ML";
   136 use "defs.ML";
   137 use "sign.ML";
   138 use "term_sharing.ML";
   139 use "pattern.ML";
   140 use "unify.ML";
   141 use "theory.ML";
   142 use "interpretation.ML";
   143 use "proofterm.ML";
   144 use "thm.ML";
   145 use "more_thm.ML";
   146 use "facts.ML";
   147 use "global_theory.ML";
   148 use "pure_thy.ML";
   149 use "drule.ML";
   150 use "morphism.ML";
   151 use "variable.ML";
   152 use "conv.ML";
   153 use "goal_display.ML";
   154 use "tactical.ML";
   155 use "search.ML";
   156 use "tactic.ML";
   157 use "raw_simplifier.ML";
   158 use "conjunction.ML";
   159 use "assumption.ML";
   160 use "display.ML";
   161 use "goal.ML";
   162 
   163 
   164 (* Isar -- Intelligible Semi-Automated Reasoning *)
   165 
   166 (*proof context*)
   167 use "Isar/object_logic.ML";
   168 use "Isar/rule_cases.ML";
   169 use "Isar/auto_bind.ML";
   170 use "type_infer.ML";
   171 use "Syntax/local_syntax.ML";
   172 use "Isar/proof_context.ML";
   173 use "type_infer_context.ML";
   174 use "Syntax/syntax_phases.ML";
   175 use "Isar/local_defs.ML";
   176 
   177 (*proof term operations*)
   178 use "Proof/reconstruct.ML";
   179 use "Proof/proof_syntax.ML";
   180 use "Proof/proof_rewrite_rules.ML";
   181 use "Proof/proof_checker.ML";
   182 
   183 (*outer syntax*)
   184 use "Isar/token.ML";
   185 use "Isar/keyword.ML";
   186 use "Isar/parse.ML";
   187 use "Isar/args.ML";
   188 
   189 (*ML support*)
   190 use "ML/ml_syntax.ML";
   191 use "ML/ml_env.ML";
   192 use "Isar/runtime.ML";
   193 use "ML/ml_compiler.ML";
   194 if ML_System.is_polyml then use "ML/ml_compiler_polyml.ML" else ();
   195 use "ML/ml_context.ML";
   196 
   197 (*theory sources*)
   198 use "Thy/thy_header.ML";
   199 use "Thy/html.ML";
   200 use "Thy/latex.ML";
   201 
   202 (*basic proof engine*)
   203 use "Isar/proof_display.ML";
   204 use "Isar/attrib.ML";
   205 use "ML/ml_antiquote.ML";
   206 use "Isar/context_rules.ML";
   207 use "Isar/skip_proof.ML";
   208 use "Isar/method.ML";
   209 use "Isar/proof.ML";
   210 use "Isar/element.ML";
   211 
   212 (*derived theory and proof elements*)
   213 use "Isar/calculation.ML";
   214 use "Isar/obtain.ML";
   215 
   216 (*local theories and targets*)
   217 use "Isar/local_theory.ML";
   218 use "Isar/locale.ML";
   219 use "Isar/generic_target.ML";
   220 use "Isar/overloading.ML";
   221 use "axclass.ML";
   222 use "Isar/class.ML";
   223 use "Isar/named_target.ML";
   224 use "Isar/expression.ML";
   225 use "Isar/class_declaration.ML";
   226 use "Isar/bundle.ML";
   227 
   228 use "simplifier.ML";
   229 
   230 (*executable theory content*)
   231 use "Isar/code.ML";
   232 
   233 (*specifications*)
   234 use "Isar/parse_spec.ML";
   235 use "Isar/spec_rules.ML";
   236 use "Isar/specification.ML";
   237 use "Isar/typedecl.ML";
   238 use "ML/ml_thms.ML";
   239 
   240 (*toplevel transactions*)
   241 use "Isar/proof_node.ML";
   242 use "Isar/toplevel.ML";
   243 
   244 (*theory documents*)
   245 use "System/isabelle_system.ML";
   246 use "Thy/term_style.ML";
   247 use "Thy/thy_output.ML";
   248 use "Thy/thy_syntax.ML";
   249 use "PIDE/command.ML";
   250 use "Isar/outer_syntax.ML";
   251 use "Thy/present.ML";
   252 use "Thy/thy_load.ML";
   253 use "Thy/thy_info.ML";
   254 use "PIDE/document.ML";
   255 use "Thy/rail.ML";
   256 
   257 (*theory and proof operations*)
   258 use "Isar/rule_insts.ML";
   259 use "Thy/thm_deps.ML";
   260 use "Isar/isar_cmd.ML";
   261 
   262 use "subgoal.ML";
   263 
   264 use "Proof/extraction.ML";
   265 
   266 
   267 (* Isabelle/Isar system *)
   268 
   269 use "System/session.ML";
   270 use "System/command_line.ML";
   271 use "System/build.ML";
   272 use "System/system_channel.ML";
   273 use "System/isabelle_process.ML";
   274 use "System/invoke_scala.ML";
   275 use "PIDE/protocol.ML";
   276 use "System/isar.ML";
   277 
   278 
   279 (* miscellaneous tools and packages for Pure Isabelle *)
   280 
   281 use "Tools/named_thms.ML";
   282 
   283 use "Tools/xml_syntax.ML";
   284 
   285 
   286 (* configuration for Proof General *)
   287 
   288 use "ProofGeneral/pgip_types.ML";
   289 use "ProofGeneral/pgml.ML";
   290 use "ProofGeneral/pgip_markup.ML";
   291 use "ProofGeneral/pgip_input.ML";
   292 use "ProofGeneral/pgip_output.ML";
   293 use "ProofGeneral/pgip.ML";
   294 
   295 use "ProofGeneral/pgip_isabelle.ML";
   296 
   297 use "ProofGeneral/preferences.ML";
   298 
   299 use "ProofGeneral/pgip_parser.ML";
   300 
   301 use "ProofGeneral/proof_general_pgip.ML";
   302 use "ProofGeneral/proof_general_emacs.ML";
   303 
   304 
   305 (* the Pure theory *)
   306 
   307 use "pure_syn.ML";
   308 Thy_Info.use_thy ("Pure", Position.none);
   309 Context.set_thread_data NONE;
   310 structure Pure = struct val thy = Thy_Info.get_theory "Pure" end;
   311 
   312 
   313 use "ProofGeneral/pgip_tests.ML";
   314 
   315 
   316 (* ML toplevel pretty printing *)
   317 
   318 toplevel_pp ["Pretty", "T"] "(fn _: Pretty.T => Pretty.str \"<pretty>\")";
   319 toplevel_pp ["Task_Queue", "task"] "Pretty.str o Task_Queue.str_of_task";
   320 toplevel_pp ["Task_Queue", "group"] "Pretty.str o Task_Queue.str_of_group";
   321 toplevel_pp ["Position", "T"] "Pretty.position";
   322 toplevel_pp ["Binding", "binding"] "Pretty.str o Binding.print";
   323 toplevel_pp ["Thm", "thm"] "Proof_Display.pp_thm";
   324 toplevel_pp ["Thm", "cterm"] "Proof_Display.pp_cterm";
   325 toplevel_pp ["Thm", "ctyp"] "Proof_Display.pp_ctyp";
   326 toplevel_pp ["typ"] "Proof_Display.pp_typ Pure.thy";
   327 toplevel_pp ["Context", "theory"] "Context.pretty_thy";
   328 toplevel_pp ["Context", "theory_ref"] "Context.pretty_thy o Theory.deref";
   329 toplevel_pp ["Context", "Proof", "context"] "Proof_Display.pp_context";
   330 toplevel_pp ["Ast", "ast"] "Ast.pretty_ast";
   331 toplevel_pp ["Path", "T"] "Path.pretty";
   332 toplevel_pp ["SHA1", "digest"] "Pretty.str o quote o SHA1.rep";
   333 toplevel_pp ["Proof", "state"] "(fn _: Proof.state => Pretty.str \"<Proof.state>\")";
   334 toplevel_pp ["Toplevel", "state"] "Toplevel.pretty_abstract";
   335 
   336 if ML_System.is_polyml then use "ML/install_pp_polyml.ML" else ();
   337 
   338 
   339 (* ML toplevel commands *)
   340 
   341 fun use name = Toplevel.program (fn () => Thy_Load.use_ml (Path.explode name));
   342 
   343 fun use_thys args = Toplevel.program (fn () => Thy_Info.use_thys (map (rpair Position.none) args));
   344 val use_thy = use_thys o single;
   345 
   346 val cd = File.cd o Path.explode;
   347 
   348 Proofterm.proofs := 0;
   349 Multithreading.max_threads := 0;
   350