src/HOL/Tools/ATP_Manager/atp_systems.ML
author blanchet
Tue Jun 22 23:54:02 2010 +0200 (2010-06-22)
changeset 37509 f39464d971c4
parent 37506 32a1ee39c49b
child 37514 b147d01b8ebc
permissions -rw-r--r--
factor out TPTP format output into file of its own, to facilitate further changes
blanchet@36376
     1
(*  Title:      HOL/Tools/ATP_Manager/atp_systems.ML
wenzelm@28592
     2
    Author:     Fabian Immler, TU Muenchen
blanchet@36371
     3
    Author:     Jasmin Blanchette, TU Muenchen
wenzelm@28592
     4
blanchet@36376
     5
Setup for supported ATPs.
wenzelm@28592
     6
*)
wenzelm@28592
     7
blanchet@36376
     8
signature ATP_SYSTEMS =
wenzelm@28592
     9
sig
blanchet@35867
    10
  type prover = ATP_Manager.prover
boehmes@32864
    11
blanchet@35867
    12
  (* hooks for problem files *)
blanchet@36376
    13
  val dest_dir : string Config.T
blanchet@35867
    14
  val problem_prefix : string Config.T
blanchet@35867
    15
  val measure_runtime : bool Config.T
boehmes@32864
    16
blanchet@35867
    17
  val refresh_systems_on_tptp : unit -> unit
blanchet@36371
    18
  val default_atps_param_value : unit -> string
blanchet@35867
    19
  val setup : theory -> theory
wenzelm@28592
    20
end;
wenzelm@28592
    21
blanchet@36376
    22
structure ATP_Systems : ATP_SYSTEMS =
wenzelm@28592
    23
struct
wenzelm@28596
    24
blanchet@36187
    25
open Sledgehammer_Util
blanchet@35969
    26
open Sledgehammer_Fact_Preprocessor
blanchet@35865
    27
open Sledgehammer_HOL_Clause
blanchet@35865
    28
open Sledgehammer_Fact_Filter
blanchet@35865
    29
open Sledgehammer_Proof_Reconstruct
blanchet@37509
    30
open Sledgehammer_TPTP_Format
blanchet@35867
    31
open ATP_Manager
blanchet@35826
    32
blanchet@36376
    33
(** generic ATP **)
wenzelm@28596
    34
wenzelm@32944
    35
(* external problem files *)
boehmes@32864
    36
blanchet@36376
    37
val (dest_dir, dest_dir_setup) = Attrib.config_string "atp_dest_dir" (K "");
boehmes@32864
    38
  (*Empty string means create files in Isabelle's temporary files directory.*)
boehmes@32864
    39
boehmes@32864
    40
val (problem_prefix, problem_prefix_setup) =
wenzelm@36001
    41
  Attrib.config_string "atp_problem_prefix" (K "prob");
boehmes@32864
    42
boehmes@33247
    43
val (measure_runtime, measure_runtime_setup) =
wenzelm@36001
    44
  Attrib.config_bool "atp_measure_runtime" (K false);
boehmes@33247
    45
boehmes@32864
    46
blanchet@35867
    47
(* prover configuration *)
boehmes@32864
    48
wenzelm@32941
    49
type prover_config =
blanchet@36917
    50
  {home_var: string,
blanchet@36370
    51
   executable: string,
blanchet@36370
    52
   arguments: Time.time -> string,
blanchet@36370
    53
   proof_delims: (string * string) list,
blanchet@36370
    54
   known_failures: (failure * string) list,
blanchet@36382
    55
   max_axiom_clauses: int,
blanchet@36370
    56
   prefers_theory_relevant: bool};
wenzelm@28596
    57
wenzelm@28596
    58
wenzelm@28596
    59
(* basic template *)
wenzelm@28596
    60
blanchet@36370
    61
val remotify = prefix "remote_"
blanchet@36370
    62
boehmes@32458
    63
fun with_path cleanup after f path =
boehmes@32458
    64
  Exn.capture f path
boehmes@32458
    65
  |> tap (fn _ => cleanup path)
boehmes@32458
    66
  |> Exn.release
blanchet@36369
    67
  |> tap (after path)
blanchet@36369
    68
blanchet@36369
    69
(* Splits by the first possible of a list of delimiters. *)
blanchet@36369
    70
fun extract_proof delims output =
blanchet@36369
    71
  case pairself (find_first (fn s => String.isSubstring s output))
blanchet@36369
    72
                (ListPair.unzip delims) of
blanchet@36369
    73
    (SOME begin_delim, SOME end_delim) =>
blanchet@36549
    74
    (output |> first_field begin_delim |> the |> snd
blanchet@36549
    75
            |> first_field end_delim |> the |> fst
blanchet@36549
    76
            |> first_field "\n" |> the |> snd
blanchet@36549
    77
     handle Option.Option => "")
blanchet@36369
    78
  | _ => ""
boehmes@32458
    79
blanchet@36370
    80
fun extract_proof_and_outcome res_code proof_delims known_failures output =
blanchet@36370
    81
  case map_filter (fn (failure, pattern) =>
blanchet@36370
    82
                      if String.isSubstring pattern output then SOME failure
blanchet@36370
    83
                      else NONE) known_failures of
blanchet@36369
    84
    [] => (case extract_proof proof_delims output of
blanchet@36370
    85
             "" => ("", SOME UnknownError)
blanchet@36370
    86
           | proof => if res_code = 0 then (proof, NONE)
blanchet@36370
    87
                      else ("", SOME UnknownError))
blanchet@36370
    88
  | (failure :: _) => ("", SOME failure)
blanchet@36370
    89
blanchet@36370
    90
fun string_for_failure Unprovable = "The ATP problem is unprovable."
blanchet@37413
    91
  | string_for_failure IncompleteUnprovable =
blanchet@37413
    92
    "The ATP cannot prove the problem."
blanchet@36370
    93
  | string_for_failure TimedOut = "Timed out."
blanchet@36370
    94
  | string_for_failure OutOfResources = "The ATP ran out of resources."
blanchet@36370
    95
  | string_for_failure OldSpass =
blanchet@36393
    96
    (* FIXME: Change the error message below to point to the Isabelle download
blanchet@36393
    97
       page once the package is there (around the Isabelle2010 release). *)
blanchet@36370
    98
    "Warning: Sledgehammer requires a more recent version of SPASS with \
blanchet@36370
    99
    \support for the TPTP syntax. To install it, download and untar the \
blanchet@36370
   100
    \package \"http://isabelle.in.tum.de/~blanchet/spass-3.7.tgz\" and add the \
blanchet@36370
   101
    \\"spass-3.7\" directory's full path to \"" ^
blanchet@36370
   102
    Path.implode (Path.expand (Path.appends
blanchet@36370
   103
        (Path.variable "ISABELLE_HOME_USER" ::
blanchet@36370
   104
         map Path.basic ["etc", "components"]))) ^
blanchet@36370
   105
    "\" on a line of its own."
blanchet@36965
   106
  | string_for_failure MalformedInput =
blanchet@36965
   107
    "Internal Sledgehammer error: The ATP problem is malformed. Please report \
blanchet@36965
   108
    \this to the Isabelle developers."
blanchet@36370
   109
  | string_for_failure MalformedOutput = "Error: The ATP output is malformed."
blanchet@36370
   110
  | string_for_failure UnknownError = "Error: An unknown ATP error occurred."
blanchet@35865
   111
blanchet@36400
   112
fun shape_of_clauses _ [] = []
blanchet@36400
   113
  | shape_of_clauses j ([] :: clauses) = [] :: shape_of_clauses j clauses
blanchet@37498
   114
  | shape_of_clauses j ((_ :: lits) :: clauses) =
blanchet@36400
   115
    let val shape = shape_of_clauses (j + 1) (lits :: clauses) in
blanchet@36400
   116
      (j :: hd shape) :: tl shape
blanchet@36400
   117
    end
blanchet@36400
   118
blanchet@37499
   119
(* generic TPTP-based provers *)
blanchet@37499
   120
blanchet@37499
   121
fun generic_tptp_prover
blanchet@37499
   122
        (name, {home_var, executable, arguments, proof_delims, known_failures,
blanchet@37499
   123
                max_axiom_clauses, prefers_theory_relevant})
blanchet@37499
   124
        ({debug, overlord, full_types, explicit_apply, respect_no_atp,
blanchet@37499
   125
          relevance_threshold, relevance_convergence, theory_relevant,
blanchet@37499
   126
          defs_relevant, isar_proof, isar_shrink_factor, ...} : params)
blanchet@37499
   127
        minimize_command timeout
blanchet@35969
   128
        ({subgoal, goal, relevance_override, axiom_clauses, filtered_clauses}
blanchet@35969
   129
         : problem) =
wenzelm@28596
   130
  let
immler@31750
   131
    (* get clauses and prepare them for writing *)
blanchet@37498
   132
    val (ctxt, (_, th)) = goal;
wenzelm@32942
   133
    val thy = ProofContext.theory_of ctxt;
blanchet@36400
   134
    val goal_clss = #1 (neg_conjecture_clauses ctxt th subgoal)
blanchet@36400
   135
    val goal_cls = List.concat goal_clss
immler@31752
   136
    val the_filtered_clauses =
wenzelm@32942
   137
      (case filtered_clauses of
blanchet@37499
   138
        NONE => relevant_facts full_types respect_no_atp relevance_threshold
blanchet@37499
   139
                    relevance_convergence defs_relevant max_axiom_clauses
blanchet@37499
   140
                    (the_default prefers_theory_relevant theory_relevant)
blanchet@37499
   141
                    relevance_override goal goal_cls
wenzelm@32942
   142
      | SOME fcls => fcls);
blanchet@37506
   143
    val the_axiom_clauses = axiom_clauses |> the_default the_filtered_clauses
blanchet@35969
   144
    val (internal_thm_names, clauses) =
blanchet@37499
   145
      prepare_clauses full_types goal_cls the_axiom_clauses the_filtered_clauses
blanchet@37499
   146
                      thy
immler@31750
   147
boehmes@32864
   148
    (* path to unique problem file *)
blanchet@36376
   149
    val the_dest_dir = if overlord then getenv "ISABELLE_HOME_USER"
blanchet@36376
   150
                       else Config.get ctxt dest_dir;
blanchet@36376
   151
    val the_problem_prefix = Config.get ctxt problem_prefix;
boehmes@32864
   152
    fun prob_pathname nr =
blanchet@36143
   153
      let
blanchet@36143
   154
        val probfile =
blanchet@36568
   155
          Path.basic ((if overlord then "prob_" ^ name
blanchet@36568
   156
                       else the_problem_prefix ^ serial_string ())
blanchet@36143
   157
                      ^ "_" ^ string_of_int nr)
wenzelm@32942
   158
      in
blanchet@36376
   159
        if the_dest_dir = "" then File.tmp_path probfile
blanchet@36376
   160
        else if File.exists (Path.explode the_dest_dir)
blanchet@36376
   161
        then Path.append (Path.explode the_dest_dir) probfile
blanchet@36376
   162
        else error ("No such directory: " ^ the_dest_dir ^ ".")
wenzelm@32942
   163
      end;
boehmes@32864
   164
blanchet@36917
   165
    val home = getenv home_var
blanchet@36289
   166
    val command = Path.explode (home ^ "/" ^ executable)
immler@31750
   167
    (* write out problem file and call prover *)
blanchet@36289
   168
    fun command_line probfile =
blanchet@36284
   169
      (if Config.get ctxt measure_runtime then
blanchet@36289
   170
         "TIMEFORMAT='%3U'; { time " ^
blanchet@37499
   171
         space_implode " " [File.shell_path command, arguments timeout,
blanchet@36289
   172
                            File.shell_path probfile] ^ " ; } 2>&1"
blanchet@36284
   173
       else
blanchet@37499
   174
         space_implode " " ["exec", File.shell_path command, arguments timeout,
blanchet@36289
   175
                            File.shell_path probfile, "2>&1"]) ^
blanchet@36284
   176
      (if overlord then
blanchet@36286
   177
         " | sed 's/,/, /g' \
blanchet@36485
   178
         \| sed 's/\\([^!=<]\\)\\([=|]\\)\\([^=>]\\)/\\1 \\2 \\3/g' \
blanchet@36286
   179
         \| sed 's/  / /g' | sed 's/| |/||/g' \
blanchet@36286
   180
         \| sed 's/ = = =/===/g' \
blanchet@36286
   181
         \| sed 's/= = /== /g'"
blanchet@36284
   182
       else
blanchet@36284
   183
         "")
boehmes@32510
   184
    fun split_time s =
boehmes@32510
   185
      let
wenzelm@32942
   186
        val split = String.tokens (fn c => str c = "\n");
blanchet@36369
   187
        val (output, t) = s |> split |> split_last |> apfst cat_lines;
wenzelm@32942
   188
        fun as_num f = f >> (fst o read_int);
wenzelm@32942
   189
        val num = as_num (Scan.many1 Symbol.is_ascii_digit);
wenzelm@32942
   190
        val digit = Scan.one Symbol.is_ascii_digit;
wenzelm@32942
   191
        val num3 = as_num (digit ::: digit ::: (digit >> single));
wenzelm@32942
   192
        val time = num --| Scan.$$ "." -- num3 >> (fn (a, b) => a * 1000 + b);
wenzelm@32942
   193
        val as_time = the_default 0 o Scan.read Symbol.stopper time o explode;
blanchet@36369
   194
      in (output, as_time t) end;
blanchet@37509
   195
    val split_time' =
blanchet@37509
   196
      if Config.get ctxt measure_runtime then split_time else rpair 0
boehmes@32458
   197
    fun run_on probfile =
blanchet@36289
   198
      if File.exists command then
blanchet@37499
   199
        write_tptp_file (debug andalso overlord) full_types explicit_apply
blanchet@37499
   200
                        probfile clauses
blanchet@36289
   201
        |> pair (apfst split_time' (bash_output (command_line probfile)))
blanchet@36917
   202
      else if home = "" then
blanchet@36917
   203
        error ("The environment variable " ^ quote home_var ^ " is not set.")
blanchet@36382
   204
      else
blanchet@36382
   205
        error ("Bad executable: " ^ Path.implode command ^ ".");
wenzelm@28592
   206
blanchet@36167
   207
    (* If the problem file has not been exported, remove it; otherwise, export
blanchet@36167
   208
       the proof file too. *)
blanchet@36376
   209
    fun cleanup probfile =
blanchet@36376
   210
      if the_dest_dir = "" then try File.rm probfile else NONE
blanchet@36369
   211
    fun export probfile (((output, _), _), _) =
blanchet@36376
   212
      if the_dest_dir = "" then
blanchet@36187
   213
        ()
blanchet@36187
   214
      else
blanchet@36187
   215
        File.write (Path.explode (Path.implode probfile ^ "_proof"))
blanchet@36282
   216
                   ((if overlord then
blanchet@36289
   217
                       "% " ^ command_line probfile ^ "\n% " ^ timestamp () ^
blanchet@36289
   218
                       "\n"
blanchet@36282
   219
                     else
blanchet@36400
   220
                       "") ^ output)
wenzelm@32257
   221
blanchet@36400
   222
    val (((output, atp_run_time_in_msecs), res_code),
blanchet@36400
   223
         (pool, conjecture_offset)) =
wenzelm@35570
   224
      with_path cleanup export run_on (prob_pathname subgoal);
blanchet@36400
   225
    val conjecture_shape = shape_of_clauses (conjecture_offset + 1) goal_clss
blanchet@36167
   226
    (* Check for success and print out some information on failure. *)
blanchet@36370
   227
    val (proof, outcome) =
blanchet@36370
   228
      extract_proof_and_outcome res_code proof_delims known_failures output
blanchet@35969
   229
    val (message, relevant_thm_names) =
blanchet@36370
   230
      case outcome of
blanchet@36400
   231
        NONE =>
blanchet@36400
   232
        proof_text isar_proof
blanchet@37480
   233
            (pool, debug, isar_shrink_factor, ctxt, conjecture_shape)
blanchet@37480
   234
            (full_types, minimize_command, proof, internal_thm_names, th,
blanchet@37480
   235
             subgoal)
blanchet@36370
   236
      | SOME failure => (string_for_failure failure ^ "\n", [])
boehmes@32864
   237
  in
blanchet@36393
   238
    {outcome = outcome, message = message, pool = pool,
blanchet@35969
   239
     relevant_thm_names = relevant_thm_names,
blanchet@36369
   240
     atp_run_time_in_msecs = atp_run_time_in_msecs, output = output,
blanchet@36369
   241
     proof = proof, internal_thm_names = internal_thm_names,
blanchet@36400
   242
     conjecture_shape = conjecture_shape,
blanchet@35969
   243
     filtered_clauses = the_filtered_clauses}
blanchet@37499
   244
  end
wenzelm@28596
   245
blanchet@35969
   246
fun tptp_prover name p = (name, generic_tptp_prover (name, p));
wenzelm@28596
   247
blanchet@36382
   248
fun to_generous_secs time = (Time.toMilliseconds time + 999) div 1000
blanchet@36142
   249
wenzelm@28596
   250
(* E prover *)
wenzelm@28596
   251
blanchet@36369
   252
val tstp_proof_delims =
blanchet@36369
   253
  ("# SZS output start CNFRefutation.", "# SZS output end CNFRefutation")
blanchet@36369
   254
blanchet@35969
   255
val e_config : prover_config =
blanchet@36917
   256
  {home_var = "E_HOME",
blanchet@36289
   257
   executable = "eproof",
blanchet@36382
   258
   arguments = fn timeout =>
blanchet@36382
   259
     "--tstp-in --tstp-out -l5 -xAutoDev -tAutoDev --silent --cpu-limit=" ^
blanchet@36382
   260
     string_of_int (to_generous_secs timeout),
blanchet@36369
   261
   proof_delims = [tstp_proof_delims],
blanchet@36265
   262
   known_failures =
blanchet@36370
   263
     [(Unprovable, "SZS status: Satisfiable"),
blanchet@36370
   264
      (Unprovable, "SZS status Satisfiable"),
blanchet@36370
   265
      (TimedOut, "Failure: Resource limit exceeded (time)"),
blanchet@36370
   266
      (TimedOut, "time limit exceeded"),
blanchet@36370
   267
      (OutOfResources,
blanchet@36370
   268
       "# Cannot determine problem status within resource limit"),
blanchet@36370
   269
      (OutOfResources, "SZS status: ResourceOut"),
blanchet@36370
   270
      (OutOfResources, "SZS status ResourceOut")],
blanchet@36382
   271
   max_axiom_clauses = 100,
blanchet@36289
   272
   prefers_theory_relevant = false}
blanchet@35969
   273
val e = tptp_prover "e" e_config
wenzelm@28596
   274
wenzelm@28596
   275
blanchet@36219
   276
(* The "-VarWeight=3" option helps the higher-order problems, probably by
blanchet@36219
   277
   counteracting the presence of "hAPP". *)
blanchet@37498
   278
val spass_config : prover_config =
blanchet@36917
   279
  {home_var = "SPASS_HOME",
blanchet@36289
   280
   executable = "SPASS",
blanchet@36382
   281
   arguments = fn timeout =>
blanchet@37498
   282
     "-TPTP -Auto -SOS=1 -PGiven=0 -PProblem=0 -Splits=0 -FullRed=0 -DocProof \
blanchet@37498
   283
     \-VarWeight=3 -TimeLimit=" ^ string_of_int (to_generous_secs timeout),
blanchet@36369
   284
   proof_delims = [("Here is a proof", "Formulae used in the proof")],
blanchet@36289
   285
   known_failures =
blanchet@37413
   286
     [(IncompleteUnprovable, "SPASS beiseite: Completion found"),
blanchet@36370
   287
      (TimedOut, "SPASS beiseite: Ran out of time"),
blanchet@36965
   288
      (OutOfResources, "SPASS beiseite: Maximal number of loops exceeded"),
blanchet@37413
   289
      (MalformedInput, "Undefined symbol"),
blanchet@37414
   290
      (MalformedInput, "Free Variable"),
blanchet@37414
   291
      (OldSpass, "unrecognized option `-TPTP'"),
blanchet@37414
   292
      (OldSpass, "Unrecognized option TPTP")],
blanchet@36382
   293
   max_axiom_clauses = 40,
blanchet@36289
   294
   prefers_theory_relevant = true}
blanchet@37414
   295
val spass = tptp_prover "spass" spass_config
wenzelm@28596
   296
blanchet@37509
   297
(* Vampire *)
blanchet@37509
   298
blanchet@37509
   299
val vampire_config : prover_config =
blanchet@37509
   300
  {home_var = "VAMPIRE_HOME",
blanchet@37509
   301
   executable = "vampire",
blanchet@37509
   302
   arguments = fn timeout =>
blanchet@37509
   303
     "--output_syntax tptp --mode casc -t " ^
blanchet@37509
   304
     string_of_int (to_generous_secs timeout),
blanchet@37509
   305
   proof_delims =
blanchet@37509
   306
     [("=========== Refutation ==========",
blanchet@37509
   307
       "======= End of refutation ======="),
blanchet@37509
   308
      ("% SZS output start Refutation", "% SZS output end Refutation")],
blanchet@37509
   309
   known_failures =
blanchet@37509
   310
     [(Unprovable, "UNPROVABLE"),
blanchet@37509
   311
      (IncompleteUnprovable, "CANNOT PROVE"),
blanchet@37509
   312
      (Unprovable, "Satisfiability detected"),
blanchet@37509
   313
      (OutOfResources, "Refutation not found")],
blanchet@37509
   314
   max_axiom_clauses = 60,
blanchet@37509
   315
   prefers_theory_relevant = false}
blanchet@37509
   316
val vampire = tptp_prover "vampire" vampire_config
blanchet@37509
   317
blanchet@37509
   318
(* Remote prover invocation via SystemOnTPTP *)
wenzelm@28596
   319
blanchet@36376
   320
val systems = Synchronized.var "atp_systems" ([]: string list);
immler@31835
   321
immler@31835
   322
fun get_systems () =
blanchet@36370
   323
  case bash_output "\"$ISABELLE_ATP_MANAGER/SystemOnTPTP\" -w" of
blanchet@36370
   324
    (answer, 0) => split_lines answer
blanchet@36370
   325
  | (answer, _) =>
blanchet@36370
   326
    error ("Failed to get available systems at SystemOnTPTP:\n" ^ answer)
immler@31835
   327
blanchet@35867
   328
fun refresh_systems_on_tptp () =
blanchet@37509
   329
  Synchronized.change systems (fn _ => get_systems ())
immler@31835
   330
immler@31835
   331
fun get_system prefix = Synchronized.change_result systems (fn systems =>
boehmes@32864
   332
  (if null systems then get_systems () else systems)
wenzelm@32942
   333
  |> `(find_first (String.isPrefix prefix)));
boehmes@32864
   334
wenzelm@32948
   335
fun the_system prefix =
boehmes@32864
   336
  (case get_system prefix of
blanchet@37509
   337
    NONE => error ("System " ^ quote prefix ^ " not available at SystemOnTPTP.")
wenzelm@32942
   338
  | SOME sys => sys);
immler@31835
   339
blanchet@36265
   340
val remote_known_failures =
blanchet@36370
   341
  [(TimedOut, "says Timeout"),
blanchet@36377
   342
   (MalformedOutput, "Remote script could not extract proof")]
blanchet@35865
   343
blanchet@37509
   344
fun remote_config atp_prefix args
blanchet@36382
   345
        ({proof_delims, known_failures, max_axiom_clauses,
blanchet@36369
   346
          prefers_theory_relevant, ...} : prover_config) : prover_config =
blanchet@36917
   347
  {home_var = "ISABELLE_ATP_MANAGER",
blanchet@36289
   348
   executable = "SystemOnTPTP",
blanchet@36382
   349
   arguments = fn timeout =>
blanchet@36382
   350
     args ^ " -t " ^ string_of_int (to_generous_secs timeout) ^ " -s " ^
blanchet@36382
   351
     the_system atp_prefix,
blanchet@36369
   352
   proof_delims = insert (op =) tstp_proof_delims proof_delims,
blanchet@36265
   353
   known_failures = remote_known_failures @ known_failures,
blanchet@36382
   354
   max_axiom_clauses = max_axiom_clauses,
blanchet@36289
   355
   prefers_theory_relevant = prefers_theory_relevant}
wenzelm@28596
   356
blanchet@37509
   357
fun remote_tptp_prover prover atp_prefix args config =
blanchet@37509
   358
  tptp_prover (remotify (fst prover)) (remote_config atp_prefix args config)
boehmes@32864
   359
blanchet@37509
   360
val remote_e = remote_tptp_prover e "EP---" "" e_config
blanchet@37509
   361
val remote_spass = remote_tptp_prover spass "SPASS---" "-x" spass_config
blanchet@37509
   362
val remote_vampire = remote_tptp_prover vampire "Vampire---9" "" vampire_config
wenzelm@28592
   363
blanchet@36917
   364
fun maybe_remote (name, _) ({home_var, ...} : prover_config) =
blanchet@36917
   365
  name |> getenv home_var = "" ? remotify
blanchet@36371
   366
blanchet@36371
   367
fun default_atps_param_value () =
blanchet@36371
   368
  space_implode " " [maybe_remote e e_config, maybe_remote spass spass_config,
blanchet@36371
   369
                     remotify (fst vampire)]
blanchet@36371
   370
blanchet@37509
   371
val provers = [e, spass, vampire, remote_e, remote_spass, remote_vampire]
blanchet@35867
   372
val prover_setup = fold add_prover provers
blanchet@35867
   373
blanchet@35867
   374
val setup =
blanchet@36376
   375
  dest_dir_setup
blanchet@35867
   376
  #> problem_prefix_setup
blanchet@35867
   377
  #> measure_runtime_setup
blanchet@36371
   378
  #> prover_setup
blanchet@35867
   379
wenzelm@28592
   380
end;