src/HOL/Tools/res_atp.ML
author paulson
Wed Aug 17 13:52:53 2005 +0200 (2005-08-17)
changeset 17091 13593aa6a546
parent 16955 93270c5f56f6
child 17150 ce2a1aeb42aa
permissions -rw-r--r--
new command to invoke ATPs
paulson@15608
     1
(*  Author: Jia Meng, Cambridge University Computer Laboratory
paulson@15608
     2
    ID: $Id$
paulson@15608
     3
    Copyright 2004 University of Cambridge
paulson@15347
     4
paulson@15347
     5
ATPs with TPTP format input.
paulson@15347
     6
*)
paulson@15452
     7
wenzelm@16802
     8
signature RES_ATP =
wenzelm@16802
     9
sig
wenzelm@16802
    10
  val axiom_file : Path.T
wenzelm@16802
    11
  val hyps_file : Path.T
wenzelm@16802
    12
  val prob_file : Path.T;
wenzelm@16802
    13
(*val atp_ax_tac : thm list -> int -> Tactical.tactic*)
quigley@15644
    14
(*val atp_tac : int -> Tactical.tactic*)
wenzelm@16802
    15
  val full_spass: bool ref
quigley@16478
    16
(*val spass: bool ref*)
wenzelm@16802
    17
  val vampire: bool ref
wenzelm@16802
    18
  val custom_spass: string list ref
paulson@15347
    19
end;
paulson@15347
    20
wenzelm@16802
    21
structure ResAtp: RES_ATP =
paulson@15347
    22
struct
paulson@15347
    23
paulson@16904
    24
fun debug_tac tac = (debug "testing"; tac);
quigley@16478
    25
quigley@16357
    26
val full_spass = ref false;
quigley@16478
    27
quigley@16478
    28
(* use spass as default prover *)
quigley@16478
    29
(*val spass = ref true;*)
quigley@16478
    30
quigley@16520
    31
val custom_spass = ref ["Auto=0","-IORe","-IOFc","-RTaut","-RFSub","-RBSub","-DocProof","-TimeLimit=60"];
quigley@16478
    32
val vampire = ref false;
quigley@16478
    33
paulson@15608
    34
val skolem_tac = skolemize_tac;
paulson@15608
    35
quigley@15644
    36
val num_of_clauses = ref 0;
wenzelm@16802
    37
val clause_arr = Array.array (3500, ("empty", 0));
quigley@15644
    38
paulson@15347
    39
paulson@15608
    40
val atomize_tac =
paulson@15608
    41
    SUBGOAL
paulson@15608
    42
     (fn (prop,_) =>
wenzelm@16802
    43
         let val ts = Logic.strip_assums_hyp prop
wenzelm@16802
    44
         in EVERY1
wenzelm@16802
    45
                [METAHYPS
wenzelm@16802
    46
                     (fn hyps => (cut_facts_tac (map (ObjectLogic.atomize_thm o forall_intr_vars) hyps) 1)),
wenzelm@16802
    47
          REPEAT_DETERM_N (length ts) o (etac thin_rl)]
paulson@15608
    48
     end);
paulson@15347
    49
paulson@15608
    50
(* temporarily use these files, which will be loaded by Vampire *)
wenzelm@16802
    51
val file_id_num = ref 0;
wenzelm@16802
    52
fun new_prob_file () = "prob" ^ string_of_int (inc file_id_num);
paulson@15347
    53
quigley@15644
    54
val axiom_file = File.tmp_path (Path.basic "axioms");
quigley@15644
    55
val clasimp_file = File.tmp_path (Path.basic "clasimp");
quigley@15644
    56
val hyps_file = File.tmp_path (Path.basic "hyps");
quigley@15644
    57
val prob_file = File.tmp_path (Path.basic "prob");
wenzelm@16802
    58
val dummy_tac = all_tac;
quigley@15644
    59
wenzelm@16802
    60
paulson@15347
    61
(**** for Isabelle/ML interface  ****)
paulson@15347
    62
paulson@16897
    63
(*Remove unwanted characters such as ? and newline from the textural 
paulson@16897
    64
  representation of a theorem (surely they don't need to be produced in 
paulson@16897
    65
  the first place?) *)
paulson@15608
    66
paulson@16897
    67
fun is_proof_char ch = (#" " <= ch andalso ch <= #"~" andalso ch <> #"?");
paulson@16897
    68
paulson@16897
    69
val proofstring =
paulson@16897
    70
    String.translate (fn c => if is_proof_char c then str c else "");
paulson@15608
    71
paulson@15452
    72
paulson@15347
    73
(**** For running in Isar ****)
paulson@15347
    74
paulson@15608
    75
(* same function as that in res_axioms.ML *)
paulson@15608
    76
fun repeat_RS thm1 thm2 =
paulson@15608
    77
    let val thm1' =  thm1 RS thm2 handle THM _ => thm1
paulson@15608
    78
    in
wenzelm@16802
    79
        if eq_thm(thm1,thm1') then thm1' else (repeat_RS thm1' thm2)
paulson@15608
    80
    end;
paulson@15608
    81
paulson@15608
    82
(* a special version of repeat_RS *)
paulson@15608
    83
fun repeat_someI_ex thm = repeat_RS thm someI_ex;
paulson@15608
    84
paulson@16925
    85
paulson@16925
    86
(*FIXME: is function isar_atp_h used? If not, delete!*)
quigley@15644
    87
(*********************************************************************)
paulson@15608
    88
(* convert clauses from "assume" to conjecture. write to file "hyps" *)
quigley@15644
    89
(* hypotheses of the goal currently being proved                     *)
quigley@15644
    90
(*********************************************************************)
quigley@16767
    91
(*perhaps have 2 different versions of this, depending on whether or not SpassComm.spass is set *)
paulson@15608
    92
fun isar_atp_h thms =
paulson@15608
    93
    let val prems = map (skolemize o make_nnf o ObjectLogic.atomize_thm) thms
quigley@15644
    94
        val prems' = map repeat_someI_ex prems
quigley@15644
    95
        val prems'' = make_clauses prems'
quigley@15644
    96
        val prems''' = ResAxioms.rm_Eps [] prems''
quigley@15644
    97
        val clss = map ResClause.make_conjecture_clause prems'''
paulson@15774
    98
	val (tptp_clss,tfree_litss) = ListPair.unzip (map ResClause.clause2tptp clss) 
paulson@15608
    99
	val tfree_lits = ResLib.flat_noDup tfree_litss
quigley@16767
   100
        (* tfree clause is different in tptp and dfg versions *)
paulson@15608
   101
	val tfree_clss = map ResClause.tfree_clause tfree_lits 
wenzelm@16259
   102
        val hypsfile = File.platform_path hyps_file
wenzelm@16802
   103
        val out = TextIO.openOut(hypsfile)
paulson@15608
   104
    in
paulson@16904
   105
        ResLib.writeln_strs out (tfree_clss @ tptp_clss);
paulson@16904
   106
        TextIO.closeOut out; debug hypsfile;
paulson@16904
   107
        tfree_lits
paulson@15608
   108
    end;
paulson@15347
   109
quigley@15644
   110
quigley@15644
   111
(*********************************************************************)
quigley@15644
   112
(* write out a subgoal as tptp clauses to the file "probN"           *)
quigley@15644
   113
(* where N is the number of this subgoal                             *)
quigley@15644
   114
(*********************************************************************)
quigley@15644
   115
wenzelm@16802
   116
fun tptp_inputs_tfrees thms n tfrees =
wenzelm@16802
   117
    let
paulson@16904
   118
      val _ = debug ("in tptp_inputs_tfrees 0")
wenzelm@16802
   119
      val clss = map (ResClause.make_conjecture_clause_thm) thms
paulson@16904
   120
      val _ = debug ("in tptp_inputs_tfrees 1")
wenzelm@16802
   121
      val (tptp_clss,tfree_litss) = ListPair.unzip (map ResClause.clause2tptp clss)
paulson@16904
   122
      val _ = debug ("in tptp_inputs_tfrees 2")
wenzelm@16802
   123
      val tfree_clss = map ResClause.tfree_clause ((ResLib.flat_noDup tfree_litss) \\ tfrees)
paulson@16904
   124
      val _ = debug ("in tptp_inputs_tfrees 3")
wenzelm@16802
   125
      val probfile = File.platform_path prob_file ^ "_" ^ string_of_int n
wenzelm@16802
   126
      val out = TextIO.openOut(probfile)
paulson@15608
   127
    in
wenzelm@16802
   128
      ResLib.writeln_strs out (tfree_clss @ tptp_clss);
wenzelm@16802
   129
      TextIO.closeOut out;
paulson@16904
   130
      debug probfile
paulson@15608
   131
    end;
paulson@15452
   132
paulson@15608
   133
quigley@16767
   134
(*********************************************************************)
quigley@16767
   135
(* write out a subgoal as DFG clauses to the file "probN"           *)
quigley@16767
   136
(* where N is the number of this subgoal                             *)
quigley@16767
   137
(*********************************************************************)
quigley@16767
   138
(*
quigley@16767
   139
fun dfg_inputs_tfrees thms n tfrees = 
paulson@16904
   140
    let val _ = (debug ("in dfg_inputs_tfrees 0"))
quigley@16767
   141
        val clss = map (ResClause.make_conjecture_clause_thm) thms
paulson@16904
   142
         val _ = (debug ("in dfg_inputs_tfrees 1"))
quigley@16767
   143
	val (dfg_clss,tfree_litss) = ListPair.unzip (map ResClause.clause2dfg clss)
paulson@16904
   144
        val _ = (debug ("in dfg_inputs_tfrees 2"))
quigley@16767
   145
	val tfree_clss = map ResClause.tfree_clause ((ResLib.flat_noDup tfree_litss) \\ tfrees) 
paulson@16904
   146
         val _ = (debug ("in dfg_inputs_tfrees 3"))
quigley@16767
   147
        val probfile = (File.platform_path prob_file) ^ "_" ^ (string_of_int n)
quigley@16767
   148
	val out = TextIO.openOut(probfile)
quigley@16767
   149
    in
paulson@16904
   150
	(ResLib.writeln_strs out (tfree_clss @ dfg_clss); TextIO.closeOut out; debug probfile
quigley@16767
   151
    end;*)
quigley@16357
   152
quigley@15644
   153
(*********************************************************************)
quigley@15644
   154
(* call SPASS with settings and problem file for the current subgoal *)
quigley@15644
   155
(* should be modified to allow other provers to be called            *)
quigley@15644
   156
(*********************************************************************)
quigley@16357
   157
(* now passing in list of skolemized thms and list of sgterms to go with them *)
wenzelm@16802
   158
fun call_resolve_tac  (thms: thm list list)  sign (sg_terms:  term list) (childin, childout,pid) n  =
wenzelm@16802
   159
  let
wenzelm@16802
   160
    val axfile = (File.platform_path axiom_file)
quigley@16520
   161
quigley@16520
   162
    val hypsfile = (File.platform_path hyps_file)
wenzelm@16802
   163
    val clasimpfile = (File.platform_path clasimp_file)
quigley@16520
   164
wenzelm@16802
   165
    fun make_atp_list [] sign n = []
paulson@16897
   166
      | make_atp_list ((sko_thm, sg_term)::xs) sign n =
wenzelm@16802
   167
          let
paulson@16897
   168
            val thmstr = proofstring (Meson.concat_with_and (map string_of_thm sko_thm))
paulson@16904
   169
            val _ = debug ("thmstring in make_atp_lists is " ^ thmstr)
paulson@15608
   170
paulson@16897
   171
            val goalstring = proofstring (Sign.string_of_term sign sg_term)
paulson@16904
   172
            val _ = debug ("goalstring in make_atp_lists is " ^ goalstring)
quigley@16357
   173
paulson@16897
   174
            val probfile = File.platform_path prob_file ^ "_" ^ (string_of_int n)
paulson@16904
   175
            val _ = debug ("prob file in call_resolve_tac is " ^ probfile)
wenzelm@16802
   176
          in
wenzelm@16802
   177
            if !SpassComm.spass
wenzelm@16802
   178
            then
paulson@16897
   179
              let val optionline = (*Custom SPASS options, or default?*)
paulson@16897
   180
		      if !full_spass (*Auto mode: all SPASS inference rules*)
paulson@16897
   181
                      then "-DocProof%-TimeLimit=60%-SOS"
paulson@16897
   182
                      else "-" ^ space_implode "%-" (!custom_spass)
paulson@16904
   183
                  val _ = debug ("SPASS option string is " ^ optionline)
paulson@16897
   184
                  val _ = ResLib.helper_path "SPASS_HOME" "SPASS"
paulson@16897
   185
                    (*We've checked that SPASS is there for ATP/spassshell to run.*)
paulson@16897
   186
              in 
paulson@16897
   187
                  ([("spass", thmstr, goalstring,
paulson@16897
   188
                     getenv "ISABELLE_HOME" ^ "/src/HOL/Tools/ATP/spassshell",
paulson@16897
   189
                     optionline, clasimpfile, axfile, hypsfile, probfile)] @ 
paulson@16897
   190
                  (make_atp_list xs sign (n+1)))
wenzelm@16802
   191
              end
wenzelm@16802
   192
            else
wenzelm@16802
   193
              let val vampire = ResLib.helper_path "VAMPIRE_HOME" "vkernel"
wenzelm@16802
   194
              in
wenzelm@16802
   195
                ([("vampire", thmstr, goalstring, vampire, "-t 60%-m 100000",
wenzelm@16802
   196
                   clasimpfile, axfile, hypsfile, probfile)] @
wenzelm@16802
   197
                 (make_atp_list xs sign (n+1)))
wenzelm@16802
   198
              end
wenzelm@16802
   199
          end
paulson@15452
   200
paulson@16897
   201
    val atp_list = make_atp_list (ListPair.zip (thms, sg_terms)) sign 1
wenzelm@16802
   202
  in
wenzelm@16802
   203
    Watcher.callResProvers(childout,atp_list);
paulson@16904
   204
    debug "Sent commands to watcher!";
wenzelm@16802
   205
    dummy_tac
wenzelm@16802
   206
  end
quigley@16357
   207
quigley@15644
   208
(**********************************************************)
quigley@15644
   209
(* write out the current subgoal as a tptp file, probN,   *)
quigley@15644
   210
(* then call dummy_tac - should be call_res_tac           *)
quigley@15644
   211
(**********************************************************)
quigley@15679
   212
wenzelm@16802
   213
fun get_sko_thms tfrees sign sg_terms (childin, childout, pid) thm n sko_thms =
wenzelm@16802
   214
  if n = 0 then
wenzelm@16802
   215
    (call_resolve_tac (rev sko_thms)
wenzelm@16802
   216
      sign sg_terms (childin, childout, pid) (List.length sg_terms);
wenzelm@16802
   217
     dummy_tac thm)
wenzelm@16802
   218
  else
wenzelm@16802
   219
    SELECT_GOAL
wenzelm@16802
   220
      (EVERY1 [rtac ccontr, atomize_tac, skolemize_tac,
wenzelm@16802
   221
        METAHYPS (fn negs =>
wenzelm@16802
   222
          (tptp_inputs_tfrees (make_clauses negs) n tfrees;
wenzelm@16802
   223
           get_sko_thms tfrees sign sg_terms (childin, childout, pid) thm (n - 1)
wenzelm@16802
   224
             (negs::sko_thms); dummy_tac))]) n thm;
quigley@15644
   225
quigley@15644
   226
quigley@15644
   227
(**********************************************)
quigley@15644
   228
(* recursively call atp_tac_g on all subgoals *)
quigley@15644
   229
(* sg_term is the nth subgoal as a term - used*)
quigley@15644
   230
(* in proof reconstruction                    *)
quigley@15644
   231
(**********************************************)
quigley@15644
   232
wenzelm@16802
   233
fun isar_atp_goal' thm n tfree_lits (childin, childout, pid) =
wenzelm@16802
   234
  let
wenzelm@16802
   235
    val prems = Thm.prems_of thm
wenzelm@16802
   236
    (*val sg_term = get_nth k prems*)
wenzelm@16802
   237
    val sign = sign_of_thm thm
wenzelm@16802
   238
    val thmstring = string_of_thm thm
wenzelm@16802
   239
  in
paulson@16904
   240
    debug("in isar_atp_goal'");
paulson@16904
   241
    debug("thmstring in isar_atp_goal': " ^ thmstring);
wenzelm@16802
   242
    (* go and call callResProvers with this subgoal *)
wenzelm@16802
   243
    (* isar_atp_g tfree_lits  sg_term (childin, childout, pid) k thm; *)
wenzelm@16802
   244
    (* recursive call to pick up the remaining subgoals *)
wenzelm@16802
   245
    (* isar_atp_goal' thm (k+1) n tfree_lits  (childin, childout, pid) *)
wenzelm@16802
   246
    get_sko_thms tfree_lits sign prems (childin, childout, pid) thm n []
wenzelm@16802
   247
  end;
quigley@16520
   248
quigley@15644
   249
quigley@15644
   250
(**************************************************)
quigley@15644
   251
(* convert clauses from "assume" to conjecture.   *)
quigley@15644
   252
(* i.e. apply make_clauses and then get tptp for  *)
quigley@15679
   253
(* any hypotheses in the goal produced by assume  *)
quigley@15679
   254
(* statements;                                    *)
quigley@15644
   255
(* write to file "hyps"                           *)
quigley@15644
   256
(**************************************************)
quigley@15644
   257
wenzelm@16802
   258
fun isar_atp_aux thms thm n_subgoals  (childin, childout, pid) =
wenzelm@16802
   259
  let val tfree_lits = isar_atp_h thms
wenzelm@16802
   260
  in
paulson@16904
   261
    debug ("in isar_atp_aux");
wenzelm@16802
   262
    isar_atp_goal' thm n_subgoals tfree_lits (childin, childout, pid)
wenzelm@16802
   263
  end;
quigley@15644
   264
quigley@15644
   265
(******************************************************************)
quigley@15644
   266
(* called in Isar automatically                                   *)
quigley@15644
   267
(* writes out the current clasimpset to a tptp file               *)
quigley@15644
   268
(* passes all subgoals on to isar_atp_aux for further processing  *)
quigley@15644
   269
(* turns off xsymbol at start of function, restoring it at end    *)
quigley@15644
   270
(******************************************************************)
quigley@15779
   271
(*FIX changed to clasimp_file *)
wenzelm@16802
   272
val isar_atp' = setmp print_mode [] (fn (ctxt, thms, thm) =>
wenzelm@16802
   273
  if Thm.no_prems thm then ()
wenzelm@16802
   274
  else
wenzelm@16802
   275
    let
paulson@16904
   276
      val _= debug ("in isar_atp'")
wenzelm@16802
   277
      val thy = ProofContext.theory_of ctxt
wenzelm@16802
   278
      val prems = Thm.prems_of thm
wenzelm@16802
   279
      val thms_string = Meson.concat_with_and (map string_of_thm thms)
wenzelm@16802
   280
      val thm_string = string_of_thm thm
wenzelm@16802
   281
      val prems_string = Meson.concat_with_and (map (Sign.string_of_term thy) prems)
wenzelm@16802
   282
wenzelm@16802
   283
      (*set up variables for writing out the clasimps to a tptp file*)
wenzelm@16802
   284
      val (clause_arr, num_of_clauses) =
wenzelm@16802
   285
        ResClasimp.write_out_clasimp (File.platform_path clasimp_file) thy
wenzelm@16802
   286
          (hd prems) (*FIXME: hack!! need to do all prems*)
paulson@16904
   287
      val _ = debug ("clasimp_file is " ^ File.platform_path clasimp_file)
wenzelm@16802
   288
      val (childin, childout, pid) = Watcher.createWatcher (thm, clause_arr, num_of_clauses)
wenzelm@16802
   289
      val pid_string =
wenzelm@16802
   290
        string_of_int (Word.toInt (Word.fromLargeWord (Posix.Process.pidToWord pid)))
paulson@15608
   291
    in
paulson@16904
   292
      debug ("initial thms: " ^ thms_string);
paulson@16904
   293
      debug ("initial thm: " ^ thm_string);
paulson@16904
   294
      debug ("subgoals: " ^ prems_string);
paulson@16904
   295
      debug ("pid: "^ pid_string);
wenzelm@16802
   296
      isar_atp_aux thms thm (length prems) (childin, childout, pid);
wenzelm@16802
   297
      ()
wenzelm@16802
   298
    end);
paulson@15608
   299
paulson@15452
   300
paulson@15608
   301
fun get_thms_cs claset =
wenzelm@16802
   302
  let val {safeEs, safeIs, hazEs, hazIs, ...} = rep_cs claset
wenzelm@16802
   303
  in safeEs @ safeIs @ hazEs @ hazIs end;
quigley@16357
   304
paulson@15608
   305
fun append_name name [] _ = []
wenzelm@16802
   306
  | append_name name (thm :: thms) k =
wenzelm@16802
   307
      Thm.name_thm ((name ^ "_" ^ string_of_int k), thm) :: append_name name thms (k + 1);
paulson@15608
   308
wenzelm@16802
   309
fun append_names (name :: names) (thms :: thmss) =
wenzelm@16802
   310
  append_name name thms 0 :: append_names names thmss;
quigley@16357
   311
paulson@15608
   312
fun get_thms_ss [] = []
paulson@15608
   313
  | get_thms_ss thms =
wenzelm@16802
   314
      let
wenzelm@16802
   315
        val names = map Thm.name_of_thm thms
paulson@15608
   316
        val thms' = map (mksimps mksimps_pairs) thms
paulson@15608
   317
        val thms'' = append_names names thms'
wenzelm@16802
   318
      in
wenzelm@16802
   319
        ResLib.flat_noDup thms''
wenzelm@16802
   320
      end;
paulson@15608
   321
paulson@15452
   322
paulson@15608
   323
(* convert locally declared rules to axiom clauses *)
paulson@15608
   324
wenzelm@16802
   325
fun subtract_simpset thy ctxt =
wenzelm@16802
   326
  let
wenzelm@16802
   327
    val rules1 = #rules (#1 (rep_ss (simpset_of thy)));
wenzelm@16802
   328
    val rules2 = #rules (#1 (rep_ss (local_simpset_of ctxt)));
wenzelm@16802
   329
  in map #thm (Net.subtract MetaSimplifier.eq_rrule rules1 rules2) end;
quigley@15679
   330
wenzelm@16802
   331
fun subtract_claset thy ctxt =
wenzelm@16802
   332
  let
wenzelm@16802
   333
    val (netI1, netE1) = #xtra_netpair (rep_cs (claset_of thy));
wenzelm@16802
   334
    val (netI2, netE2) = #xtra_netpair (rep_cs (local_claset_of ctxt));
wenzelm@16802
   335
    val subtract = map (#2 o #2) oo Net.subtract Tactic.eq_kbrl;
wenzelm@16802
   336
  in subtract netI1 netI2 @ subtract netE1 netE2 end;
paulson@15608
   337
paulson@15608
   338
quigley@16357
   339
wenzelm@16802
   340
(** the Isar toplevel hook **)
wenzelm@16802
   341
paulson@17091
   342
val invoke_atp = Toplevel.unknown_proof o Toplevel.keep (fn state =>
wenzelm@16802
   343
  let
paulson@17091
   344
    val proof = Toplevel.proof_of state
paulson@17091
   345
    val (ctxt, (_, goal)) = Proof.get_goal proof
paulson@17091
   346
        handle Proof.STATE _ => error "No goal present";
wenzelm@16802
   347
    val thy = ProofContext.theory_of ctxt;
wenzelm@16802
   348
wenzelm@16802
   349
    (* FIXME presently unused *)
wenzelm@16802
   350
    val ss_thms = subtract_simpset thy ctxt;
wenzelm@16802
   351
    val cs_thms = subtract_claset thy ctxt;
wenzelm@16802
   352
  in
paulson@17091
   353
    debug ("initial thm in isar_atp: " ^ 
paulson@17091
   354
           Pretty.string_of (ProofContext.pretty_thm ctxt goal));
paulson@17091
   355
    debug ("subgoals in isar_atp: " ^ 
paulson@17091
   356
           Pretty.string_of (ProofContext.pretty_term ctxt
paulson@17091
   357
             (Logic.mk_conjunction_list (Thm.prems_of goal))));
paulson@16904
   358
    debug ("number of subgoals in isar_atp: " ^ string_of_int (Thm.nprems_of goal));
paulson@16925
   359
    ResClause.init thy;
wenzelm@16802
   360
    isar_atp' (ctxt, ProofContext.prems_of ctxt, goal)
wenzelm@16802
   361
  end);
quigley@16357
   362
paulson@17091
   363
val call_atpP =
paulson@17091
   364
  OuterSyntax.improper_command 
paulson@17091
   365
    "ProofGeneral.call_atp" 
paulson@17091
   366
    "call automatic theorem provers" 
paulson@17091
   367
    OuterKeyword.diag
paulson@17091
   368
    (Scan.succeed (Toplevel.no_timing o invoke_atp));
paulson@17091
   369
paulson@17091
   370
val _ = OuterSyntax.add_parsers [call_atpP];
paulson@17091
   371
paulson@15347
   372
end;