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