src/Pure/Isar/attrib.ML
author wenzelm
Sat Jan 26 17:08:42 2008 +0100 (2008-01-26)
changeset 25983 111d2ed164f4
parent 24723 2110df1e157d
child 26336 a0e2b706ce73
permissions -rw-r--r--
misc tuning and internal rearrangement;
tuned attribute syntax -- no need for eta-expansion;
wenzelm@5823
     1
(*  Title:      Pure/Isar/attrib.ML
wenzelm@5823
     2
    ID:         $Id$
wenzelm@5823
     3
    Author:     Markus Wenzel, TU Muenchen
wenzelm@5823
     4
wenzelm@18734
     5
Symbolic representation of attributes -- with name and syntax.
wenzelm@5823
     6
*)
wenzelm@5823
     7
wenzelm@5823
     8
signature BASIC_ATTRIB =
wenzelm@5823
     9
sig
wenzelm@5823
    10
  val print_attributes: theory -> unit
wenzelm@5823
    11
end;
wenzelm@5823
    12
wenzelm@5823
    13
signature ATTRIB =
wenzelm@5823
    14
sig
wenzelm@5823
    15
  include BASIC_ATTRIB
wenzelm@15703
    16
  type src
wenzelm@16458
    17
  val intern: theory -> xstring -> string
wenzelm@16458
    18
  val intern_src: theory -> src -> src
wenzelm@21031
    19
  val pretty_attribs: Proof.context -> src list -> Pretty.T list
wenzelm@18734
    20
  val attribute: theory -> src -> attribute
wenzelm@18734
    21
  val attribute_i: theory -> src -> attribute
wenzelm@24723
    22
  val eval_thms: Proof.context -> (thmref * src list) list -> thm list
wenzelm@18905
    23
  val map_specs: ('a -> 'att) ->
wenzelm@18905
    24
    (('c * 'a list) * 'd) list -> (('c * 'att list) * 'd) list
wenzelm@18905
    25
  val map_facts: ('a -> 'att) ->
wenzelm@17105
    26
    (('c * 'a list) * ('d * 'a list) list) list ->
wenzelm@18905
    27
    (('c * 'att list) * ('d * 'att list) list) list
wenzelm@20289
    28
  val crude_closure: Proof.context -> src -> src
wenzelm@18734
    29
  val add_attributes: (bstring * (src -> attribute) * string) list -> theory -> theory
wenzelm@25983
    30
  val syntax: (Context.generic * Args.T list ->
wenzelm@25983
    31
    attribute * (Context.generic * Args.T list)) -> src -> attribute
wenzelm@25983
    32
  val no_args: attribute -> src -> attribute
wenzelm@25983
    33
  val add_del_args: attribute -> attribute -> src -> attribute
wenzelm@25983
    34
  val thm: Context.generic * Args.T list -> thm * (Context.generic * Args.T list)
wenzelm@25983
    35
  val thms: Context.generic * Args.T list -> thm list * (Context.generic * Args.T list)
wenzelm@25983
    36
  val multi_thm: Context.generic * Args.T list -> thm list * (Context.generic * Args.T list)
wenzelm@24110
    37
  val print_configs: Proof.context -> unit
wenzelm@25983
    38
  val internal: (morphism -> attribute) -> src
wenzelm@24126
    39
  val register_config: Config.value Config.T -> theory -> theory
wenzelm@24110
    40
  val config_bool: bstring -> bool -> bool Config.T * (theory -> theory)
wenzelm@24110
    41
  val config_int: bstring -> int -> int Config.T * (theory -> theory)
wenzelm@24110
    42
  val config_string: bstring -> string -> string Config.T * (theory -> theory)
wenzelm@24110
    43
  val config_bool_global: bstring -> bool -> bool Config.T * (theory -> theory)
wenzelm@24110
    44
  val config_int_global: bstring -> int -> int Config.T * (theory -> theory)
wenzelm@24110
    45
  val config_string_global: bstring -> string -> string Config.T * (theory -> theory)
wenzelm@5823
    46
end;
wenzelm@5823
    47
wenzelm@5823
    48
structure Attrib: ATTRIB =
wenzelm@5823
    49
struct
wenzelm@5823
    50
wenzelm@15703
    51
type src = Args.src;
wenzelm@15703
    52
wenzelm@18734
    53
(** named attributes **)
wenzelm@18636
    54
wenzelm@18734
    55
(* theory data *)
wenzelm@5823
    56
wenzelm@24110
    57
structure Attributes = TheoryDataFun
wenzelm@22846
    58
(
wenzelm@18734
    59
  type T = (((src -> attribute) * string) * stamp) NameSpace.table;
wenzelm@16344
    60
  val empty = NameSpace.empty_table;
wenzelm@6546
    61
  val copy = I;
wenzelm@16458
    62
  val extend = I;
wenzelm@23655
    63
  fun merge _ tables : T = NameSpace.merge_tables (eq_snd (op =)) tables handle Symtab.DUP dup =>
wenzelm@23655
    64
    error ("Attempt to merge different versions of attribute " ^ quote dup);
wenzelm@22846
    65
);
wenzelm@5823
    66
wenzelm@22846
    67
fun print_attributes thy =
wenzelm@22846
    68
  let
wenzelm@24110
    69
    val attribs = Attributes.get thy;
wenzelm@22846
    70
    fun prt_attr (name, ((_, comment), _)) = Pretty.block
wenzelm@22846
    71
      [Pretty.str (name ^ ":"), Pretty.brk 2, Pretty.str comment];
wenzelm@22846
    72
  in
wenzelm@22846
    73
    [Pretty.big_list "attributes:" (map prt_attr (NameSpace.extern_table attribs))]
wenzelm@22846
    74
    |> Pretty.chunks |> Pretty.writeln
wenzelm@22846
    75
  end;
wenzelm@7611
    76
wenzelm@5823
    77
wenzelm@21031
    78
(* name space *)
wenzelm@15703
    79
wenzelm@24110
    80
val intern = NameSpace.intern o #1 o Attributes.get;
wenzelm@15703
    81
val intern_src = Args.map_name o intern;
wenzelm@15703
    82
wenzelm@24110
    83
val extern = NameSpace.extern o #1 o Attributes.get o ProofContext.theory_of;
wenzelm@21031
    84
wenzelm@21031
    85
wenzelm@21031
    86
(* pretty printing *)
wenzelm@21031
    87
wenzelm@21031
    88
fun pretty_attribs _ [] = []
wenzelm@21031
    89
  | pretty_attribs ctxt srcs =
wenzelm@21031
    90
      [Pretty.enclose "[" "]"
wenzelm@21031
    91
        (Pretty.commas (map (Args.pretty_src ctxt o Args.map_name (extern ctxt)) srcs))];
wenzelm@21031
    92
wenzelm@15703
    93
wenzelm@18734
    94
(* get attributes *)
wenzelm@5823
    95
wenzelm@18734
    96
fun attribute_i thy =
wenzelm@5823
    97
  let
wenzelm@24110
    98
    val attrs = #2 (Attributes.get thy);
wenzelm@5879
    99
    fun attr src =
wenzelm@16344
   100
      let val ((name, _), pos) = Args.dest_src src in
wenzelm@17412
   101
        (case Symtab.lookup attrs name of
skalberg@15531
   102
          NONE => error ("Unknown attribute: " ^ quote name ^ Position.str_of pos)
wenzelm@23937
   103
        | SOME ((att, _), _) => att src)
wenzelm@5823
   104
      end;
wenzelm@5823
   105
  in attr end;
wenzelm@5823
   106
wenzelm@18734
   107
fun attribute thy = attribute_i thy o intern_src thy;
wenzelm@18636
   108
wenzelm@24723
   109
fun eval_thms ctxt args = ProofContext.note_thmss Thm.theoremK
wenzelm@24723
   110
  [(("", []), map (apsnd (map (attribute (ProofContext.theory_of ctxt)))) args)] ctxt
wenzelm@24723
   111
  |> (flat o map snd o fst);
wenzelm@24723
   112
wenzelm@5823
   113
wenzelm@17105
   114
(* attributed declarations *)
wenzelm@17105
   115
wenzelm@17105
   116
fun map_specs f = map (apfst (apsnd (map f)));
wenzelm@17105
   117
fun map_facts f = map (apfst (apsnd (map f)) o apsnd (map (apsnd (map f))));
wenzelm@17105
   118
wenzelm@17105
   119
wenzelm@15703
   120
(* crude_closure *)
wenzelm@15703
   121
wenzelm@15703
   122
(*Produce closure without knowing facts in advance! The following
wenzelm@18734
   123
  works reasonably well for attribute parsers that do not peek at the
wenzelm@18734
   124
  thm structure.*)
wenzelm@15703
   125
wenzelm@15703
   126
fun crude_closure ctxt src =
wenzelm@18734
   127
 (try (fn () => attribute_i (ProofContext.theory_of ctxt) src
wenzelm@18734
   128
    (Context.Proof ctxt, Drule.asm_rl)) ();
wenzelm@15703
   129
  Args.closure src);
wenzelm@15703
   130
wenzelm@15703
   131
wenzelm@5823
   132
(* add_attributes *)
wenzelm@5823
   133
wenzelm@5823
   134
fun add_attributes raw_attrs thy =
wenzelm@5823
   135
  let
wenzelm@18734
   136
    val new_attrs =
wenzelm@18734
   137
      raw_attrs |> map (fn (name, att, comment) => (name, ((att, comment), stamp ())));
haftmann@23086
   138
    fun add attrs = NameSpace.extend_table (Sign.naming_of thy) new_attrs attrs
wenzelm@23655
   139
      handle Symtab.DUP dup => error ("Duplicate declaration of attributes " ^ quote dup);
wenzelm@24110
   140
  in Attributes.map add thy end;
wenzelm@5823
   141
wenzelm@5879
   142
wenzelm@25983
   143
(* attribute syntax *)
wenzelm@5879
   144
wenzelm@25983
   145
fun syntax scan src (st, th) =
wenzelm@25983
   146
  let val (f: attribute, st') = Args.syntax "attribute" scan src st
wenzelm@25983
   147
  in f (st', th) end;
wenzelm@5823
   148
wenzelm@25983
   149
fun no_args x = syntax (Scan.succeed x);
wenzelm@25983
   150
wenzelm@25983
   151
fun add_del_args add del = syntax
wenzelm@25983
   152
  (Scan.lift (Args.add >> K add || Args.del >> K del || Scan.succeed add));
wenzelm@5879
   153
wenzelm@5879
   154
wenzelm@25983
   155
wenzelm@25983
   156
(** parsing attributed theorems **)
wenzelm@5879
   157
wenzelm@18636
   158
local
wenzelm@18636
   159
wenzelm@18998
   160
val get_thms = Context.cases PureThy.get_thms ProofContext.get_thms;
wenzelm@18998
   161
wenzelm@21698
   162
val fact_name = Args.internal_fact >> K "<fact>" || Args.name;
wenzelm@21698
   163
wenzelm@18998
   164
fun gen_thm pick = Scan.depend (fn st =>
wenzelm@24008
   165
  Args.$$$ "[" |-- Args.attribs (intern (Context.theory_of st)) --| Args.$$$ "]"
wenzelm@24008
   166
    >> (fn srcs =>
wenzelm@24008
   167
      let
wenzelm@24008
   168
        val atts = map (attribute_i (Context.theory_of st)) srcs;
wenzelm@24008
   169
        val (st', th') = Library.apply atts (st, Drule.dummy_thm);
wenzelm@24008
   170
      in (st', pick "" [th']) end) ||
wenzelm@24008
   171
  (Scan.ahead Args.alt_name -- Args.named_fact (get_thms st o Fact)
wenzelm@18037
   172
    >> (fn (s, fact) => ("", Fact s, fact)) ||
wenzelm@21698
   173
  Scan.ahead fact_name -- Args.named_fact (get_thms st o Name) -- Args.thm_sel
wenzelm@18037
   174
    >> (fn ((name, fact), sel) => (name, NameSelection (name, sel), fact)) ||
wenzelm@21698
   175
  Scan.ahead fact_name -- Args.named_fact (get_thms st o Name)
wenzelm@24008
   176
    >> (fn (name, fact) => (name, Name name, fact)))
wenzelm@24008
   177
  -- Args.opt_attribs (intern (Context.theory_of st))
wenzelm@18037
   178
  >> (fn ((name, thmref, fact), srcs) =>
wenzelm@15703
   179
    let
wenzelm@16498
   180
      val ths = PureThy.select_thm thmref fact;
wenzelm@18998
   181
      val atts = map (attribute_i (Context.theory_of st)) srcs;
wenzelm@18998
   182
      val (st', ths') = foldl_map (Library.apply atts) (st, ths);
wenzelm@15703
   183
    in (st', pick name ths') end));
berghofe@15456
   184
wenzelm@18636
   185
in
wenzelm@18636
   186
wenzelm@18998
   187
val thm = gen_thm PureThy.single_thm;
wenzelm@18998
   188
val multi_thm = gen_thm (K I);
wenzelm@19482
   189
val thms = Scan.repeat multi_thm >> flat;
wenzelm@18636
   190
wenzelm@18636
   191
end;
wenzelm@18636
   192
wenzelm@5823
   193
wenzelm@5879
   194
wenzelm@25983
   195
(** basic attributes **)
wenzelm@25983
   196
wenzelm@25983
   197
(* internal *)
wenzelm@25983
   198
wenzelm@25983
   199
fun internal att = Args.src (("Pure.attribute", [Args.mk_attribute att]), Position.none);
wenzelm@25983
   200
wenzelm@25983
   201
val internal_att =
wenzelm@25983
   202
  syntax (Scan.lift Args.internal_attribute >> Morphism.form);
wenzelm@25983
   203
wenzelm@25983
   204
wenzelm@25983
   205
(* tags *)
wenzelm@25983
   206
wenzelm@25983
   207
val tagged = syntax (Scan.lift (Args.name -- Args.name) >> PureThy.tag);
wenzelm@25983
   208
val untagged = syntax (Scan.lift Args.name >> PureThy.untag);
wenzelm@25983
   209
wenzelm@25983
   210
val kind = syntax (Scan.lift Args.name >> PureThy.kind);
wenzelm@25983
   211
wenzelm@25983
   212
wenzelm@25983
   213
(* rule composition *)
wenzelm@25983
   214
wenzelm@25983
   215
val COMP_att =
wenzelm@25983
   216
  syntax (Scan.lift (Scan.optional (Args.bracks Args.nat) 1) -- thm
wenzelm@25983
   217
    >> (fn (i, B) => Thm.rule_attribute (fn _ => fn A => Drule.compose_single (A, i, B))));
wenzelm@25983
   218
wenzelm@25983
   219
val THEN_att =
wenzelm@25983
   220
  syntax (Scan.lift (Scan.optional (Args.bracks Args.nat) 1) -- thm
wenzelm@25983
   221
    >> (fn (i, B) => Thm.rule_attribute (fn _ => fn A => A RSN (i, B))));
wenzelm@25983
   222
wenzelm@25983
   223
val OF_att =
wenzelm@25983
   224
  syntax (thms >> (fn Bs => Thm.rule_attribute (fn _ => fn A => Bs MRS A)));
wenzelm@25983
   225
wenzelm@25983
   226
wenzelm@25983
   227
(* rename_abs *)
wenzelm@25983
   228
wenzelm@25983
   229
val rename_abs = syntax
wenzelm@25983
   230
  (Scan.lift (Scan.repeat (Args.maybe Args.name) >> (apsnd o Drule.rename_bvars')));
wenzelm@25983
   231
wenzelm@25983
   232
wenzelm@25983
   233
(* unfold / fold definitions *)
wenzelm@25983
   234
wenzelm@25983
   235
fun unfolded_syntax rule =
wenzelm@25983
   236
  syntax (thms >>
wenzelm@25983
   237
    (fn ths => Thm.rule_attribute (fn context => rule (Context.proof_of context) ths)));
wenzelm@25983
   238
wenzelm@25983
   239
val unfolded = unfolded_syntax LocalDefs.unfold;
wenzelm@25983
   240
val folded = unfolded_syntax LocalDefs.fold;
wenzelm@25983
   241
wenzelm@25983
   242
wenzelm@25983
   243
(* rule cases *)
wenzelm@5823
   244
wenzelm@25983
   245
val consumes = syntax (Scan.lift (Scan.optional Args.nat 1) >> RuleCases.consumes);
wenzelm@25983
   246
val case_names = syntax (Scan.lift (Scan.repeat1 Args.name) >> RuleCases.case_names);
wenzelm@25983
   247
val case_conclusion =
wenzelm@25983
   248
  syntax (Scan.lift (Args.name -- Scan.repeat Args.name) >> RuleCases.case_conclusion);
wenzelm@25983
   249
val params = syntax (Args.and_list1 (Scan.lift (Scan.repeat Args.name)) >> RuleCases.params);
wenzelm@25983
   250
wenzelm@25983
   251
wenzelm@25983
   252
(* rule format *)
wenzelm@25983
   253
wenzelm@25983
   254
val rule_format = syntax (Args.mode "no_asm"
wenzelm@25983
   255
  >> (fn true => ObjectLogic.rule_format_no_asm | false => ObjectLogic.rule_format));
wenzelm@25983
   256
wenzelm@25983
   257
val elim_format = no_args (Thm.rule_attribute (K Tactic.make_elim));
wenzelm@25983
   258
wenzelm@25983
   259
wenzelm@25983
   260
(* misc rules *)
wenzelm@25983
   261
wenzelm@25983
   262
val standard = no_args (Thm.rule_attribute (K Drule.standard));
wenzelm@25983
   263
wenzelm@25983
   264
val no_vars = no_args (Thm.rule_attribute (fn ctxt => fn th =>
wenzelm@25983
   265
  let val ((_, [th']), _) = Variable.import_thms true [th] (Context.proof_of ctxt)
wenzelm@25983
   266
  in th' end));
wenzelm@25983
   267
wenzelm@25983
   268
val eta_long =
wenzelm@25983
   269
  no_args (Thm.rule_attribute (K (Conv.fconv_rule Drule.eta_long_conversion)));
wenzelm@25983
   270
wenzelm@25983
   271
val rotated = syntax
wenzelm@25983
   272
  (Scan.lift (Scan.optional Args.int 1) >> (fn n => Thm.rule_attribute (K (rotate_prems n))));
wenzelm@5879
   273
wenzelm@25983
   274
wenzelm@25983
   275
(* theory setup *)
wenzelm@5823
   276
wenzelm@25983
   277
val _ = Context.add_setup
wenzelm@25983
   278
 (add_attributes
wenzelm@25983
   279
   [("attribute", internal_att, "internal attribute"),
wenzelm@25983
   280
    ("tagged", tagged, "tagged theorem"),
wenzelm@25983
   281
    ("untagged", untagged, "untagged theorem"),
wenzelm@25983
   282
    ("kind", kind, "theorem kind"),
wenzelm@25983
   283
    ("COMP", COMP_att, "direct composition with rules (no lifting)"),
wenzelm@25983
   284
    ("THEN", THEN_att, "resolution with rule"),
wenzelm@25983
   285
    ("OF", OF_att, "rule applied to facts"),
wenzelm@25983
   286
    ("rename_abs", rename_abs, "rename bound variables in abstractions"),
wenzelm@25983
   287
    ("unfolded", unfolded, "unfolded definitions"),
wenzelm@25983
   288
    ("folded", folded, "folded definitions"),
wenzelm@25983
   289
    ("standard", standard, "result put into standard form"),
wenzelm@25983
   290
    ("elim_format", elim_format, "destruct rule turned into elimination rule format"),
wenzelm@25983
   291
    ("no_vars", no_vars, "frozen schematic vars"),
wenzelm@25983
   292
    ("eta_long", eta_long, "put theorem into eta long beta normal form"),
wenzelm@25983
   293
    ("consumes", consumes, "number of consumed facts"),
wenzelm@25983
   294
    ("case_names", case_names, "named rule cases"),
wenzelm@25983
   295
    ("case_conclusion", case_conclusion, "named conclusion of rule cases"),
wenzelm@25983
   296
    ("params", params, "named rule parameters"),
wenzelm@25983
   297
    ("atomize", no_args ObjectLogic.declare_atomize, "declaration of atomize rule"),
wenzelm@25983
   298
    ("rulify", no_args ObjectLogic.declare_rulify, "declaration of rulify rule"),
wenzelm@25983
   299
    ("rule_format", rule_format, "result put into standard rule format"),
wenzelm@25983
   300
    ("rotated", rotated, "rotated theorem premises"),
wenzelm@25983
   301
    ("defn", add_del_args LocalDefs.defn_add LocalDefs.defn_del,
wenzelm@25983
   302
      "declaration of definitional transformations")]);
wenzelm@8633
   303
wenzelm@5823
   304
wenzelm@5823
   305
wenzelm@24110
   306
(** configuration options **)
wenzelm@24110
   307
wenzelm@24110
   308
(* naming *)
wenzelm@24110
   309
wenzelm@24110
   310
structure Configs = TheoryDataFun
wenzelm@24713
   311
(
wenzelm@24110
   312
  type T = Config.value Config.T Symtab.table;
wenzelm@24110
   313
  val empty = Symtab.empty;
wenzelm@24110
   314
  val copy = I;
wenzelm@24110
   315
  val extend = I;
wenzelm@24110
   316
  fun merge _ = Symtab.merge (K true);
wenzelm@24713
   317
);
wenzelm@5823
   318
wenzelm@24110
   319
fun print_configs ctxt =
wenzelm@24110
   320
  let
wenzelm@24110
   321
    val thy = ProofContext.theory_of ctxt;
wenzelm@24110
   322
    fun prt (name, config) =
wenzelm@24110
   323
      let val value = Config.get ctxt config in
wenzelm@24110
   324
        Pretty.block [Pretty.str (name ^ ": " ^ Config.print_type value ^ " ="), Pretty.brk 1,
wenzelm@24110
   325
          Pretty.str (Config.print_value value)]
wenzelm@24110
   326
      end;
wenzelm@24110
   327
    val configs = NameSpace.extern_table (#1 (Attributes.get thy), Configs.get thy);
wenzelm@24110
   328
  in Pretty.writeln (Pretty.big_list "configuration options" (map prt configs)) end;
wenzelm@24110
   329
wenzelm@24110
   330
wenzelm@24110
   331
(* concrete syntax *)
wenzelm@23988
   332
wenzelm@24003
   333
local
wenzelm@24003
   334
wenzelm@24003
   335
val equals = Args.$$$ "=";
wenzelm@24003
   336
wenzelm@24110
   337
fun scan_value (Config.Bool _) =
wenzelm@24110
   338
      equals -- Args.$$$ "false" >> K (Config.Bool false) ||
wenzelm@24110
   339
      equals -- Args.$$$ "true" >> K (Config.Bool true) ||
wenzelm@24110
   340
      Scan.succeed (Config.Bool true)
wenzelm@24110
   341
  | scan_value (Config.Int _) = equals |-- Args.int >> Config.Int
wenzelm@24110
   342
  | scan_value (Config.String _) = equals |-- Args.name >> Config.String;
wenzelm@24003
   343
wenzelm@24110
   344
fun scan_config thy config =
wenzelm@24110
   345
  let val config_type = Config.get_thy thy config
wenzelm@24110
   346
  in scan_value config_type >> (K o Thm.declaration_attribute o K o Config.put_generic config) end;
wenzelm@24003
   347
wenzelm@24003
   348
in
wenzelm@24003
   349
wenzelm@24126
   350
fun register_config config thy =
wenzelm@24126
   351
  let
wenzelm@24126
   352
    val bname = Config.name_of config;
wenzelm@24126
   353
    val name = Sign.full_name thy bname;
wenzelm@24126
   354
  in
wenzelm@24126
   355
    thy
wenzelm@24126
   356
    |> add_attributes [(bname, syntax (Scan.lift (scan_config thy config) >> Morphism.form),
wenzelm@24126
   357
      "configuration option")]
wenzelm@24126
   358
    |> Configs.map (Symtab.update (name, config))
wenzelm@24126
   359
  end;
wenzelm@24110
   360
wenzelm@24110
   361
fun declare_config make coerce global name default =
wenzelm@24110
   362
  let
wenzelm@24110
   363
    val config_value = Config.declare global name (make default);
wenzelm@24110
   364
    val config = coerce config_value;
wenzelm@24126
   365
  in (config, register_config config_value) end;
wenzelm@24110
   366
wenzelm@24110
   367
val config_bool   = declare_config Config.Bool Config.bool false;
wenzelm@24110
   368
val config_int    = declare_config Config.Int Config.int false;
wenzelm@24110
   369
val config_string = declare_config Config.String Config.string false;
wenzelm@24110
   370
wenzelm@24110
   371
val config_bool_global   = declare_config Config.Bool Config.bool true;
wenzelm@24110
   372
val config_int_global    = declare_config Config.Int Config.int true;
wenzelm@24110
   373
val config_string_global = declare_config Config.String Config.string true;
wenzelm@24003
   374
wenzelm@24003
   375
end;
wenzelm@23988
   376
wenzelm@23988
   377
wenzelm@18636
   378
(* theory setup *)
wenzelm@5823
   379
wenzelm@18636
   380
val _ = Context.add_setup
wenzelm@24178
   381
 (register_config Unify.trace_bound_value #>
wenzelm@24178
   382
  register_config Unify.search_bound_value #>
wenzelm@24178
   383
  register_config Unify.trace_simp_value #>
wenzelm@24178
   384
  register_config Unify.trace_types_value #>
wenzelm@25983
   385
  register_config MetaSimplifier.simp_depth_limit_value);
wenzelm@5823
   386
wenzelm@5823
   387
end;
wenzelm@5823
   388
wenzelm@5823
   389
structure BasicAttrib: BASIC_ATTRIB = Attrib;
wenzelm@5823
   390
open BasicAttrib;