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