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