src/HOL/Tools/ATP_Manager/atp_wrapper.ML
author blanchet
Fri Apr 23 13:16:50 2010 +0200 (2010-04-23)
changeset 36369 d2cd0d04b8e6
parent 36289 f75b6a3e1450
child 36370 a4f601daa175
permissions -rw-r--r--
handle ATP proof delimiters in a cleaner, more extensible fashion
wenzelm@32327
     1
(*  Title:      HOL/Tools/ATP_Manager/atp_wrapper.ML
wenzelm@28592
     2
    Author:     Fabian Immler, TU Muenchen
wenzelm@28592
     3
wenzelm@28592
     4
Wrapper functions for external ATPs.
wenzelm@28592
     5
*)
wenzelm@28592
     6
wenzelm@28592
     7
signature ATP_WRAPPER =
wenzelm@28592
     8
sig
blanchet@35867
     9
  type prover = ATP_Manager.prover
boehmes@32864
    10
blanchet@35867
    11
  (* hooks for problem files *)
blanchet@35867
    12
  val destdir : string Config.T
blanchet@35867
    13
  val problem_prefix : string Config.T
blanchet@35867
    14
  val measure_runtime : bool Config.T
boehmes@32864
    15
blanchet@35867
    16
  val refresh_systems_on_tptp : unit -> unit
blanchet@35867
    17
  val setup : theory -> theory
wenzelm@28592
    18
end;
wenzelm@28592
    19
blanchet@35865
    20
structure ATP_Wrapper : ATP_WRAPPER =
wenzelm@28592
    21
struct
wenzelm@28596
    22
blanchet@36187
    23
open Sledgehammer_Util
blanchet@35969
    24
open Sledgehammer_Fact_Preprocessor
blanchet@35865
    25
open Sledgehammer_HOL_Clause
blanchet@35865
    26
open Sledgehammer_Fact_Filter
blanchet@35865
    27
open Sledgehammer_Proof_Reconstruct
blanchet@35867
    28
open ATP_Manager
blanchet@35826
    29
wenzelm@28596
    30
(** generic ATP wrapper **)
wenzelm@28596
    31
wenzelm@32944
    32
(* external problem files *)
boehmes@32864
    33
wenzelm@36001
    34
val (destdir, destdir_setup) = Attrib.config_string "atp_destdir" (K "");
boehmes@32864
    35
  (*Empty string means create files in Isabelle's temporary files directory.*)
boehmes@32864
    36
boehmes@32864
    37
val (problem_prefix, problem_prefix_setup) =
wenzelm@36001
    38
  Attrib.config_string "atp_problem_prefix" (K "prob");
boehmes@32864
    39
boehmes@33247
    40
val (measure_runtime, measure_runtime_setup) =
wenzelm@36001
    41
  Attrib.config_bool "atp_measure_runtime" (K false);
boehmes@33247
    42
boehmes@32864
    43
blanchet@35867
    44
(* prover configuration *)
boehmes@32864
    45
blanchet@36289
    46
val remotify = prefix "remote_"
blanchet@36289
    47
wenzelm@32941
    48
type prover_config =
blanchet@36289
    49
 {home: string,
blanchet@36289
    50
  executable: string,
blanchet@35969
    51
  arguments: Time.time -> string,
blanchet@36369
    52
  proof_delims: (string * string) list,
blanchet@36265
    53
  known_failures: (string list * string) list,
boehmes@32864
    54
  max_new_clauses: int,
blanchet@36289
    55
  prefers_theory_relevant: bool};
wenzelm@28596
    56
wenzelm@28596
    57
wenzelm@28596
    58
(* basic template *)
wenzelm@28596
    59
boehmes@32458
    60
fun with_path cleanup after f path =
boehmes@32458
    61
  Exn.capture f path
boehmes@32458
    62
  |> tap (fn _ => cleanup path)
boehmes@32458
    63
  |> Exn.release
blanchet@36369
    64
  |> tap (after path)
blanchet@36369
    65
blanchet@36369
    66
(* Splits by the first possible of a list of delimiters. *)
blanchet@36369
    67
fun extract_proof delims output =
blanchet@36369
    68
  case pairself (find_first (fn s => String.isSubstring s output))
blanchet@36369
    69
                (ListPair.unzip delims) of
blanchet@36369
    70
    (SOME begin_delim, SOME end_delim) =>
blanchet@36369
    71
    output |> first_field begin_delim |> the |> snd
blanchet@36369
    72
           |> first_field end_delim |> the |> fst
blanchet@36369
    73
  | _ => ""
boehmes@32458
    74
blanchet@36369
    75
fun extract_proof_or_failure proof_delims known_failures output =
blanchet@36369
    76
  case map_filter
blanchet@36369
    77
           (fn (patterns, message) =>
blanchet@36369
    78
               if exists (fn p => String.isSubstring p output) patterns then
blanchet@36369
    79
                 SOME message
blanchet@36369
    80
               else
blanchet@36369
    81
                 NONE) known_failures of
blanchet@36369
    82
    [] => (case extract_proof proof_delims output of
blanchet@36369
    83
             "" => ("", "Error: The ATP output is malformed.")
blanchet@36369
    84
           | proof => (proof, ""))
blanchet@36369
    85
  | (message :: _) => ("", message)
blanchet@35865
    86
blanchet@36289
    87
fun generic_prover overlord get_facts prepare write_file home executable args
blanchet@36369
    88
        proof_delims known_failures name
blanchet@36287
    89
        ({debug, full_types, explicit_apply, isar_proof, modulus, sorts, ...}
blanchet@36287
    90
         : params) minimize_command
blanchet@35969
    91
        ({subgoal, goal, relevance_override, axiom_clauses, filtered_clauses}
blanchet@35969
    92
         : problem) =
wenzelm@28596
    93
  let
immler@31750
    94
    (* get clauses and prepare them for writing *)
wenzelm@32942
    95
    val (ctxt, (chain_ths, th)) = goal;
wenzelm@32942
    96
    val thy = ProofContext.theory_of ctxt;
blanchet@35865
    97
    val chain_ths = map (Thm.put_name_hint chained_hint) chain_ths;
blanchet@35969
    98
    val goal_cls = #1 (neg_conjecture_clauses ctxt th subgoal);
immler@31752
    99
    val the_filtered_clauses =
wenzelm@32942
   100
      (case filtered_clauses of
blanchet@35969
   101
        NONE => get_facts relevance_override goal goal_cls
wenzelm@32942
   102
      | SOME fcls => fcls);
immler@31409
   103
    val the_axiom_clauses =
wenzelm@32942
   104
      (case axiom_clauses of
wenzelm@32942
   105
        NONE => the_filtered_clauses
wenzelm@32942
   106
      | SOME axcls => axcls);
blanchet@35969
   107
    val (internal_thm_names, clauses) =
wenzelm@32942
   108
      prepare goal_cls chain_ths the_axiom_clauses the_filtered_clauses thy;
immler@31750
   109
boehmes@32864
   110
    (* path to unique problem file *)
blanchet@36143
   111
    val destdir' = if overlord then getenv "ISABELLE_HOME_USER"
blanchet@36143
   112
                   else Config.get ctxt destdir;
wenzelm@32942
   113
    val problem_prefix' = Config.get ctxt problem_prefix;
boehmes@32864
   114
    fun prob_pathname nr =
blanchet@36143
   115
      let
blanchet@36143
   116
        val probfile =
blanchet@36143
   117
          Path.basic (problem_prefix' ^
blanchet@36143
   118
                      (if overlord then "_" ^ name else serial_string ())
blanchet@36143
   119
                      ^ "_" ^ string_of_int nr)
wenzelm@32942
   120
      in
wenzelm@32942
   121
        if destdir' = "" then File.tmp_path probfile
wenzelm@35570
   122
        else if File.exists (Path.explode destdir')
blanchet@36281
   123
        then Path.append (Path.explode destdir') probfile
blanchet@36169
   124
        else error ("No such directory: " ^ destdir' ^ ".")
wenzelm@32942
   125
      end;
boehmes@32864
   126
blanchet@36289
   127
    val command = Path.explode (home ^ "/" ^ executable)
immler@31750
   128
    (* write out problem file and call prover *)
blanchet@36289
   129
    fun command_line probfile =
blanchet@36284
   130
      (if Config.get ctxt measure_runtime then
blanchet@36289
   131
         "TIMEFORMAT='%3U'; { time " ^
blanchet@36289
   132
         space_implode " " [File.shell_path command, args,
blanchet@36289
   133
                            File.shell_path probfile] ^ " ; } 2>&1"
blanchet@36284
   134
       else
blanchet@36289
   135
         space_implode " " ["exec", File.shell_path command, args,
blanchet@36289
   136
                            File.shell_path probfile, "2>&1"]) ^
blanchet@36284
   137
      (if overlord then
blanchet@36286
   138
         " | sed 's/,/, /g' \
blanchet@36286
   139
         \| sed 's/\\([^!=]\\)\\([=|]\\)\\([^=]\\)/\\1 \\2 \\3/g' \
blanchet@36286
   140
         \| sed 's/! =/ !=/g' \
blanchet@36286
   141
         \| sed 's/  / /g' | sed 's/| |/||/g' \
blanchet@36286
   142
         \| sed 's/ = = =/===/g' \
blanchet@36286
   143
         \| sed 's/= = /== /g'"
blanchet@36284
   144
       else
blanchet@36284
   145
         "")
boehmes@32510
   146
    fun split_time s =
boehmes@32510
   147
      let
wenzelm@32942
   148
        val split = String.tokens (fn c => str c = "\n");
blanchet@36369
   149
        val (output, t) = s |> split |> split_last |> apfst cat_lines;
wenzelm@32942
   150
        fun as_num f = f >> (fst o read_int);
wenzelm@32942
   151
        val num = as_num (Scan.many1 Symbol.is_ascii_digit);
wenzelm@32942
   152
        val digit = Scan.one Symbol.is_ascii_digit;
wenzelm@32942
   153
        val num3 = as_num (digit ::: digit ::: (digit >> single));
wenzelm@32942
   154
        val time = num --| Scan.$$ "." -- num3 >> (fn (a, b) => a * 1000 + b);
wenzelm@32942
   155
        val as_time = the_default 0 o Scan.read Symbol.stopper time o explode;
blanchet@36369
   156
      in (output, as_time t) end;
boehmes@33247
   157
    fun split_time' s =
boehmes@33247
   158
      if Config.get ctxt measure_runtime then split_time s else (s, 0)
boehmes@32458
   159
    fun run_on probfile =
blanchet@36289
   160
      if File.exists command then
blanchet@36235
   161
        write_file full_types explicit_apply probfile clauses
blanchet@36289
   162
        |> pair (apfst split_time' (bash_output (command_line probfile)))
blanchet@36289
   163
      else error ("Bad executable: " ^ Path.implode command ^ ".");
wenzelm@28592
   164
blanchet@36167
   165
    (* If the problem file has not been exported, remove it; otherwise, export
blanchet@36167
   166
       the proof file too. *)
wenzelm@32942
   167
    fun cleanup probfile = if destdir' = "" then try File.rm probfile else NONE;
blanchet@36369
   168
    fun export probfile (((output, _), _), _) =
blanchet@36187
   169
      if destdir' = "" then
blanchet@36187
   170
        ()
blanchet@36187
   171
      else
blanchet@36187
   172
        File.write (Path.explode (Path.implode probfile ^ "_proof"))
blanchet@36282
   173
                   ((if overlord then
blanchet@36289
   174
                       "% " ^ command_line probfile ^ "\n% " ^ timestamp () ^
blanchet@36289
   175
                       "\n"
blanchet@36282
   176
                     else
blanchet@36369
   177
                        "") ^ output)
wenzelm@32257
   178
blanchet@36369
   179
    val (((output, atp_run_time_in_msecs), rc), _) =
wenzelm@35570
   180
      with_path cleanup export run_on (prob_pathname subgoal);
boehmes@32458
   181
blanchet@36167
   182
    (* Check for success and print out some information on failure. *)
blanchet@36369
   183
    val (proof, failure) =
blanchet@36369
   184
      extract_proof_or_failure proof_delims known_failures output
blanchet@36369
   185
    val success = (rc = 0 andalso failure = "")
blanchet@35969
   186
    val (message, relevant_thm_names) =
blanchet@36265
   187
      if success then
blanchet@36289
   188
        proof_text isar_proof debug modulus sorts ctxt
blanchet@36287
   189
                   (minimize_command, proof, internal_thm_names, th, subgoal)
blanchet@36265
   190
      else if failure <> "" then
blanchet@36284
   191
        (failure ^ "\n", [])
blanchet@36265
   192
      else
blanchet@36369
   193
        ("Unknown ATP error: " ^ output ^ ".\n", [])
boehmes@32864
   194
  in
blanchet@36231
   195
    {success = success, message = message,
blanchet@35969
   196
     relevant_thm_names = relevant_thm_names,
blanchet@36369
   197
     atp_run_time_in_msecs = atp_run_time_in_msecs, output = output,
blanchet@36369
   198
     proof = proof, internal_thm_names = internal_thm_names,
blanchet@35969
   199
     filtered_clauses = the_filtered_clauses}
wenzelm@32942
   200
  end;
wenzelm@28592
   201
wenzelm@28596
   202
wenzelm@28596
   203
(* generic TPTP-based provers *)
wenzelm@28596
   204
blanchet@35865
   205
fun generic_tptp_prover
blanchet@36369
   206
        (name, {home, executable, arguments, proof_delims, known_failures,
blanchet@36369
   207
                max_new_clauses, prefers_theory_relevant})
blanchet@36264
   208
        (params as {debug, overlord, respect_no_atp, relevance_threshold,
blanchet@36264
   209
                    convergence, theory_relevant, higher_order, follow_defs,
blanchet@36287
   210
                    isar_proof, ...})
blanchet@36281
   211
        minimize_command timeout =
blanchet@36143
   212
  generic_prover overlord
blanchet@36058
   213
      (get_relevant_facts respect_no_atp relevance_threshold convergence
blanchet@36058
   214
                          higher_order follow_defs max_new_clauses
blanchet@36220
   215
                          (the_default prefers_theory_relevant theory_relevant))
blanchet@36222
   216
      (prepare_clauses higher_order false)
blanchet@36289
   217
      (write_tptp_file (debug andalso overlord andalso not isar_proof)) home
blanchet@36369
   218
      executable (arguments timeout) proof_delims known_failures name params
blanchet@36369
   219
      minimize_command
wenzelm@28596
   220
blanchet@35969
   221
fun tptp_prover name p = (name, generic_tptp_prover (name, p));
wenzelm@28596
   222
wenzelm@32941
   223
boehmes@32864
   224
(** common provers **)
wenzelm@28592
   225
blanchet@36142
   226
fun generous_to_secs time = (Time.toMilliseconds time + 999) div 1000
blanchet@36142
   227
wenzelm@28596
   228
(* Vampire *)
wenzelm@28596
   229
blanchet@36289
   230
(* Vampire requires an explicit time limit. *)
wenzelm@28596
   231
blanchet@35969
   232
val vampire_config : prover_config =
blanchet@36289
   233
  {home = getenv "VAMPIRE_HOME",
blanchet@36289
   234
   executable = "vampire",
blanchet@35969
   235
   arguments = (fn timeout => "--output_syntax tptp --mode casc -t " ^
blanchet@36142
   236
                              string_of_int (generous_to_secs timeout)),
blanchet@36369
   237
   proof_delims = [("=========== Refutation ==========",
blanchet@36369
   238
                    "======= End of refutation =======")],
blanchet@36265
   239
   known_failures =
blanchet@36265
   240
     [(["Satisfiability detected", "CANNOT PROVE"],
blanchet@36265
   241
       "The ATP problem is unprovable."),
blanchet@36265
   242
      (["Refutation not found"],
blanchet@36265
   243
       "The ATP failed to determine the problem's status.")],
blanchet@35969
   244
   max_new_clauses = 60,
blanchet@36289
   245
   prefers_theory_relevant = false}
blanchet@35969
   246
val vampire = tptp_prover "vampire" vampire_config
wenzelm@28596
   247
wenzelm@28592
   248
wenzelm@28596
   249
(* E prover *)
wenzelm@28596
   250
blanchet@36369
   251
val tstp_proof_delims =
blanchet@36369
   252
  ("# SZS output start CNFRefutation.", "# SZS output end CNFRefutation")
blanchet@36369
   253
blanchet@35969
   254
val e_config : prover_config =
blanchet@36289
   255
  {home = getenv "E_HOME",
blanchet@36289
   256
   executable = "eproof",
blanchet@35969
   257
   arguments = (fn timeout => "--tstp-in --tstp-out -l5 -xAutoDev \
blanchet@35969
   258
                              \-tAutoDev --silent --cpu-limit=" ^
blanchet@36142
   259
                              string_of_int (generous_to_secs timeout)),
blanchet@36369
   260
   proof_delims = [tstp_proof_delims],
blanchet@36265
   261
   known_failures =
blanchet@36265
   262
       [(["SZS status: Satisfiable", "SZS status Satisfiable"],
blanchet@36265
   263
         "The ATP problem is unprovable."),
blanchet@36265
   264
        (["SZS status: ResourceOut", "SZS status ResourceOut"],
blanchet@36265
   265
         "The ATP ran out of resources."),
blanchet@36265
   266
        (["# Cannot determine problem status"],
blanchet@36265
   267
         "The ATP failed to determine the problem's status.")],
blanchet@35969
   268
   max_new_clauses = 100,
blanchet@36289
   269
   prefers_theory_relevant = false}
blanchet@35969
   270
val e = tptp_prover "e" e_config
wenzelm@28596
   271
wenzelm@28596
   272
wenzelm@28596
   273
(* SPASS *)
wenzelm@28592
   274
blanchet@35865
   275
fun generic_dfg_prover
blanchet@36369
   276
        (name, {home, executable, arguments, proof_delims, known_failures,
blanchet@36369
   277
                max_new_clauses, prefers_theory_relevant})
blanchet@36143
   278
        (params as {overlord, respect_no_atp, relevance_threshold, convergence,
blanchet@36220
   279
                    theory_relevant, higher_order, follow_defs, ...})
blanchet@36281
   280
        minimize_command timeout =
blanchet@36143
   281
  generic_prover overlord
blanchet@36058
   282
      (get_relevant_facts respect_no_atp relevance_threshold convergence
blanchet@36058
   283
                          higher_order follow_defs max_new_clauses
blanchet@36220
   284
                          (the_default prefers_theory_relevant theory_relevant))
blanchet@36289
   285
      (prepare_clauses higher_order true) write_dfg_file home executable
blanchet@36369
   286
      (arguments timeout) proof_delims known_failures name params
blanchet@36369
   287
      minimize_command
boehmes@32869
   288
blanchet@36264
   289
fun dfg_prover name p = (name, generic_dfg_prover (name, p))
boehmes@32869
   290
blanchet@36219
   291
(* The "-VarWeight=3" option helps the higher-order problems, probably by
blanchet@36219
   292
   counteracting the presence of "hAPP". *)
blanchet@36059
   293
val spass_config : prover_config =
blanchet@36289
   294
  {home = getenv "SPASS_HOME",
blanchet@36289
   295
   executable = "SPASS",
blanchet@36289
   296
   arguments = (fn timeout => "-Auto -SOS=1 -PGiven=0 -PProblem=0 -Splits=0" ^
blanchet@36289
   297
     " -FullRed=0 -DocProof -VarWeight=3 -TimeLimit=" ^
blanchet@36289
   298
     string_of_int (generous_to_secs timeout)),
blanchet@36369
   299
   proof_delims = [("Here is a proof", "Formulae used in the proof")],
blanchet@36289
   300
   known_failures =
blanchet@36289
   301
     [(["SPASS beiseite: Completion found."], "The ATP problem is unprovable."),
blanchet@36289
   302
      (["SPASS beiseite: Ran out of time."], "The ATP timed out."),
blanchet@36289
   303
      (["SPASS beiseite: Maximal number of loops exceeded."],
blanchet@36289
   304
       "The ATP hit its loop limit.")],
blanchet@36289
   305
   max_new_clauses = 40,
blanchet@36289
   306
   prefers_theory_relevant = true}
blanchet@36264
   307
val spass = dfg_prover "spass" spass_config
blanchet@36264
   308
blanchet@36264
   309
(* SPASS 3.7 supports both the DFG and the TPTP syntax, whereas SPASS 3.0
blanchet@36264
   310
   supports only the DFG syntax. As soon as all Isabelle repository/snapshot
blanchet@36264
   311
   users have upgraded to 3.7, we can kill "spass" (and all DFG support in
blanchet@36264
   312
   Sledgehammer) and rename "spass_tptp" "spass". *)
blanchet@35969
   313
blanchet@36265
   314
(* FIXME: Change the error message below to point to the Isabelle download
blanchet@36265
   315
   page once the package is there (around the Isabelle2010 release). *)
blanchet@36265
   316
blanchet@36264
   317
val spass_tptp_config =
blanchet@36289
   318
  {home = #home spass_config,
blanchet@36289
   319
   executable = #executable spass_config,
blanchet@36264
   320
   arguments = prefix "-TPTP " o #arguments spass_config,
blanchet@36369
   321
   proof_delims = #proof_delims spass_config,
blanchet@36265
   322
   known_failures =
blanchet@36265
   323
     #known_failures spass_config @
blanchet@36265
   324
     [(["unrecognized option `-TPTP'", "Unrecognized option TPTP"],
blanchet@36265
   325
       "Warning: Sledgehammer requires a more recent version of SPASS with \
blanchet@36265
   326
       \support for the TPTP syntax. To install it, download and untar the \
blanchet@36265
   327
       \package \"http://isabelle.in.tum.de/~blanchet/spass-3.7.tgz\" and add \
blanchet@36265
   328
       \the \"spass-3.7\" directory's full path to \"" ^
blanchet@36265
   329
       Path.implode (Path.expand (Path.appends
blanchet@36265
   330
           (Path.variable "ISABELLE_HOME_USER" ::
blanchet@36265
   331
            map Path.basic ["etc", "components"]))) ^
blanchet@36265
   332
       "\" on a line of its own.")],
blanchet@36264
   333
   max_new_clauses = #max_new_clauses spass_config,
blanchet@36289
   334
   prefers_theory_relevant = #prefers_theory_relevant spass_config}
blanchet@36264
   335
val spass_tptp = tptp_prover "spass_tptp" spass_tptp_config
wenzelm@28596
   336
wenzelm@28596
   337
(* remote prover invocation via SystemOnTPTP *)
wenzelm@28596
   338
wenzelm@32942
   339
val systems = Synchronized.var "atp_wrapper_systems" ([]: string list);
immler@31835
   340
immler@31835
   341
fun get_systems () =
immler@31835
   342
  let
blanchet@35969
   343
    val (answer, rc) = bash_output "\"$ISABELLE_ATP_MANAGER/SystemOnTPTP\" -w"
immler@31835
   344
  in
blanchet@35969
   345
    if rc <> 0 then
blanchet@35969
   346
      error ("Failed to get available systems at SystemOnTPTP:\n" ^ answer)
blanchet@35969
   347
    else
blanchet@35969
   348
      split_lines answer
immler@31835
   349
  end;
immler@31835
   350
blanchet@35867
   351
fun refresh_systems_on_tptp () =
blanchet@35867
   352
  Synchronized.change systems (fn _ => get_systems ());
immler@31835
   353
immler@31835
   354
fun get_system prefix = Synchronized.change_result systems (fn systems =>
boehmes@32864
   355
  (if null systems then get_systems () else systems)
wenzelm@32942
   356
  |> `(find_first (String.isPrefix prefix)));
boehmes@32864
   357
wenzelm@32948
   358
fun the_system prefix =
boehmes@32864
   359
  (case get_system prefix of
blanchet@35826
   360
    NONE => error ("System " ^ quote prefix ^ " not available at SystemOnTPTP")
wenzelm@32942
   361
  | SOME sys => sys);
immler@31835
   362
blanchet@36265
   363
val remote_known_failures =
blanchet@36265
   364
  [(["Remote-script could not extract proof"],
blanchet@36265
   365
    "Error: The remote ATP proof is ill-formed.")]
blanchet@35865
   366
blanchet@36059
   367
fun remote_prover_config prover_prefix args
blanchet@36369
   368
        ({proof_delims, known_failures, max_new_clauses,
blanchet@36369
   369
          prefers_theory_relevant, ...} : prover_config) : prover_config =
blanchet@36289
   370
  {home = getenv "ISABELLE_ATP_MANAGER",
blanchet@36289
   371
   executable = "SystemOnTPTP",
blanchet@35969
   372
   arguments = (fn timeout =>
blanchet@36142
   373
     args ^ " -t " ^ string_of_int (generous_to_secs timeout) ^ " -s " ^
blanchet@35969
   374
     the_system prover_prefix),
blanchet@36369
   375
   proof_delims = insert (op =) tstp_proof_delims proof_delims,
blanchet@36265
   376
   known_failures = remote_known_failures @ known_failures,
blanchet@35969
   377
   max_new_clauses = max_new_clauses,
blanchet@36289
   378
   prefers_theory_relevant = prefers_theory_relevant}
wenzelm@28596
   379
blanchet@35969
   380
val remote_vampire =
blanchet@36289
   381
  tptp_prover (remotify (fst vampire))
blanchet@36059
   382
              (remote_prover_config "Vampire---9" "" vampire_config)
boehmes@32864
   383
blanchet@35969
   384
val remote_e =
blanchet@36289
   385
  tptp_prover (remotify (fst e))
blanchet@36289
   386
              (remote_prover_config "EP---" "" e_config)
boehmes@32864
   387
blanchet@35969
   388
val remote_spass =
blanchet@36289
   389
  tptp_prover (remotify (fst spass))
blanchet@36289
   390
              (remote_prover_config "SPASS---" "-x" spass_config)
wenzelm@28592
   391
blanchet@36289
   392
val provers =
blanchet@36289
   393
  [spass, spass_tptp, vampire, e, remote_vampire, remote_spass, remote_e]
blanchet@35867
   394
val prover_setup = fold add_prover provers
blanchet@35867
   395
blanchet@35867
   396
val setup =
blanchet@35867
   397
  destdir_setup
blanchet@35867
   398
  #> problem_prefix_setup
blanchet@35867
   399
  #> measure_runtime_setup
blanchet@35867
   400
  #> prover_setup;
blanchet@35867
   401
blanchet@36289
   402
fun maybe_remote (name, _) ({home, ...} : prover_config) =
blanchet@36289
   403
  name |> home = "" ? remotify
blanchet@36289
   404
blanchet@36289
   405
val _ = atps := ([maybe_remote e e_config, maybe_remote spass spass_config,
blanchet@36289
   406
                  remotify (fst vampire)] |> space_implode " ")
wenzelm@28592
   407
end;