src/Pure/Isar/method.ML
author wenzelm
Wed Sep 08 18:10:39 1999 +0200 (1999-09-08)
changeset 7526 1ea137d3b5bf
parent 7506 08a88d4ebd54
child 7555 dd281afb33d7
permissions -rw-r--r--
(un)fold: ignore facts;
wenzelm@5824
     1
(*  Title:      Pure/Isar/method.ML
wenzelm@5824
     2
    ID:         $Id$
wenzelm@5824
     3
    Author:     Markus Wenzel, TU Muenchen
wenzelm@5824
     4
wenzelm@5824
     5
Proof methods.
wenzelm@5824
     6
*)
wenzelm@5824
     7
wenzelm@5824
     8
signature BASIC_METHOD =
wenzelm@5824
     9
sig
wenzelm@5824
    10
  val print_methods: theory -> unit
wenzelm@5824
    11
  val Method: bstring -> (Args.src -> Proof.context -> Proof.method) -> string -> unit
wenzelm@5824
    12
end;
wenzelm@5824
    13
wenzelm@5824
    14
signature METHOD =
wenzelm@5824
    15
sig
wenzelm@5824
    16
  include BASIC_METHOD
wenzelm@6091
    17
  val METHOD: (thm list -> tactic) -> Proof.method
wenzelm@5824
    18
  val METHOD0: tactic -> Proof.method
wenzelm@5824
    19
  val fail: Proof.method
wenzelm@5824
    20
  val succeed: Proof.method
wenzelm@7419
    21
  val insert_tac: thm list -> int -> tactic
wenzelm@7419
    22
  val insert: Proof.method
wenzelm@7419
    23
  val fold: thm list -> Proof.method
wenzelm@7419
    24
  val unfold: thm list -> Proof.method
wenzelm@7419
    25
  val multi_resolve: thm list -> thm -> thm Seq.seq
wenzelm@7419
    26
  val multi_resolves: thm list -> thm list -> thm Seq.seq
wenzelm@6091
    27
  val rule_tac: thm list -> thm list -> int -> tactic
wenzelm@7130
    28
  val erule_tac: thm list -> thm list -> int -> tactic
wenzelm@6091
    29
  val rule: thm list -> Proof.method
wenzelm@7130
    30
  val erule: thm list -> Proof.method
wenzelm@7419
    31
  val assumption: Proof.method
wenzelm@5916
    32
  exception METHOD_FAIL of (string * Position.T) * exn
wenzelm@7419
    33
  val help_methods: theory -> unit
wenzelm@5824
    34
  val method: theory -> Args.src -> Proof.context -> Proof.method
wenzelm@5824
    35
  val add_methods: (bstring * (Args.src -> Proof.context -> Proof.method) * string) list
wenzelm@5824
    36
    -> theory -> theory
wenzelm@5884
    37
  val syntax: (Proof.context * Args.T list -> 'a * (Proof.context * Args.T list)) ->
wenzelm@5884
    38
    Proof.context -> Args.src -> Proof.context * 'a
wenzelm@5884
    39
  val no_args: Proof.method -> Args.src -> Proof.context -> Proof.method
wenzelm@7268
    40
  type modifier
wenzelm@7268
    41
  val sectioned_args: ((Args.T list -> modifier * Args.T list) list ->
wenzelm@5884
    42
      Proof.context * Args.T list -> 'a * (Proof.context * Args.T list)) ->
wenzelm@7268
    43
    (Args.T list -> modifier * Args.T list) list ->
wenzelm@5884
    44
    ('a -> Proof.context -> Proof.method) -> Args.src -> Proof.context -> Proof.method
wenzelm@7268
    45
  val default_sectioned_args: modifier ->
wenzelm@7268
    46
    (Args.T list -> modifier * Args.T list) list ->
wenzelm@5884
    47
    (Proof.context -> Proof.method) -> Args.src -> Proof.context -> Proof.method
wenzelm@7268
    48
  val only_sectioned_args: (Args.T list -> modifier * Args.T list) list ->
wenzelm@5884
    49
    (Proof.context -> Proof.method) -> Args.src -> Proof.context -> Proof.method
wenzelm@6091
    50
  val thms_args: (thm list -> Proof.method) -> Args.src -> Proof.context -> Proof.method
wenzelm@5824
    51
  datatype text =
wenzelm@5824
    52
    Basic of (Proof.context -> Proof.method) |
wenzelm@5824
    53
    Source of Args.src |
wenzelm@5824
    54
    Then of text list |
wenzelm@5824
    55
    Orelse of text list |
wenzelm@5824
    56
    Try of text |
wenzelm@5824
    57
    Repeat1 of text
wenzelm@5824
    58
  val refine: text -> Proof.state -> Proof.state Seq.seq
wenzelm@7506
    59
  val refine_no_facts: text -> Proof.state -> Proof.state Seq.seq
wenzelm@5824
    60
  val proof: text option -> Proof.state -> Proof.state Seq.seq
wenzelm@6981
    61
  val local_qed: text option
wenzelm@6981
    62
    -> ({kind: string, name: string, thm: thm} -> unit) * (thm -> unit)
wenzelm@6736
    63
    -> Proof.state -> Proof.state Seq.seq
wenzelm@6981
    64
  val local_terminal_proof: text * text option
wenzelm@6981
    65
    -> ({kind: string, name: string, thm: thm} -> unit) * (thm -> unit)
wenzelm@6736
    66
    -> Proof.state -> Proof.state Seq.seq
wenzelm@6981
    67
  val local_immediate_proof: ({kind: string, name: string, thm: thm} -> unit) * (thm -> unit)
wenzelm@6981
    68
    -> Proof.state -> Proof.state Seq.seq
wenzelm@6981
    69
  val local_default_proof: ({kind: string, name: string, thm: thm} -> unit) * (thm -> unit)
wenzelm@6736
    70
    -> Proof.state -> Proof.state Seq.seq
wenzelm@6951
    71
  val global_qed: text option -> Proof.state -> theory * {kind: string, name: string, thm: thm}
wenzelm@6934
    72
  val global_terminal_proof: text * text option
wenzelm@6934
    73
    -> Proof.state -> theory * {kind: string, name: string, thm: thm}
wenzelm@6532
    74
  val global_immediate_proof: Proof.state -> theory * {kind: string, name: string, thm: thm}
wenzelm@6532
    75
  val global_default_proof: Proof.state -> theory * {kind: string, name: string, thm: thm}
wenzelm@5824
    76
  val setup: (theory -> theory) list
wenzelm@5824
    77
end;
wenzelm@5824
    78
wenzelm@5824
    79
structure Method: METHOD =
wenzelm@5824
    80
struct
wenzelm@5824
    81
wenzelm@5824
    82
wenzelm@5824
    83
(** proof methods **)
wenzelm@5824
    84
wenzelm@5824
    85
(* method from tactic *)
wenzelm@5824
    86
wenzelm@6849
    87
val METHOD = Proof.method;
wenzelm@5824
    88
fun METHOD0 tac = METHOD (fn [] => tac | _ => error "Method may not be used with facts");
wenzelm@5824
    89
wenzelm@5824
    90
wenzelm@5824
    91
(* primitive *)
wenzelm@5824
    92
wenzelm@5824
    93
val fail = METHOD (K no_tac);
wenzelm@5824
    94
val succeed = METHOD (K all_tac);
wenzelm@5824
    95
wenzelm@5824
    96
wenzelm@7419
    97
(* insert *)
wenzelm@7419
    98
wenzelm@7419
    99
local
wenzelm@5824
   100
wenzelm@6981
   101
fun cut_rule_tac raw_rule =
wenzelm@6981
   102
  let
wenzelm@6981
   103
    val rule = Drule.forall_intr_vars raw_rule;
wenzelm@6981
   104
    val revcut_rl = Drule.incr_indexes_wrt [] [] [] [rule] Drule.revcut_rl;
wenzelm@6981
   105
  in Tactic.rtac (rule COMP revcut_rl) THEN' Tactic.rotate_tac ~1 end;
wenzelm@6981
   106
wenzelm@7419
   107
in
wenzelm@5824
   108
wenzelm@7419
   109
fun insert_tac [] i = all_tac
wenzelm@7419
   110
  | insert_tac facts i = EVERY (map (fn th => cut_rule_tac th i) facts);
wenzelm@6981
   111
wenzelm@7419
   112
val insert = METHOD (ALLGOALS o insert_tac);
wenzelm@7419
   113
wenzelm@7419
   114
end;
wenzelm@5824
   115
wenzelm@5824
   116
wenzelm@6532
   117
(* fold / unfold definitions *)
wenzelm@6532
   118
wenzelm@7526
   119
fun fold thms = METHOD (fn _ => fold_goals_tac thms);
wenzelm@7526
   120
fun unfold thms = METHOD (fn _ => rewrite_goals_tac thms);
wenzelm@6532
   121
wenzelm@6532
   122
wenzelm@7419
   123
(* multi_resolve *)
wenzelm@7419
   124
wenzelm@7419
   125
local
wenzelm@7419
   126
wenzelm@7419
   127
fun res th i rule =
wenzelm@7419
   128
  Thm.biresolution false [(false, th)] i rule handle THM _ => Seq.empty;
wenzelm@7419
   129
wenzelm@7419
   130
fun multi_res _ [] rule = Seq.single rule
wenzelm@7419
   131
  | multi_res i (th :: ths) rule = Seq.flat (Seq.map (res th i) (multi_res (i + 1) ths rule));
wenzelm@7419
   132
wenzelm@7419
   133
in
wenzelm@7419
   134
wenzelm@7419
   135
val multi_resolve = multi_res 1;
wenzelm@7419
   136
fun multi_resolves facts rules = Seq.flat (Seq.map (multi_resolve facts) (Seq.of_list rules));
wenzelm@7419
   137
wenzelm@7419
   138
end;
wenzelm@7419
   139
wenzelm@7419
   140
wenzelm@5824
   141
(* rule *)
wenzelm@5824
   142
wenzelm@7419
   143
local
wenzelm@5824
   144
wenzelm@7130
   145
fun gen_rule_tac tac rules [] = tac rules
wenzelm@7130
   146
  | gen_rule_tac tac erules facts =
wenzelm@5824
   147
      let
wenzelm@7419
   148
        val rules = multi_resolves facts erules;
wenzelm@7130
   149
        fun tactic i state = Seq.flat (Seq.map (fn rule => tac [rule] i state) rules);
wenzelm@7130
   150
      in tactic end;
wenzelm@7130
   151
wenzelm@7419
   152
in
wenzelm@7419
   153
wenzelm@7130
   154
val rule_tac = gen_rule_tac Tactic.resolve_tac;
wenzelm@7130
   155
val erule_tac = gen_rule_tac Tactic.eresolve_tac;
wenzelm@5824
   156
wenzelm@5824
   157
fun rule rules = METHOD (FIRSTGOAL o rule_tac rules);
wenzelm@7130
   158
fun erule rules = METHOD (FIRSTGOAL o erule_tac rules);
wenzelm@5824
   159
wenzelm@7419
   160
end;
wenzelm@7419
   161
wenzelm@7419
   162
wenzelm@7419
   163
(* assumption *)
wenzelm@7419
   164
wenzelm@7419
   165
fun assumption_tac [] = assume_tac
wenzelm@7419
   166
  | assumption_tac [fact] = resolve_tac [fact]
wenzelm@7419
   167
  | assumption_tac _ = K no_tac;
wenzelm@7419
   168
wenzelm@7419
   169
val assumption = METHOD (FIRSTGOAL o assumption_tac);
wenzelm@7419
   170
wenzelm@7419
   171
wenzelm@5824
   172
wenzelm@5824
   173
(** methods theory data **)
wenzelm@5824
   174
wenzelm@5824
   175
(* data kind 'Isar/methods' *)
wenzelm@5824
   176
wenzelm@5824
   177
structure MethodsDataArgs =
wenzelm@5824
   178
struct
wenzelm@5824
   179
  val name = "Isar/methods";
wenzelm@5824
   180
  type T =
wenzelm@5824
   181
    {space: NameSpace.T,
wenzelm@5824
   182
     meths: (((Args.src -> Proof.context -> Proof.method) * string) * stamp) Symtab.table};
wenzelm@5824
   183
wenzelm@5824
   184
  val empty = {space = NameSpace.empty, meths = Symtab.empty};
wenzelm@6546
   185
  val copy = I;
wenzelm@5824
   186
  val prep_ext = I;
wenzelm@5824
   187
  fun merge ({space = space1, meths = meths1}, {space = space2, meths = meths2}) =
wenzelm@5824
   188
    {space = NameSpace.merge (space1, space2),
wenzelm@5824
   189
      meths = Symtab.merge eq_snd (meths1, meths2) handle Symtab.DUPS dups =>
wenzelm@5824
   190
        error ("Attempt to merge different versions of methods " ^ commas_quote dups)};
wenzelm@5824
   191
wenzelm@7367
   192
  fun print_meths verbose {space, meths} =
wenzelm@5824
   193
    let
wenzelm@5824
   194
      fun prt_meth (name, ((_, comment), _)) = Pretty.block
wenzelm@6849
   195
        [Pretty.str (name ^ ":"), Pretty.brk 2, Pretty.str comment];
wenzelm@5824
   196
    in
wenzelm@7367
   197
      if not verbose then ()
wenzelm@7367
   198
      else Pretty.writeln (Display.pretty_name_space ("method name space", space));
wenzelm@6849
   199
      Pretty.writeln (Pretty.big_list "methods:"
wenzelm@6849
   200
        (map prt_meth (NameSpace.cond_extern_table space meths)))
wenzelm@5824
   201
    end;
wenzelm@7367
   202
wenzelm@7367
   203
  fun print _ = print_meths true;
wenzelm@5824
   204
end;
wenzelm@5824
   205
wenzelm@5824
   206
structure MethodsData = TheoryDataFun(MethodsDataArgs);
wenzelm@5824
   207
val print_methods = MethodsData.print;
wenzelm@7367
   208
val help_methods = MethodsDataArgs.print_meths false o MethodsData.get;
wenzelm@5824
   209
wenzelm@5824
   210
wenzelm@5824
   211
(* get methods *)
wenzelm@5824
   212
wenzelm@5916
   213
exception METHOD_FAIL of (string * Position.T) * exn;
wenzelm@5916
   214
wenzelm@5824
   215
fun method thy =
wenzelm@5824
   216
  let
wenzelm@5824
   217
    val {space, meths} = MethodsData.get thy;
wenzelm@5824
   218
wenzelm@5884
   219
    fun meth src =
wenzelm@5884
   220
      let
wenzelm@5884
   221
        val ((raw_name, _), pos) = Args.dest_src src;
wenzelm@5884
   222
        val name = NameSpace.intern space raw_name;
wenzelm@5884
   223
      in
wenzelm@5824
   224
        (case Symtab.lookup (meths, name) of
wenzelm@5824
   225
          None => error ("Unknown proof method: " ^ quote name ^ Position.str_of pos)
wenzelm@5916
   226
        | Some ((mth, _), _) => transform_failure (curry METHOD_FAIL (name, pos)) (mth src))
wenzelm@5824
   227
      end;
wenzelm@5824
   228
  in meth end;
wenzelm@5824
   229
wenzelm@5824
   230
wenzelm@5824
   231
(* add_methods *)
wenzelm@5824
   232
wenzelm@5824
   233
fun add_methods raw_meths thy =
wenzelm@5824
   234
  let
wenzelm@5824
   235
    val full = Sign.full_name (Theory.sign_of thy);
wenzelm@5824
   236
    val new_meths =
wenzelm@5824
   237
      map (fn (name, f, comment) => (full name, ((f, comment), stamp ()))) raw_meths;
wenzelm@5824
   238
wenzelm@5824
   239
    val {space, meths} = MethodsData.get thy;
wenzelm@5824
   240
    val space' = NameSpace.extend (space, map fst new_meths);
wenzelm@5824
   241
    val meths' = Symtab.extend (meths, new_meths) handle Symtab.DUPS dups =>
wenzelm@5824
   242
      error ("Duplicate declaration of method(s) " ^ commas_quote dups);
wenzelm@5824
   243
  in
wenzelm@5824
   244
    thy |> MethodsData.put {space = space', meths = meths'}
wenzelm@5824
   245
  end;
wenzelm@5824
   246
wenzelm@5824
   247
(*implicit version*)
wenzelm@5824
   248
fun Method name meth cmt = Context.>> (add_methods [(name, meth, cmt)]);
wenzelm@5824
   249
wenzelm@5824
   250
wenzelm@5884
   251
wenzelm@5884
   252
(** method syntax **)
wenzelm@5824
   253
wenzelm@5884
   254
(* basic *)
wenzelm@5884
   255
wenzelm@5884
   256
fun syntax (scan: (Proof.context * Args.T list -> 'a * (Proof.context * Args.T list))) =
wenzelm@5884
   257
  Args.syntax "method" scan;
wenzelm@5824
   258
wenzelm@5884
   259
fun no_args (x: Proof.method) src ctxt = #2 (syntax (Scan.succeed x) ctxt src);
wenzelm@5884
   260
wenzelm@5884
   261
wenzelm@5884
   262
(* sections *)
wenzelm@5824
   263
wenzelm@7268
   264
type modifier = (Proof.context -> Proof.context) * Proof.context attribute;
wenzelm@7268
   265
wenzelm@7268
   266
local
wenzelm@7268
   267
wenzelm@5884
   268
fun sect ss = Scan.first (map (fn s => Scan.lift (s --| Args.$$$ ":")) ss);
wenzelm@5884
   269
fun thms ss = Scan.unless (sect ss) Attrib.local_thms;
wenzelm@5884
   270
fun thmss ss = Scan.repeat (thms ss) >> flat;
wenzelm@5884
   271
wenzelm@7268
   272
fun apply (f, att) (ctxt, ths) = Thm.applys_attributes ((f ctxt, ths), [att]);
wenzelm@5824
   273
wenzelm@7268
   274
fun section ss = (sect ss -- thmss ss) :-- (fn (m, ths) => Scan.depend (fn ctxt =>
wenzelm@7268
   275
  Scan.succeed (apply m (ctxt, ths)))) >> #2;
wenzelm@5884
   276
wenzelm@5884
   277
fun sectioned args ss = args ss -- Scan.repeat (section ss);
wenzelm@5884
   278
wenzelm@7268
   279
in
wenzelm@5824
   280
wenzelm@5884
   281
fun sectioned_args args ss f src ctxt =
wenzelm@5921
   282
  let val (ctxt', (x, _)) = syntax (sectioned args ss) ctxt src
wenzelm@5921
   283
  in f x ctxt' end;
wenzelm@5884
   284
wenzelm@7268
   285
fun default_sectioned_args m ss f src ctxt =
wenzelm@7268
   286
  sectioned_args thmss ss (fn ths => fn ctxt' => f (#1 (apply m (ctxt', ths)))) src ctxt;
wenzelm@5884
   287
wenzelm@5884
   288
fun only_sectioned_args ss f = sectioned_args (K (Scan.succeed ())) ss (fn () => f);
wenzelm@7268
   289
wenzelm@5884
   290
fun thms_args f = sectioned_args thmss [] (fn ths => fn _ => f ths);
wenzelm@5824
   291
wenzelm@7268
   292
end;
wenzelm@7268
   293
wenzelm@5824
   294
wenzelm@5824
   295
wenzelm@5824
   296
(** method text **)
wenzelm@5824
   297
wenzelm@5824
   298
(* datatype text *)
wenzelm@5824
   299
wenzelm@5824
   300
datatype text =
wenzelm@5824
   301
  Basic of (Proof.context -> Proof.method) |
wenzelm@5824
   302
  Source of Args.src |
wenzelm@5824
   303
  Then of text list |
wenzelm@5824
   304
  Orelse of text list |
wenzelm@5824
   305
  Try of text |
wenzelm@5824
   306
  Repeat1 of text;
wenzelm@5824
   307
wenzelm@5824
   308
wenzelm@5824
   309
(* refine *)
wenzelm@5824
   310
wenzelm@5824
   311
fun refine text state =
wenzelm@5824
   312
  let
wenzelm@5824
   313
    val thy = Proof.theory_of state;
wenzelm@5824
   314
wenzelm@5824
   315
    fun eval (Basic mth) = Proof.refine mth
wenzelm@5824
   316
      | eval (Source src) = Proof.refine (method thy src)
wenzelm@5824
   317
      | eval (Then txts) = Seq.EVERY (map eval txts)
wenzelm@5824
   318
      | eval (Orelse txts) = Seq.FIRST (map eval txts)
wenzelm@5824
   319
      | eval (Try txt) = Seq.TRY (eval txt)
wenzelm@5824
   320
      | eval (Repeat1 txt) = Seq.REPEAT1 (eval txt);
wenzelm@5824
   321
  in eval text state end;
wenzelm@5824
   322
wenzelm@7506
   323
fun refine_no_facts text state =
wenzelm@7506
   324
  state
wenzelm@7506
   325
  |> Proof.goal_facts (K [])
wenzelm@7506
   326
  |> refine text;
wenzelm@6404
   327
wenzelm@5824
   328
wenzelm@7439
   329
(* finish *)
wenzelm@7439
   330
wenzelm@7439
   331
val FINISHED = FILTER (equal 0 o Thm.nprems_of);
wenzelm@7439
   332
val finish = METHOD (K (FINISHED (ALLGOALS assume_tac)));
wenzelm@7439
   333
val basic_finish = Basic (K finish);
wenzelm@7439
   334
wenzelm@7439
   335
fun finish_text None = basic_finish
wenzelm@7439
   336
  | finish_text (Some txt) = Then [txt, basic_finish];
wenzelm@7439
   337
wenzelm@5824
   338
wenzelm@6404
   339
(* structured proof steps *)
wenzelm@5824
   340
wenzelm@7506
   341
val default_text = Source (Args.src (("default", []), Position.none));
wenzelm@7439
   342
val assumption_text = Basic (K assumption);
wenzelm@6872
   343
wenzelm@5824
   344
fun proof opt_text state =
wenzelm@5824
   345
  state
wenzelm@5824
   346
  |> Proof.assert_backward
wenzelm@6404
   347
  |> refine (if_none opt_text default_text)
wenzelm@5824
   348
  |> Seq.map Proof.enter_forward;
wenzelm@5824
   349
wenzelm@7439
   350
fun local_qed opt_text = Proof.local_qed (refine (finish_text opt_text));
wenzelm@6934
   351
fun local_terminal_proof (text, opt_text) pr = Seq.THEN (proof (Some text), local_qed opt_text pr);
wenzelm@7439
   352
val local_immediate_proof = local_terminal_proof (assumption_text, None);
wenzelm@6934
   353
val local_default_proof = local_terminal_proof (default_text, None);
wenzelm@5824
   354
wenzelm@6872
   355
wenzelm@7439
   356
fun global_qeds opt_text = Proof.global_qed (refine (finish_text opt_text));
wenzelm@5824
   357
wenzelm@6951
   358
fun global_qed opt_text state =
wenzelm@6872
   359
  state
wenzelm@6951
   360
  |> global_qeds opt_text
wenzelm@6872
   361
  |> Proof.check_result "Failed to finish proof" state
wenzelm@6872
   362
  |> Seq.hd;
wenzelm@6872
   363
wenzelm@6934
   364
fun global_terminal_proof (text, opt_text) state =
wenzelm@6872
   365
  state
wenzelm@6872
   366
  |> proof (Some text)
wenzelm@6872
   367
  |> Proof.check_result "Terminal proof method failed" state
wenzelm@6951
   368
  |> (Seq.flat o Seq.map (global_qeds opt_text))
wenzelm@6872
   369
  |> Proof.check_result "Failed to finish proof (after successful terminal method)" state
wenzelm@6872
   370
  |> Seq.hd;
wenzelm@6872
   371
wenzelm@7439
   372
val global_immediate_proof = global_terminal_proof (assumption_text, None);
wenzelm@6934
   373
val global_default_proof = global_terminal_proof (default_text, None);
wenzelm@5824
   374
wenzelm@5824
   375
wenzelm@5824
   376
wenzelm@5824
   377
(** theory setup **)
wenzelm@5824
   378
wenzelm@5824
   379
(* pure_methods *)
wenzelm@5824
   380
wenzelm@5824
   381
val pure_methods =
wenzelm@5824
   382
 [("fail", no_args fail, "force failure"),
wenzelm@5824
   383
  ("succeed", no_args succeed, "succeed"),
wenzelm@7419
   384
  ("-", no_args insert, "insert facts, nothing else"),
wenzelm@6532
   385
  ("fold", thms_args fold, "fold definitions"),
wenzelm@6532
   386
  ("unfold", thms_args unfold, "unfold definitions"),
wenzelm@7130
   387
  ("rule", thms_args rule, "apply some rule"),
wenzelm@7419
   388
  ("erule", thms_args erule, "apply some erule (improper!)"),
wenzelm@7439
   389
  ("assumption", no_args assumption, "proof by assumption")];
wenzelm@5824
   390
wenzelm@5824
   391
wenzelm@5824
   392
(* setup *)
wenzelm@5824
   393
wenzelm@5824
   394
val setup = [MethodsData.init, add_methods pure_methods];
wenzelm@5824
   395
wenzelm@5824
   396
wenzelm@5824
   397
end;
wenzelm@5824
   398
wenzelm@5824
   399
wenzelm@5824
   400
structure BasicMethod: BASIC_METHOD = Method;
wenzelm@5824
   401
open BasicMethod;