src/Pure/Isar/attrib.ML
author wenzelm
Sun Jun 30 11:37:34 2013 +0200 (2013-06-30)
changeset 52487 48bc24467008
parent 52470 dedd7952a62c
child 52683 fb028440473e
permissions -rw-r--r--
backout dedd7952a62c: static "proofs" value within theory prevents later inferencing with different configuration;
     1 (*  Title:      Pure/Isar/attrib.ML
     2     Author:     Markus Wenzel, TU Muenchen
     3 
     4 Symbolic representation of attributes -- with name and syntax.
     5 *)
     6 
     7 signature ATTRIB =
     8 sig
     9   type src = Args.src
    10   type binding = binding * src list
    11   val empty_binding: binding
    12   val is_empty_binding: binding -> bool
    13   val print_attributes: theory -> unit
    14   val intern: theory -> xstring -> string
    15   val intern_src: theory -> src -> src
    16   val pretty_attribs: Proof.context -> src list -> Pretty.T list
    17   val defined: theory -> string -> bool
    18   val attribute: Proof.context -> src -> attribute
    19   val attribute_global: theory -> src -> attribute
    20   val attribute_cmd: Proof.context -> src -> attribute
    21   val attribute_cmd_global: theory -> src -> attribute
    22   val map_specs: ('a list -> 'att list) ->
    23     (('c * 'a list) * 'b) list -> (('c * 'att list) * 'b) list
    24   val map_facts: ('a list -> 'att list) ->
    25     (('c * 'a list) * ('d * 'a list) list) list ->
    26     (('c * 'att list) * ('d * 'att list) list) list
    27   val map_facts_refs: ('a list -> 'att list) -> ('b -> 'fact) ->
    28     (('c * 'a list) * ('b * 'a list) list) list ->
    29     (('c * 'att list) * ('fact * 'att list) list) list
    30   val global_notes: string -> (binding * (thm list * src list) list) list ->
    31     theory -> (string * thm list) list * theory
    32   val local_notes: string -> (binding * (thm list * src list) list) list ->
    33     Proof.context -> (string * thm list) list * Proof.context
    34   val generic_notes: string -> (binding * (thm list * src list) list) list ->
    35     Context.generic -> (string * thm list) list * Context.generic
    36   val eval_thms: Proof.context -> (Facts.ref * src list) list -> thm list
    37   val setup: Binding.binding -> attribute context_parser -> string -> theory -> theory
    38   val attribute_setup: bstring * Position.T -> Symbol_Pos.text * Position.T -> string ->
    39     theory -> theory
    40   val add_del: attribute -> attribute -> attribute context_parser
    41   val thm_sel: Facts.interval list parser
    42   val thm: thm context_parser
    43   val thms: thm list context_parser
    44   val multi_thm: thm list context_parser
    45   val partial_evaluation: Proof.context ->
    46     (binding * (thm list * Args.src list) list) list ->
    47     (binding * (thm list * Args.src list) list) list
    48   val internal: (morphism -> attribute) -> src
    49   val print_options: Proof.context -> unit
    50   val config_bool: Binding.binding ->
    51     (Context.generic -> bool) -> bool Config.T * (theory -> theory)
    52   val config_int: Binding.binding ->
    53     (Context.generic -> int) -> int Config.T * (theory -> theory)
    54   val config_real: Binding.binding ->
    55     (Context.generic -> real) -> real Config.T * (theory -> theory)
    56   val config_string: Binding.binding ->
    57     (Context.generic -> string) -> string Config.T * (theory -> theory)
    58   val setup_config_bool: Binding.binding -> (Context.generic -> bool) -> bool Config.T
    59   val setup_config_int: Binding.binding -> (Context.generic -> int) -> int Config.T
    60   val setup_config_real: Binding.binding -> (Context.generic -> real) -> real Config.T
    61   val setup_config_string: Binding.binding -> (Context.generic -> string) -> string Config.T
    62   val option_bool: string -> bool Config.T * (theory -> theory)
    63   val option_int: string -> int Config.T * (theory -> theory)
    64   val option_real: string -> real Config.T * (theory -> theory)
    65   val option_string: string -> string Config.T * (theory -> theory)
    66   val setup_option_bool: string -> bool Config.T
    67   val setup_option_int: string -> int Config.T
    68   val setup_option_real: string -> real Config.T
    69   val setup_option_string: string -> string Config.T
    70 end;
    71 
    72 structure Attrib: ATTRIB =
    73 struct
    74 
    75 (* source and bindings *)
    76 
    77 type src = Args.src;
    78 
    79 type binding = binding * src list;
    80 
    81 val empty_binding: binding = (Binding.empty, []);
    82 fun is_empty_binding ((b, srcs): binding) = Binding.is_empty b andalso null srcs;
    83 
    84 
    85 
    86 (** named attributes **)
    87 
    88 (* theory data *)
    89 
    90 structure Attributes = Theory_Data
    91 (
    92   type T = ((src -> attribute) * string) Name_Space.table;
    93   val empty : T = Name_Space.empty_table "attribute";
    94   val extend = I;
    95   fun merge data : T = Name_Space.merge_tables data;
    96 );
    97 
    98 fun print_attributes thy =
    99   let
   100     val ctxt = Proof_Context.init_global thy;
   101     val attribs = Attributes.get thy;
   102     fun prt_attr (name, (_, "")) = Pretty.mark_str name
   103       | prt_attr (name, (_, comment)) =
   104           Pretty.block
   105             (Pretty.mark_str name :: Pretty.str ":" :: Pretty.brk 2 :: Pretty.text comment);
   106   in
   107     [Pretty.big_list "attributes:" (map prt_attr (Name_Space.extern_table ctxt attribs))]
   108     |> Pretty.chunks |> Pretty.writeln
   109   end;
   110 
   111 fun add_attribute name att comment thy = thy
   112   |> Attributes.map (Name_Space.define (Context.Theory thy) true (name, (att, comment)) #> snd);
   113 
   114 
   115 (* name space *)
   116 
   117 val intern = Name_Space.intern o #1 o Attributes.get;
   118 val intern_src = Args.map_name o intern;
   119 
   120 fun extern ctxt = Name_Space.extern ctxt (#1 (Attributes.get (Proof_Context.theory_of ctxt)));
   121 
   122 
   123 (* pretty printing *)
   124 
   125 fun pretty_attribs _ [] = []
   126   | pretty_attribs ctxt srcs =
   127       [Pretty.enum "," "[" "]" (map (Args.pretty_src ctxt o Args.map_name (extern ctxt)) srcs)];
   128 
   129 
   130 (* get attributes *)
   131 
   132 val defined = Symtab.defined o #2 o Attributes.get;
   133 
   134 fun attribute_generic context =
   135   let
   136     val thy = Context.theory_of context;
   137     val (space, tab) = Attributes.get thy;
   138     fun attr src =
   139       let val ((name, _), pos) = Args.dest_src src in
   140         (case Symtab.lookup tab name of
   141           NONE => error ("Unknown attribute: " ^ quote name ^ Position.here pos)
   142         | SOME (att, _) =>
   143             (Context_Position.report_generic context pos (Name_Space.markup space name); att src))
   144       end;
   145   in attr end;
   146 
   147 val attribute = attribute_generic o Context.Proof;
   148 val attribute_global = attribute_generic o Context.Theory;
   149 
   150 fun attribute_cmd ctxt = attribute ctxt o intern_src (Proof_Context.theory_of ctxt);
   151 fun attribute_cmd_global thy = attribute_global thy o intern_src thy;
   152 
   153 
   154 (* attributed declarations *)
   155 
   156 fun map_specs f = map (apfst (apsnd f));
   157 
   158 fun map_facts f = map (apfst (apsnd f) o apsnd (map (apsnd f)));
   159 fun map_facts_refs f g = map_facts f #> map (apsnd (map (apfst g)));
   160 
   161 
   162 (* fact expressions *)
   163 
   164 fun global_notes kind facts thy = thy |>
   165   Global_Theory.note_thmss kind (map_facts (map (attribute_global thy)) facts);
   166 
   167 fun local_notes kind facts ctxt = ctxt |>
   168   Proof_Context.note_thmss kind (map_facts (map (attribute ctxt)) facts);
   169 
   170 fun generic_notes kind facts context = context |>
   171   Context.mapping_result (global_notes kind facts) (local_notes kind facts);
   172 
   173 fun eval_thms ctxt srcs = ctxt
   174   |> Proof_Context.note_thmss ""
   175     (map_facts_refs (map (attribute_cmd ctxt)) (Proof_Context.get_fact ctxt)
   176       [((Binding.empty, []), srcs)])
   177   |> fst |> maps snd;
   178 
   179 
   180 (* attribute setup *)
   181 
   182 fun syntax scan = Args.syntax "attribute" scan;
   183 
   184 fun setup name scan =
   185   add_attribute name
   186     (fn src => fn (ctxt, th) => let val (a, ctxt') = syntax scan src ctxt in a (ctxt', th) end);
   187 
   188 fun attribute_setup name (txt, pos) cmt =
   189   Context.theory_map (ML_Context.expression pos
   190     "val (name, scan, comment): binding * attribute context_parser * string"
   191     "Context.map_theory (Attrib.setup name scan comment)"
   192     (ML_Lex.read Position.none ("(" ^ ML_Syntax.make_binding name ^ ", ") @
   193       ML_Lex.read pos txt @
   194       ML_Lex.read Position.none (", " ^ ML_Syntax.print_string cmt ^ ")")));
   195 
   196 
   197 (* add/del syntax *)
   198 
   199 fun add_del add del = Scan.lift (Args.add >> K add || Args.del >> K del || Scan.succeed add);
   200 
   201 
   202 
   203 (** parsing attributed theorems **)
   204 
   205 val thm_sel = Parse.$$$ "(" |-- Parse.list1
   206  (Parse.nat --| Parse.minus -- Parse.nat >> Facts.FromTo ||
   207   Parse.nat --| Parse.minus >> Facts.From ||
   208   Parse.nat >> Facts.Single) --| Parse.$$$ ")";
   209 
   210 local
   211 
   212 val fact_name = Args.internal_fact >> K "<fact>" || Args.name;
   213 
   214 fun gen_thm pick = Scan.depend (fn context =>
   215   let
   216     val thy = Context.theory_of context;
   217     val get = Context.cases (Global_Theory.get_fact context) Proof_Context.get_fact context;
   218     val get_fact = get o Facts.Fact;
   219     fun get_named pos name = get (Facts.Named ((name, pos), NONE));
   220   in
   221     Parse.$$$ "[" |-- Args.attribs (intern thy) --| Parse.$$$ "]" >> (fn srcs =>
   222       let
   223         val atts = map (attribute_generic context) srcs;
   224         val (th', context') = fold (uncurry o Thm.apply_attribute) atts (Drule.dummy_thm, context);
   225       in (context', pick "" [th']) end)
   226     ||
   227     (Scan.ahead Args.alt_name -- Args.named_fact get_fact
   228       >> (fn (s, fact) => ("", Facts.Fact s, fact)) ||
   229      Scan.ahead (Parse.position fact_name) :|-- (fn (name, pos) =>
   230       Args.named_fact (get_named pos) -- Scan.option thm_sel
   231         >> (fn (fact, sel) => (name, Facts.Named ((name, pos), sel), fact))))
   232     -- Args.opt_attribs (intern thy) >> (fn ((name, thmref, fact), srcs) =>
   233       let
   234         val ths = Facts.select thmref fact;
   235         val atts = map (attribute_generic context) srcs;
   236         val (ths', context') =
   237           fold_map (curry (fold (uncurry o Thm.apply_attribute) atts)) ths context;
   238       in (context', pick name ths') end)
   239   end);
   240 
   241 in
   242 
   243 val thm = gen_thm Facts.the_single;
   244 val multi_thm = gen_thm (K I);
   245 val thms = Scan.repeat multi_thm >> flat;
   246 
   247 end;
   248 
   249 
   250 
   251 (** partial evaluation -- observing rule/declaration/mixed attributes **)
   252 
   253 local
   254 
   255 val strict_eq_thm = op = o pairself Thm.rep_thm;
   256 
   257 fun apply_att src (context, th) =
   258   let
   259     val src1 = Args.assignable src;
   260     val result = attribute_generic context src1 (context, th);
   261     val src2 = Args.closure src1;
   262   in (src2, result) end;
   263 
   264 fun err msg src =
   265   let val ((name, _), pos) = Args.dest_src src
   266   in error (msg ^ " " ^ quote name ^ Position.here pos) end;
   267 
   268 fun eval src ((th, dyn), (decls, context)) =
   269   (case (apply_att src (context, th), dyn) of
   270     ((_, (NONE, SOME th')), NONE) => ((th', NONE), (decls, context))
   271   | ((_, (NONE, SOME _)), SOME _) => err "Mixed dynamic attribute followed by static rule" src
   272   | ((src', (SOME context', NONE)), NONE) =>
   273       let
   274         val decls' =
   275           (case decls of
   276             [] => [(th, [src'])]
   277           | (th2, srcs2) :: rest =>
   278               if strict_eq_thm (th, th2)
   279               then ((th2, src' :: srcs2) :: rest)
   280               else (th, [src']) :: (th2, srcs2) :: rest);
   281       in ((th, NONE), (decls', context')) end
   282   | ((src', (opt_context', opt_th')), _) =>
   283       let
   284         val context' = the_default context opt_context';
   285         val th' = the_default th opt_th';
   286         val dyn' =
   287           (case dyn of
   288             NONE => SOME (th, [src'])
   289           | SOME (dyn_th, srcs) => SOME (dyn_th, src' :: srcs));
   290       in ((th', dyn'), (decls, context')) end);
   291 
   292 in
   293 
   294 fun partial_evaluation ctxt facts =
   295   (facts, Context.Proof (Context_Position.set_visible false ctxt)) |->
   296     fold_map (fn ((b, more_atts), fact) => fn context =>
   297       let
   298         val (fact', (decls, context')) =
   299           (fact, ([], context)) |-> fold_map (fn (ths, atts) => fn res1 =>
   300             (ths, res1) |-> fold_map (fn th => fn res2 =>
   301               let
   302                 val ((th', dyn'), res3) = fold eval (atts @ more_atts) ((th, NONE), res2);
   303                 val th_atts' =
   304                   (case dyn' of
   305                     NONE => (th', [])
   306                   | SOME (dyn_th', atts') => (dyn_th', rev atts'));
   307               in (th_atts', res3) end))
   308           |>> flat;
   309         val decls' = rev (map (apsnd rev) decls);
   310         val facts' =
   311           if eq_list (eq_fst strict_eq_thm) (decls', fact') then
   312             [((b, []), map2 (fn (th, atts1) => fn (_, atts2) => (th, atts1 @ atts2)) decls' fact')]
   313           else if null decls' then [((b, []), fact')]
   314           else [(empty_binding, decls'), ((b, []), fact')];
   315       in (facts', context') end)
   316   |> fst |> flat |> map (apsnd (map (apfst single)))
   317   |> filter_out (fn (b, fact) => is_empty_binding b andalso forall (null o #2) fact);
   318 
   319 end;
   320 
   321 
   322 
   323 (** basic attributes **)
   324 
   325 (* internal *)
   326 
   327 fun internal att = Args.src (("Pure.attribute", [Token.mk_attribute att]), Position.none);
   328 
   329 
   330 (* rule composition *)
   331 
   332 val THEN_att =
   333   Scan.lift (Scan.optional (Args.bracks Parse.nat) 1) -- thm
   334     >> (fn (i, B) => Thm.rule_attribute (fn _ => fn A => A RSN (i, B)));
   335 
   336 val OF_att =
   337   thms >> (fn Bs => Thm.rule_attribute (fn _ => fn A => Bs MRS A));
   338 
   339 
   340 (* rename_abs *)
   341 
   342 val rename_abs =
   343   Scan.repeat (Args.maybe Args.name)
   344   >> (fn args => Thm.rule_attribute (K (Drule.rename_bvars' args)));
   345 
   346 
   347 (* unfold / fold definitions *)
   348 
   349 fun unfolded_syntax rule =
   350   thms >> (fn ths => Thm.rule_attribute (fn context => rule (Context.proof_of context) ths));
   351 
   352 val unfolded = unfolded_syntax Local_Defs.unfold;
   353 val folded = unfolded_syntax Local_Defs.fold;
   354 
   355 
   356 (* rule format *)
   357 
   358 val rule_format = Args.mode "no_asm"
   359   >> (fn true => Object_Logic.rule_format_no_asm | false => Object_Logic.rule_format);
   360 
   361 val elim_format = Thm.rule_attribute (K Tactic.make_elim);
   362 
   363 
   364 (* case names *)
   365 
   366 val case_names =
   367   Scan.repeat1 (Args.name --
   368     Scan.optional (Parse.$$$ "[" |-- Scan.repeat1 (Args.maybe Args.name) --| Parse.$$$ "]") []) >>
   369   (fn cs =>
   370     Rule_Cases.cases_hyp_names (map fst cs)
   371       (map (map (the_default Rule_Cases.case_hypsN) o snd) cs));
   372 
   373 
   374 (* misc rules *)
   375 
   376 val no_vars = Thm.rule_attribute (fn context => fn th =>
   377   let
   378     val ctxt = Variable.set_body false (Context.proof_of context);
   379     val ((_, [th']), _) = Variable.import true [th] ctxt;
   380   in th' end);
   381 
   382 val eta_long =
   383   Thm.rule_attribute (K (Conv.fconv_rule Drule.eta_long_conversion));
   384 
   385 val rotated = Scan.optional Parse.int 1 >> (fn n => Thm.rule_attribute (K (rotate_prems n)));
   386 
   387 
   388 (* theory setup *)
   389 
   390 val _ = Context.>> (Context.map_theory
   391  (setup (Binding.name "attribute") (Scan.lift Args.internal_attribute >> Morphism.form)
   392     "internal attribute" #>
   393   setup (Binding.name "tagged") (Scan.lift (Args.name -- Args.name) >> Thm.tag) "tagged theorem" #>
   394   setup (Binding.name "untagged") (Scan.lift Args.name >> Thm.untag) "untagged theorem" #>
   395   setup (Binding.name "kind") (Scan.lift Args.name >> Thm.kind) "theorem kind" #>
   396   setup (Binding.name "THEN") THEN_att "resolution with rule" #>
   397   setup (Binding.name "OF") OF_att "rule applied to facts" #>
   398   setup (Binding.name "rename_abs") (Scan.lift rename_abs)
   399     "rename bound variables in abstractions" #>
   400   setup (Binding.name "unfolded") unfolded "unfolded definitions" #>
   401   setup (Binding.name "folded") folded "folded definitions" #>
   402   setup (Binding.name "consumes") (Scan.lift (Scan.optional Parse.int 1) >> Rule_Cases.consumes)
   403     "number of consumed facts" #>
   404   setup (Binding.name "constraints") (Scan.lift Parse.nat >> Rule_Cases.constraints)
   405     "number of equality constraints" #>
   406   setup (Binding.name "case_names") (Scan.lift case_names) "named rule cases" #>
   407   setup (Binding.name "case_conclusion")
   408     (Scan.lift (Args.name -- Scan.repeat Args.name) >> Rule_Cases.case_conclusion)
   409     "named conclusion of rule cases" #>
   410   setup (Binding.name "params")
   411     (Scan.lift (Parse.and_list1 (Scan.repeat Args.name)) >> Rule_Cases.params)
   412     "named rule parameters" #>
   413   setup (Binding.name "standard") (Scan.succeed (Thm.rule_attribute (K Drule.export_without_context)))
   414     "result put into standard form (legacy)" #>
   415   setup (Binding.name "rule_format") rule_format "result put into canonical rule format" #>
   416   setup (Binding.name "elim_format") (Scan.succeed elim_format)
   417     "destruct rule turned into elimination rule format" #>
   418   setup (Binding.name "no_vars") (Scan.succeed no_vars) "frozen schematic vars" #>
   419   setup (Binding.name "eta_long") (Scan.succeed eta_long)
   420     "put theorem into eta long beta normal form" #>
   421   setup (Binding.name "atomize") (Scan.succeed Object_Logic.declare_atomize)
   422     "declaration of atomize rule" #>
   423   setup (Binding.name "rulify") (Scan.succeed Object_Logic.declare_rulify)
   424     "declaration of rulify rule" #>
   425   setup (Binding.name "rotated") (Scan.lift rotated) "rotated theorem premises" #>
   426   setup (Binding.name "defn") (add_del Local_Defs.defn_add Local_Defs.defn_del)
   427     "declaration of definitional transformations" #>
   428   setup (Binding.name "abs_def")
   429     (Scan.succeed (Thm.rule_attribute (fn context =>
   430       Local_Defs.meta_rewrite_rule (Context.proof_of context) #> Drule.abs_def)))
   431     "abstract over free variables of definitional theorem"));
   432 
   433 
   434 
   435 (** configuration options **)
   436 
   437 (* naming *)
   438 
   439 structure Configs = Theory_Data
   440 (
   441   type T = Config.raw Symtab.table;
   442   val empty = Symtab.empty;
   443   val extend = I;
   444   fun merge data = Symtab.merge (K true) data;
   445 );
   446 
   447 fun print_options ctxt =
   448   let
   449     val thy = Proof_Context.theory_of ctxt;
   450     fun prt (name, config) =
   451       let val value = Config.get ctxt config in
   452         Pretty.block [Pretty.mark_str name, Pretty.str (": " ^ Config.print_type value ^ " ="),
   453           Pretty.brk 1, Pretty.str (Config.print_value value)]
   454       end;
   455     val configs = Name_Space.extern_table ctxt (#1 (Attributes.get thy), Configs.get thy);
   456   in Pretty.writeln (Pretty.big_list "configuration options" (map prt configs)) end;
   457 
   458 
   459 (* concrete syntax *)
   460 
   461 local
   462 
   463 val equals = Parse.$$$ "=";
   464 
   465 fun scan_value (Config.Bool _) =
   466       equals -- Args.$$$ "false" >> K (Config.Bool false) ||
   467       equals -- Args.$$$ "true" >> K (Config.Bool true) ||
   468       Scan.succeed (Config.Bool true)
   469   | scan_value (Config.Int _) = equals |-- Parse.int >> Config.Int
   470   | scan_value (Config.Real _) = equals |-- Parse.real >> Config.Real
   471   | scan_value (Config.String _) = equals |-- Args.name >> Config.String;
   472 
   473 fun scan_config thy config =
   474   let val config_type = Config.get_global thy config
   475   in scan_value config_type >> (K o Thm.declaration_attribute o K o Config.put_generic config) end;
   476 
   477 fun register binding config thy =
   478   let val name = Sign.full_name thy binding in
   479     thy
   480     |> setup binding (Scan.lift (scan_config thy config) >> Morphism.form) "configuration option"
   481     |> Configs.map (Symtab.update (name, config))
   482   end;
   483 
   484 fun declare make coerce binding default =
   485   let
   486     val name = Binding.name_of binding;
   487     val config_value = Config.declare name (make o default);
   488     val config = coerce config_value;
   489   in (config, register binding config_value) end;
   490 
   491 in
   492 
   493 fun register_config config = register (Binding.name (Config.name_of config)) config;
   494 
   495 val config_bool = declare Config.Bool Config.bool;
   496 val config_int = declare Config.Int Config.int;
   497 val config_real = declare Config.Real Config.real;
   498 val config_string = declare Config.String Config.string;
   499 
   500 end;
   501 
   502 
   503 (* implicit setup *)
   504 
   505 local
   506 
   507 fun setup_config declare_config binding default =
   508   let
   509     val (config, setup) = declare_config binding default;
   510     val _ = Context.>> (Context.map_theory setup);
   511   in config end;
   512 
   513 in
   514 
   515 val setup_config_bool = setup_config config_bool;
   516 val setup_config_int = setup_config config_int;
   517 val setup_config_string = setup_config config_string;
   518 val setup_config_real = setup_config config_real;
   519 
   520 end;
   521 
   522 
   523 (* system options *)
   524 
   525 local
   526 
   527 fun declare_option coerce name =
   528   let
   529     val config = Config.declare_option name;
   530   in (coerce config, register_config config) end;
   531 
   532 fun setup_option coerce name =
   533   let
   534     val config = Config.declare_option name;
   535     val _ = Context.>> (Context.map_theory (register_config config));
   536   in coerce config end;
   537 
   538 in
   539 
   540 val option_bool = declare_option Config.bool;
   541 val option_int = declare_option Config.int;
   542 val option_real = declare_option Config.real;
   543 val option_string = declare_option Config.string;
   544 
   545 val setup_option_bool = setup_option Config.bool;
   546 val setup_option_int = setup_option Config.int;
   547 val setup_option_real = setup_option Config.real;
   548 val setup_option_string = setup_option Config.string;
   549 
   550 end;
   551 
   552 
   553 (* theory setup *)
   554 
   555 val _ = Context.>> (Context.map_theory
   556  (register_config quick_and_dirty_raw #>
   557   register_config Ast.trace_raw #>
   558   register_config Ast.stats_raw #>
   559   register_config Printer.show_brackets_raw #>
   560   register_config Printer.show_sorts_raw #>
   561   register_config Printer.show_types_raw #>
   562   register_config Printer.show_markup_raw #>
   563   register_config Printer.show_structs_raw #>
   564   register_config Printer.show_question_marks_raw #>
   565   register_config Syntax.ambiguity_warning_raw #>
   566   register_config Syntax.ambiguity_limit_raw #>
   567   register_config Syntax_Trans.eta_contract_raw #>
   568   register_config Name_Space.names_long_raw #>
   569   register_config Name_Space.names_short_raw #>
   570   register_config Name_Space.names_unique_raw #>
   571   register_config ML_Context.trace_raw #>
   572   register_config Proof_Context.show_abbrevs_raw #>
   573   register_config Goal_Display.goals_limit_raw #>
   574   register_config Goal_Display.show_main_goal_raw #>
   575   register_config Goal_Display.show_consts_raw #>
   576   register_config Display.show_hyps_raw #>
   577   register_config Display.show_tags_raw #>
   578   register_config Unify.trace_bound_raw #>
   579   register_config Unify.search_bound_raw #>
   580   register_config Unify.trace_simp_raw #>
   581   register_config Unify.trace_types_raw #>
   582   register_config Raw_Simplifier.simp_depth_limit_raw #>
   583   register_config Raw_Simplifier.simp_trace_depth_limit_raw #>
   584   register_config Raw_Simplifier.simp_debug_raw #>
   585   register_config Raw_Simplifier.simp_trace_raw));
   586 
   587 end;