src/HOL/Tools/ATP/atp_systems.ML
author blanchet
Thu May 24 15:11:53 2012 +0200 (2012-05-24)
changeset 47985 22846a7cf66e
parent 47981 df35a8dd6368
child 48004 989a34fa72b3
permissions -rw-r--r--
update Satallax setup based on evaluation
blanchet@38047
     1
(*  Title:      HOL/Tools/ATP/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@47038
    10
  type term_order = ATP_Problem.term_order
blanchet@45301
    11
  type atp_format = ATP_Problem.atp_format
blanchet@47976
    12
  type formula_role = ATP_Problem.formula_role
blanchet@39491
    13
  type failure = ATP_Proof.failure
blanchet@38023
    14
blanchet@46409
    15
  type slice_spec = int * atp_format * string * string * bool
blanchet@40059
    16
  type atp_config =
blanchet@47055
    17
    {exec : string list * string,
blanchet@47055
    18
     required_vars : string list list,
blanchet@42646
    19
     arguments :
blanchet@43473
    20
       Proof.context -> bool -> string -> Time.time
blanchet@47038
    21
       -> term_order * (unit -> (string * int) list)
blanchet@47038
    22
          * (unit -> (string * real) list) -> string,
blanchet@42578
    23
     proof_delims : (string * string) list,
blanchet@42578
    24
     known_failures : (failure * string) list,
blanchet@47976
    25
     prem_role : formula_role,
blanchet@43473
    26
     best_slices :
blanchet@47962
    27
       Proof.context -> (real * (bool * (slice_spec * string))) list,
blanchet@47962
    28
     best_max_mono_iters : int,
blanchet@47962
    29
     best_max_new_mono_instances : int}
blanchet@38023
    30
blanchet@47962
    31
  val default_max_mono_iters : int
blanchet@47962
    32
  val default_max_new_mono_instances : int
blanchet@44099
    33
  val force_sos : bool Config.T
blanchet@47032
    34
  val term_order : string Config.T
blanchet@43566
    35
  val e_smartN : string
blanchet@43566
    36
  val e_autoN : string
blanchet@43566
    37
  val e_fun_weightN : string
blanchet@43566
    38
  val e_sym_offset_weightN : string
blanchet@47032
    39
  val e_selection_heuristic : string Config.T
blanchet@42646
    40
  val e_default_fun_weight : real Config.T
blanchet@42646
    41
  val e_fun_weight_base : real Config.T
blanchet@42646
    42
  val e_fun_weight_span : real Config.T
blanchet@42646
    43
  val e_default_sym_offs_weight : real Config.T
blanchet@42646
    44
  val e_sym_offs_weight_base : real Config.T
blanchet@42646
    45
  val e_sym_offs_weight_span : real Config.T
blanchet@46643
    46
  val alt_ergoN : string
blanchet@46643
    47
  val dummy_thfN : string
blanchet@40059
    48
  val eN : string
blanchet@44590
    49
  val e_sineN : string
blanchet@44590
    50
  val e_tofofN : string
blanchet@45338
    51
  val iproverN : string
blanchet@45338
    52
  val iprover_eqN : string
blanchet@44590
    53
  val leo2N : string
blanchet@44590
    54
  val satallaxN : string
blanchet@44590
    55
  val snarkN : string
blanchet@40059
    56
  val spassN : string
blanchet@40059
    57
  val vampireN : string
blanchet@42938
    58
  val waldmeisterN : string
blanchet@44423
    59
  val z3_tptpN : string
blanchet@40060
    60
  val remote_prefix : string
blanchet@41738
    61
  val remote_atp :
blanchet@41738
    62
    string -> string -> string list -> (string * string) list
blanchet@47976
    63
    -> (failure * string) list -> formula_role
blanchet@47606
    64
    -> (Proof.context -> slice_spec * string) -> string * (unit -> atp_config)
blanchet@47606
    65
  val add_atp : string * (unit -> atp_config) -> theory -> theory
blanchet@47606
    66
  val get_atp : theory -> string -> (unit -> atp_config)
blanchet@41727
    67
  val supported_atps : theory -> string list
blanchet@40059
    68
  val is_atp_installed : theory -> string -> bool
blanchet@35867
    69
  val refresh_systems_on_tptp : unit -> unit
blanchet@47055
    70
  val effective_term_order : Proof.context -> string -> term_order
blanchet@35867
    71
  val setup : theory -> theory
wenzelm@28592
    72
end;
wenzelm@28592
    73
blanchet@36376
    74
structure ATP_Systems : ATP_SYSTEMS =
wenzelm@28592
    75
struct
wenzelm@28596
    76
blanchet@42577
    77
open ATP_Problem
blanchet@39491
    78
open ATP_Proof
blanchet@46320
    79
open ATP_Problem_Generate
boehmes@32864
    80
blanchet@40059
    81
(* ATP configuration *)
boehmes@32864
    82
blanchet@47962
    83
val default_max_mono_iters = 3 (* FUDGE *)
blanchet@47962
    84
val default_max_new_mono_instances = 200 (* FUDGE *)
blanchet@47962
    85
blanchet@46409
    86
type slice_spec = int * atp_format * string * string * bool
blanchet@46409
    87
blanchet@40059
    88
type atp_config =
blanchet@47055
    89
  {exec : string list * string,
blanchet@47055
    90
   required_vars : string list list,
blanchet@42646
    91
   arguments :
blanchet@43473
    92
     Proof.context -> bool -> string -> Time.time
blanchet@47038
    93
     -> term_order * (unit -> (string * int) list)
blanchet@47038
    94
        * (unit -> (string * real) list) -> string,
blanchet@42578
    95
   proof_delims : (string * string) list,
blanchet@42578
    96
   known_failures : (failure * string) list,
blanchet@47976
    97
   prem_role : formula_role,
blanchet@47962
    98
   best_slices : Proof.context -> (real * (bool * (slice_spec * string))) list,
blanchet@47962
    99
   best_max_mono_iters : int,
blanchet@47962
   100
   best_max_new_mono_instances : int}
wenzelm@28596
   101
blanchet@42723
   102
(* "best_slices" must be found empirically, taking a wholistic approach since
blanchet@46407
   103
   the ATPs are run in parallel. The "real" component gives the faction of the
blanchet@46409
   104
   time available given to the slice and should add up to 1.0. The first "bool"
blanchet@42723
   105
   component indicates whether the slice's strategy is complete; the "int", the
blanchet@43569
   106
   preferred number of facts to pass; the first "string", the preferred type
blanchet@45521
   107
   system (which should be sound or quasi-sound); the second "string", the
blanchet@46409
   108
   preferred lambda translation scheme; the second "bool", whether uncurried
blanchet@46409
   109
   aliased should be generated; the third "string", extra information to
blanchet@45521
   110
   the prover (e.g., SOS or no SOS).
blanchet@42723
   111
blanchet@42723
   112
   The last slice should be the most "normal" one, because it will get all the
blanchet@43569
   113
   time available if the other slices fail early and also because it is used if
blanchet@43569
   114
   slicing is disabled (e.g., by the minimizer). *)
blanchet@42710
   115
blanchet@38061
   116
val known_perl_failures =
blanchet@38094
   117
  [(CantConnect, "HTTP error"),
blanchet@38094
   118
   (NoPerl, "env: perl"),
blanchet@38065
   119
   (NoLibwwwPerl, "Can't locate HTTP")]
wenzelm@28596
   120
blanchet@45203
   121
fun known_szs_failures wrap =
blanchet@45203
   122
  [(Unprovable, wrap "CounterSatisfiable"),
blanchet@45203
   123
   (Unprovable, wrap "Satisfiable"),
blanchet@45203
   124
   (GaveUp, wrap "GaveUp"),
blanchet@45203
   125
   (GaveUp, wrap "Unknown"),
blanchet@45203
   126
   (GaveUp, wrap "Incomplete"),
blanchet@45203
   127
   (ProofMissing, wrap "Theorem"),
blanchet@45203
   128
   (ProofMissing, wrap "Unsatisfiable"),
blanchet@45203
   129
   (TimedOut, wrap "Timeout"),
blanchet@45203
   130
   (Inappropriate, wrap "Inappropriate"),
blanchet@45203
   131
   (OutOfResources, wrap "ResourceOut"),
blanchet@45203
   132
   (OutOfResources, wrap "MemoryOut"),
blanchet@45203
   133
   (Interrupted, wrap "Forced"),
blanchet@45203
   134
   (Interrupted, wrap "User")]
blanchet@45203
   135
blanchet@45203
   136
val known_szs_status_failures = known_szs_failures (prefix "SZS status ")
blanchet@45203
   137
val known_says_failures = known_szs_failures (prefix " says ")
blanchet@45203
   138
blanchet@40059
   139
(* named ATPs *)
blanchet@40059
   140
blanchet@46643
   141
val alt_ergoN = "alt_ergo"
blanchet@47055
   142
val dummy_thfN = "dummy_thf" (* for experiments *)
blanchet@40059
   143
val eN = "e"
blanchet@44590
   144
val e_sineN = "e_sine"
blanchet@44590
   145
val e_tofofN = "e_tofof"
blanchet@45338
   146
val iproverN = "iprover"
blanchet@45338
   147
val iprover_eqN = "iprover_eq"
blanchet@44099
   148
val leo2N = "leo2"
blanchet@44099
   149
val satallaxN = "satallax"
blanchet@44590
   150
val snarkN = "snark"
blanchet@40059
   151
val spassN = "spass"
blanchet@40059
   152
val vampireN = "vampire"
blanchet@44590
   153
val waldmeisterN = "waldmeister"
blanchet@44423
   154
val z3_tptpN = "z3_tptp"
blanchet@40060
   155
val remote_prefix = "remote_"
blanchet@38001
   156
blanchet@38023
   157
structure Data = Theory_Data
blanchet@38023
   158
(
blanchet@47606
   159
  type T = ((unit -> atp_config) * stamp) Symtab.table
blanchet@38023
   160
  val empty = Symtab.empty
blanchet@38023
   161
  val extend = I
blanchet@46407
   162
  fun merge data : T =
blanchet@46407
   163
    Symtab.merge (eq_snd (op =)) data
blanchet@38023
   164
    handle Symtab.DUP name => error ("Duplicate ATP: " ^ quote name ^ ".")
blanchet@38023
   165
)
blanchet@38017
   166
blanchet@43981
   167
fun to_secs min time = Int.max (min, (Time.toMilliseconds time + 999) div 1000)
blanchet@36142
   168
blanchet@43473
   169
val sosN = "sos"
blanchet@43473
   170
val no_sosN = "no_sos"
blanchet@43473
   171
blanchet@44099
   172
val force_sos = Attrib.setup_config_bool @{binding atp_force_sos} (K false)
blanchet@44099
   173
blanchet@47032
   174
val smartN = "smart"
blanchet@47073
   175
(* val kboN = "kbo" *)
blanchet@47032
   176
val lpoN = "lpo"
blanchet@47034
   177
val xweightsN = "_weights"
blanchet@47034
   178
val xprecN = "_prec"
blanchet@47034
   179
val xsimpN = "_simp" (* SPASS-specific *)
blanchet@47032
   180
blanchet@47038
   181
(* Possible values for "atp_term_order":
blanchet@47049
   182
   "smart", "(kbo|lpo)(_weights)?(_prec|_simp)?" *)
blanchet@47032
   183
val term_order =
blanchet@47032
   184
  Attrib.setup_config_string @{binding atp_term_order} (K smartN)
blanchet@47032
   185
blanchet@46643
   186
(* Alt-Ergo *)
blanchet@46643
   187
blanchet@46643
   188
val alt_ergo_tff1 = TFF (TPTP_Polymorphic, TPTP_Explicit)
blanchet@46643
   189
blanchet@46643
   190
val alt_ergo_config : atp_config =
blanchet@47055
   191
  {exec = (["WHY3_HOME"], "why3"),
blanchet@47055
   192
   required_vars = [],
blanchet@46643
   193
   arguments =
blanchet@46643
   194
     fn _ => fn _ => fn _ => fn timeout => fn _ =>
blanchet@46643
   195
        "--format tff1 --prover alt-ergo --timelimit " ^
blanchet@46643
   196
        string_of_int (to_secs 1 timeout),
blanchet@46643
   197
   proof_delims = [],
blanchet@46643
   198
   known_failures =
blanchet@46643
   199
     [(ProofMissing, ": Valid"),
blanchet@46643
   200
      (TimedOut, ": Timeout"),
blanchet@46643
   201
      (GaveUp, ": Unknown")],
blanchet@47976
   202
   prem_role = Hypothesis,
blanchet@46643
   203
   best_slices = fn _ =>
blanchet@46643
   204
     (* FUDGE *)
blanchet@47962
   205
     [(1.0, (false, ((100, alt_ergo_tff1, "poly_native", liftingN, false), "")))],
blanchet@47962
   206
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   207
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@46643
   208
blanchet@47646
   209
val alt_ergo = (alt_ergoN, fn () => alt_ergo_config)
blanchet@46643
   210
blanchet@46643
   211
blanchet@40059
   212
(* E *)
wenzelm@28596
   213
blanchet@47055
   214
fun is_new_e_version () = (string_ord (getenv "E_VERSION", "1.2") = GREATER)
blanchet@44420
   215
blanchet@36369
   216
val tstp_proof_delims =
blanchet@42962
   217
  [("# SZS output start CNFRefutation.", "# SZS output end CNFRefutation"),
blanchet@42962
   218
   ("% SZS output start CNFRefutation", "% SZS output end CNFRefutation")]
blanchet@36369
   219
blanchet@43473
   220
val e_smartN = "smart"
blanchet@42646
   221
val e_autoN = "auto"
blanchet@42646
   222
val e_fun_weightN = "fun_weight"
blanchet@42646
   223
val e_sym_offset_weightN = "sym_offset_weight"
blanchet@41725
   224
blanchet@47032
   225
val e_selection_heuristic =
blanchet@47032
   226
  Attrib.setup_config_string @{binding atp_e_selection_heuristic} (K e_smartN)
blanchet@41770
   227
(* FUDGE *)
blanchet@42646
   228
val e_default_fun_weight =
blanchet@42646
   229
  Attrib.setup_config_real @{binding atp_e_default_fun_weight} (K 20.0)
blanchet@42646
   230
val e_fun_weight_base =
blanchet@42646
   231
  Attrib.setup_config_real @{binding atp_e_fun_weight_base} (K 0.0)
blanchet@42646
   232
val e_fun_weight_span =
blanchet@42646
   233
  Attrib.setup_config_real @{binding atp_e_fun_weight_span} (K 40.0)
blanchet@42646
   234
val e_default_sym_offs_weight =
blanchet@42646
   235
  Attrib.setup_config_real @{binding atp_e_default_sym_offs_weight} (K 1.0)
blanchet@42646
   236
val e_sym_offs_weight_base =
blanchet@42646
   237
  Attrib.setup_config_real @{binding atp_e_sym_offs_weight_base} (K ~20.0)
blanchet@42646
   238
val e_sym_offs_weight_span =
blanchet@42646
   239
  Attrib.setup_config_real @{binding atp_e_sym_offs_weight_span} (K 60.0)
blanchet@41725
   240
blanchet@47038
   241
fun e_selection_heuristic_case heuristic fw sow =
blanchet@47038
   242
  if heuristic = e_fun_weightN then fw
blanchet@47038
   243
  else if heuristic = e_sym_offset_weightN then sow
blanchet@47038
   244
  else raise Fail ("unexpected " ^ quote heuristic)
blanchet@41725
   245
blanchet@47038
   246
fun scaled_e_selection_weight ctxt heuristic w =
blanchet@47038
   247
  w * Config.get ctxt (e_selection_heuristic_case heuristic
blanchet@47029
   248
                           e_fun_weight_span e_sym_offs_weight_span)
blanchet@47038
   249
  + Config.get ctxt (e_selection_heuristic_case heuristic
blanchet@47029
   250
                         e_fun_weight_base e_sym_offs_weight_base)
blanchet@41725
   251
  |> Real.ceil |> signed_string_of_int
blanchet@41313
   252
blanchet@47038
   253
fun e_selection_weight_arguments ctxt heuristic sel_weights =
blanchet@47038
   254
  if heuristic = e_autoN then
blanchet@47038
   255
    "-xAuto"
blanchet@41725
   256
  else
blanchet@43622
   257
    (* supplied by Stephan Schulz *)
blanchet@41314
   258
    "--split-clauses=4 --split-reuse-defs --simul-paramod --forward-context-sr \
blanchet@41314
   259
    \--destructive-er-aggressive --destructive-er --presat-simplify \
blanchet@47505
   260
    \--prefer-initial-clauses -winvfreqrank -c1 -Ginvfreqconjmax -F1 \
blanchet@47505
   261
    \--delete-bad-limit=150000000 -WSelectMaxLComplexAvoidPosPred -H'(4*" ^
blanchet@47038
   262
    e_selection_heuristic_case heuristic "FunWeight" "SymOffsetWeight" ^
blanchet@41725
   263
    "(SimulateSOS, " ^
blanchet@47038
   264
    (e_selection_heuristic_case heuristic
blanchet@47029
   265
         e_default_fun_weight e_default_sym_offs_weight
blanchet@42646
   266
     |> Config.get ctxt |> Real.ceil |> signed_string_of_int) ^
blanchet@41314
   267
    ",20,1.5,1.5,1" ^
blanchet@47030
   268
    (sel_weights ()
blanchet@47029
   269
     |> map (fn (s, w) => "," ^ s ^ ":" ^
blanchet@47038
   270
                          scaled_e_selection_weight ctxt heuristic w)
blanchet@42646
   271
     |> implode) ^
blanchet@41314
   272
    "),3*ConjectureGeneralSymbolWeight(PreferNonGoals,200,100,200,50,50,1,100,\
blanchet@41314
   273
    \1.5,1.5,1),1*Clauseweight(PreferProcessed,1,1,1),1*\
blanchet@41314
   274
    \FIFOWeight(PreferProcessed))'"
blanchet@41313
   275
blanchet@47038
   276
val e_ord_weights =
blanchet@47038
   277
  map (fn (s, w) => s ^ ":" ^ string_of_int w) #> space_implode ","
blanchet@47038
   278
fun e_ord_precedence [_] = ""
blanchet@47038
   279
  | e_ord_precedence info = info |> map fst |> space_implode "<"
blanchet@47038
   280
blanchet@47039
   281
fun e_term_order_info_arguments false false _ = ""
blanchet@47039
   282
  | e_term_order_info_arguments gen_weights gen_prec ord_info =
blanchet@47038
   283
    let val ord_info = ord_info () in
blanchet@47038
   284
      (if gen_weights then "--order-weights='" ^ e_ord_weights ord_info ^ "' "
blanchet@47038
   285
       else "") ^
blanchet@47038
   286
      (if gen_prec then "--precedence='" ^ e_ord_precedence ord_info ^ "' "
blanchet@47038
   287
       else "")
blanchet@47038
   288
    end
blanchet@47038
   289
blanchet@47032
   290
fun effective_e_selection_heuristic ctxt =
blanchet@47055
   291
  if is_new_e_version () then Config.get ctxt e_selection_heuristic else e_autoN
blanchet@42443
   292
blanchet@47505
   293
fun e_kbo () = if is_new_e_version () then "KBO6" else "KBO"
blanchet@47505
   294
blanchet@40059
   295
val e_config : atp_config =
blanchet@47055
   296
  {exec = (["E_HOME"], "eproof"),
blanchet@47055
   297
   required_vars = [],
blanchet@43354
   298
   arguments =
blanchet@47038
   299
     fn ctxt => fn _ => fn heuristic => fn timeout =>
blanchet@47038
   300
        fn ({is_lpo, gen_weights, gen_prec, ...}, ord_info, sel_weights) =>
blanchet@47038
   301
        "--tstp-in --tstp-out --output-level=5 --silent " ^
blanchet@47038
   302
        e_selection_weight_arguments ctxt heuristic sel_weights ^ " " ^
blanchet@47039
   303
        e_term_order_info_arguments gen_weights gen_prec ord_info ^ " " ^
blanchet@47505
   304
        "--term-ordering=" ^ (if is_lpo then "LPO4" else e_kbo ()) ^ " " ^
blanchet@47038
   305
        "--cpu-limit=" ^ string_of_int (to_secs 2 timeout),
blanchet@42962
   306
   proof_delims = tstp_proof_delims,
blanchet@36265
   307
   known_failures =
blanchet@45203
   308
     [(TimedOut, "Failure: Resource limit exceeded (time)"),
blanchet@47972
   309
      (TimedOut, "time limit exceeded")] @
blanchet@47972
   310
     known_szs_status_failures,
blanchet@47976
   311
   prem_role = Conjecture,
blanchet@42646
   312
   best_slices = fn ctxt =>
blanchet@47038
   313
     let val heuristic = effective_e_selection_heuristic ctxt in
blanchet@43474
   314
       (* FUDGE *)
blanchet@47038
   315
       if heuristic = e_smartN then
blanchet@46449
   316
         [(0.333, (true, ((500, FOF, "mono_tags??", combsN, false), e_fun_weightN))),
blanchet@46449
   317
          (0.334, (true, ((50, FOF, "mono_guards??", combsN, false), e_fun_weightN))),
blanchet@46449
   318
          (0.333, (true, ((1000, FOF, "mono_tags??", combsN, false), e_sym_offset_weightN)))]
blanchet@43473
   319
       else
blanchet@47038
   320
         [(1.0, (true, ((500, FOF, "mono_tags??", combsN, false), heuristic)))]
blanchet@47962
   321
     end,
blanchet@47962
   322
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   323
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@38454
   324
blanchet@47646
   325
val e = (eN, fn () => e_config)
wenzelm@28596
   326
wenzelm@28596
   327
blanchet@44099
   328
(* LEO-II *)
blanchet@44099
   329
blanchet@44754
   330
val leo2_thf0 = THF (TPTP_Monomorphic, TPTP_Explicit, THF_Without_Choice)
blanchet@44754
   331
blanchet@44099
   332
val leo2_config : atp_config =
blanchet@47055
   333
  {exec = (["LEO2_HOME"], "leo"),
blanchet@47055
   334
   required_vars = [],
blanchet@44099
   335
   arguments =
blanchet@47916
   336
     fn _ => fn _ => fn _ => fn timeout => fn _ =>
blanchet@47914
   337
        "--proofoutput 1 --timeout " ^ string_of_int (to_secs 1 timeout),
blanchet@44099
   338
   proof_delims = tstp_proof_delims,
blanchet@45207
   339
   known_failures =
blanchet@47974
   340
     [(TimedOut, "CPU time limit exceeded, terminating"),
blanchet@47972
   341
      (GaveUp, "No.of.Axioms")] @
blanchet@47972
   342
     known_szs_status_failures,
blanchet@47976
   343
   prem_role = Hypothesis,
blanchet@47914
   344
   best_slices =
blanchet@44099
   345
     (* FUDGE *)
blanchet@47962
   346
     K [(1.0, (true, ((20, leo2_thf0, "mono_native_higher", keep_lamsN, false), "")))],
blanchet@47962
   347
   best_max_mono_iters = default_max_mono_iters - 1 (* FUDGE *),
blanchet@47962
   348
   best_max_new_mono_instances = default_max_new_mono_instances div 2 (* FUDGE *)}
blanchet@39491
   349
blanchet@47646
   350
val leo2 = (leo2N, fn () => leo2_config)
blanchet@44099
   351
blanchet@44099
   352
blanchet@44099
   353
(* Satallax *)
blanchet@44099
   354
blanchet@44754
   355
val satallax_thf0 = THF (TPTP_Monomorphic, TPTP_Explicit, THF_With_Choice)
blanchet@44754
   356
blanchet@44099
   357
val satallax_config : atp_config =
blanchet@47055
   358
  {exec = (["SATALLAX_HOME"], "satallax"),
blanchet@47055
   359
   required_vars = [],
blanchet@44099
   360
   arguments =
blanchet@44099
   361
     fn _ => fn _ => fn _ => fn timeout => fn _ =>
blanchet@45162
   362
        "-p hocore -t " ^ string_of_int (to_secs 1 timeout),
blanchet@45162
   363
   proof_delims =
blanchet@45162
   364
     [("% Higher-Order Unsat Core BEGIN", "% Higher-Order Unsat Core END")],
blanchet@45203
   365
   known_failures = known_szs_status_failures,
blanchet@47981
   366
   prem_role = Hypothesis,
blanchet@44416
   367
   best_slices =
blanchet@44754
   368
     (* FUDGE *)
blanchet@47985
   369
     K [(1.0, (true, ((60, satallax_thf0, "mono_native_higher", keep_lamsN, false), "")))],
blanchet@47962
   370
   best_max_mono_iters = default_max_mono_iters - 1 (* FUDGE *),
blanchet@47962
   371
   best_max_new_mono_instances = default_max_new_mono_instances div 2 (* FUDGE *)}
blanchet@44099
   372
blanchet@47646
   373
val satallax = (satallaxN, fn () => satallax_config)
blanchet@44099
   374
blanchet@44099
   375
blanchet@44099
   376
(* SPASS *)
blanchet@42725
   377
blanchet@47055
   378
fun is_new_spass_version () =
blanchet@47055
   379
  string_ord (getenv "SPASS_VERSION", "3.7") = GREATER orelse
blanchet@47055
   380
  getenv "SPASS_NEW_HOME" <> ""
blanchet@47055
   381
blanchet@47055
   382
(* TODO: Legacy: Remove after planned Isabelle2012 release (and don't forget
blanchet@47055
   383
   "required_vars" and "script/spass"). *)
blanchet@47055
   384
val spass_old_config : atp_config =
blanchet@47055
   385
  {exec = (["ISABELLE_ATP"], "scripts/spass"),
blanchet@47949
   386
   required_vars = [["SPASS_HOME"]],
blanchet@43569
   387
   arguments = fn _ => fn _ => fn sos => fn timeout => fn _ =>
blanchet@37962
   388
     ("-Auto -PGiven=0 -PProblem=0 -Splits=0 -FullRed=0 -DocProof \
blanchet@43981
   389
      \-VarWeight=3 -TimeLimit=" ^ string_of_int (to_secs 1 timeout))
blanchet@43473
   390
     |> sos = sosN ? prefix "-SOS=1 ",
blanchet@36369
   391
   proof_delims = [("Here is a proof", "Formulae used in the proof")],
blanchet@36289
   392
   known_failures =
blanchet@47950
   393
     [(OldSPASS, "SPASS V 3.5"),
blanchet@47950
   394
      (OldSPASS, "SPASS V 3.7"),
blanchet@47950
   395
      (GaveUp, "SPASS beiseite: Completion found"),
blanchet@36370
   396
      (TimedOut, "SPASS beiseite: Ran out of time"),
blanchet@36965
   397
      (OutOfResources, "SPASS beiseite: Maximal number of loops exceeded"),
blanchet@37413
   398
      (MalformedInput, "Undefined symbol"),
blanchet@37414
   399
      (MalformedInput, "Free Variable"),
blanchet@44391
   400
      (Unprovable, "No formulae and clauses found in input file"),
blanchet@47972
   401
      (InternalError, "Please report this error")] @
blanchet@47972
   402
      known_perl_failures,
blanchet@47976
   403
   prem_role = Conjecture,
blanchet@42725
   404
   best_slices = fn ctxt =>
blanchet@42723
   405
     (* FUDGE *)
blanchet@46449
   406
     [(0.333, (false, ((150, DFG DFG_Unsorted, "mono_tags??", liftingN, false), sosN))),
blanchet@46449
   407
      (0.333, (false, ((300, DFG DFG_Unsorted, "poly_tags??", liftingN, false), sosN))),
blanchet@46449
   408
      (0.334, (false, ((50, DFG DFG_Unsorted, "mono_tags??", liftingN, false), no_sosN)))]
blanchet@47962
   409
     |> (if Config.get ctxt force_sos then hd #> apfst (K 1.0) #> single else I),
blanchet@47962
   410
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   411
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@38454
   412
blanchet@47149
   413
val spass_new_H1SOS = "-Heuristic=1 -SOS"
blanchet@47955
   414
val spass_new_H2LR0LT0 = "-Heuristic=2 -LR=0 -LT=0"
blanchet@46455
   415
val spass_new_H2SOS = "-Heuristic=2 -SOS"
blanchet@46455
   416
val spass_new_H2NuVS0 = "-Heuristic=2 -RNuV=1 -Sorts=0"
blanchet@46455
   417
val spass_new_H2NuVS0Red2 =
blanchet@46455
   418
  "-Heuristic=2 -RNuV=1 -Sorts=0 -RFRew=2 -RBRew=2 -RTaut=2"
blanchet@46449
   419
blanchet@45301
   420
val spass_new_config : atp_config =
blanchet@47055
   421
  {exec = (["SPASS_NEW_HOME", "SPASS_HOME"], "SPASS"),
blanchet@47055
   422
   required_vars = [],
blanchet@46444
   423
   arguments = fn _ => fn _ => fn extra_options => fn timeout => fn _ =>
blanchet@46429
   424
     ("-Isabelle=1 -TimeLimit=" ^ string_of_int (to_secs 1 timeout))
blanchet@46444
   425
     |> extra_options <> "" ? prefix (extra_options ^ " "),
blanchet@47055
   426
   proof_delims = #proof_delims spass_old_config,
blanchet@47055
   427
   known_failures = #known_failures spass_old_config,
blanchet@47976
   428
   prem_role = #prem_role spass_old_config,
blanchet@46381
   429
   best_slices = fn _ =>
blanchet@45301
   430
     (* FUDGE *)
blanchet@46455
   431
     [(0.1667, (false, ((150, DFG DFG_Sorted, "mono_native", combsN, true), ""))),
blanchet@46455
   432
      (0.1667, (false, ((500, DFG DFG_Sorted, "mono_native", liftingN, true), spass_new_H2SOS))),
blanchet@47955
   433
      (0.1666, (false, ((50, DFG DFG_Sorted,  "mono_native", liftingN, true), spass_new_H2LR0LT0))),
blanchet@46455
   434
      (0.1000, (false, ((250, DFG DFG_Sorted, "mono_native", combsN, true), spass_new_H2NuVS0))),
blanchet@47149
   435
      (0.1000, (false, ((1000, DFG DFG_Sorted, "mono_native", liftingN, true), spass_new_H1SOS))),
blanchet@46455
   436
      (0.1000, (false, ((150, DFG DFG_Sorted, "poly_guards??", liftingN, false), spass_new_H2NuVS0Red2))),
blanchet@47931
   437
      (0.1000, (false, ((300, DFG DFG_Sorted, "mono_native", combsN, true), spass_new_H2SOS))),
blanchet@47962
   438
      (0.1000, (false, ((100, DFG DFG_Sorted, "mono_native", combs_and_liftingN, true), spass_new_H2NuVS0)))],
blanchet@47962
   439
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   440
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@45301
   441
blanchet@47606
   442
val spass =
blanchet@47606
   443
  (spassN, fn () => if is_new_spass_version () then spass_new_config
blanchet@47606
   444
                    else spass_old_config)
blanchet@38454
   445
blanchet@37509
   446
(* Vampire *)
blanchet@37509
   447
blanchet@44507
   448
(* Vampire 1.8 has TFF support, but it's buggy and therefore disabled on
blanchet@44507
   449
   SystemOnTPTP. *)
blanchet@47055
   450
fun is_new_vampire_version () =
blanchet@47055
   451
  string_ord (getenv "VAMPIRE_VERSION", "1.8") = GREATER
blanchet@44420
   452
blanchet@44754
   453
val vampire_tff0 = TFF (TPTP_Monomorphic, TPTP_Implicit)
blanchet@44589
   454
blanchet@40059
   455
val vampire_config : atp_config =
blanchet@47055
   456
  {exec = (["VAMPIRE_HOME"], "vampire"),
blanchet@47055
   457
   required_vars = [],
blanchet@43569
   458
   arguments = fn _ => fn _ => fn sos => fn timeout => fn _ =>
blanchet@44417
   459
     "--mode casc -t " ^ string_of_int (to_secs 1 timeout) ^
blanchet@45234
   460
     " --proof tptp --output_axiom_names on\
blanchet@45234
   461
     \ --forced_options propositional_to_bdd=off\
blanchet@44417
   462
     \ --thanks \"Andrei and Krystof\" --input_file"
blanchet@43473
   463
     |> sos = sosN ? prefix "--sos on ",
blanchet@37509
   464
   proof_delims =
blanchet@37509
   465
     [("=========== Refutation ==========",
blanchet@37509
   466
       "======= End of refutation ======="),
blanchet@38033
   467
      ("% SZS output start Refutation", "% SZS output end Refutation"),
blanchet@38033
   468
      ("% SZS output start Proof", "% SZS output end Proof")],
blanchet@37509
   469
   known_failures =
blanchet@43050
   470
     [(GaveUp, "UNPROVABLE"),
blanchet@43050
   471
      (GaveUp, "CANNOT PROVE"),
blanchet@37509
   472
      (Unprovable, "Satisfiability detected"),
blanchet@38647
   473
      (Unprovable, "Termination reason: Satisfiable"),
blanchet@47972
   474
      (Interrupted, "Aborted by signal SIGINT")] @
blanchet@47972
   475
     known_szs_status_failures,
blanchet@47976
   476
   prem_role = Conjecture,
blanchet@42725
   477
   best_slices = fn ctxt =>
blanchet@42723
   478
     (* FUDGE *)
blanchet@47055
   479
     (if is_new_vampire_version () then
blanchet@47948
   480
        [(0.333, (false, ((500, vampire_tff0, "mono_native", combs_or_liftingN, false), sosN))),
blanchet@47948
   481
         (0.333, (false, ((150, vampire_tff0, "poly_guards??", combs_or_liftingN, false), sosN))),
blanchet@47055
   482
         (0.334, (true, ((50, vampire_tff0, "mono_native", combs_or_liftingN, false), no_sosN)))]
blanchet@47055
   483
      else
blanchet@46449
   484
        [(0.333, (false, ((150, FOF, "poly_guards??", combs_or_liftingN, false), sosN))),
blanchet@46449
   485
         (0.333, (false, ((500, FOF, "mono_tags??", combs_or_liftingN, false), sosN))),
blanchet@47055
   486
         (0.334, (true, ((50, FOF, "mono_guards??", combs_or_liftingN, false), no_sosN)))])
blanchet@44099
   487
     |> (if Config.get ctxt force_sos then hd #> apfst (K 1.0) #> single
blanchet@47962
   488
         else I),
blanchet@47962
   489
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   490
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@38454
   491
blanchet@47646
   492
val vampire = (vampireN, fn () => vampire_config)
blanchet@37509
   493
blanchet@38454
   494
blanchet@41740
   495
(* Z3 with TPTP syntax *)
blanchet@41740
   496
blanchet@44754
   497
val z3_tff0 = TFF (TPTP_Monomorphic, TPTP_Implicit)
blanchet@44589
   498
blanchet@44423
   499
val z3_tptp_config : atp_config =
blanchet@47055
   500
  {exec = (["Z3_HOME"], "z3"),
blanchet@47055
   501
   required_vars = [],
blanchet@43354
   502
   arguments = fn _ => fn _ => fn _ => fn timeout => fn _ =>
blanchet@44420
   503
     "MBQI=true -tptp -t:" ^ string_of_int (to_secs 1 timeout),
blanchet@41740
   504
   proof_delims = [],
blanchet@45203
   505
   known_failures = known_szs_status_failures,
blanchet@47976
   506
   prem_role = Hypothesis,
blanchet@42723
   507
   best_slices =
blanchet@44423
   508
     (* FUDGE *)
blanchet@46435
   509
     K [(0.5, (false, ((250, z3_tff0, "mono_native", combsN, false), ""))),
blanchet@46435
   510
        (0.25, (false, ((125, z3_tff0, "mono_native", combsN, false), ""))),
blanchet@46435
   511
        (0.125, (false, ((62, z3_tff0, "mono_native", combsN, false), ""))),
blanchet@47962
   512
        (0.125, (false, ((31, z3_tff0, "mono_native", combsN, false), "")))],
blanchet@47962
   513
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   514
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@41740
   515
blanchet@47646
   516
val z3_tptp = (z3_tptpN, fn () => z3_tptp_config)
blanchet@41740
   517
blanchet@44590
   518
blanchet@44754
   519
(* Not really a prover: Experimental Polymorphic TFF and THF output *)
blanchet@44590
   520
blanchet@44754
   521
fun dummy_config format type_enc : atp_config =
blanchet@47055
   522
  {exec = (["ISABELLE_ATP"], "scripts/dummy_atp"),
blanchet@47055
   523
   required_vars = [],
blanchet@44590
   524
   arguments = K (K (K (K (K "")))),
blanchet@44590
   525
   proof_delims = [],
blanchet@45203
   526
   known_failures = known_szs_status_failures,
blanchet@47976
   527
   prem_role = Hypothesis,
blanchet@45521
   528
   best_slices =
blanchet@46407
   529
     K [(1.0, (false, ((200, format, type_enc,
blanchet@46407
   530
                        if is_format_higher_order format then keep_lamsN
blanchet@47962
   531
                        else combsN, false), "")))],
blanchet@47962
   532
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   533
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@44590
   534
blanchet@45365
   535
val dummy_thf_format = THF (TPTP_Polymorphic, TPTP_Explicit, THF_With_Choice)
blanchet@46435
   536
val dummy_thf_config = dummy_config dummy_thf_format "poly_native_higher"
blanchet@47646
   537
val dummy_thf = (dummy_thfN, fn () => dummy_thf_config)
blanchet@44754
   538
blanchet@41740
   539
blanchet@40059
   540
(* Remote ATP invocation via SystemOnTPTP *)
wenzelm@28596
   541
blanchet@38061
   542
val systems = Synchronized.var "atp_systems" ([] : string list)
immler@31835
   543
immler@31835
   544
fun get_systems () =
blanchet@44589
   545
  case Isabelle_System.bash_output
blanchet@44589
   546
           "\"$ISABELLE_ATP/scripts/remote_atp\" -w 2>&1" of
blanchet@39491
   547
    (output, 0) => split_lines output
blanchet@39491
   548
  | (output, _) =>
blanchet@39491
   549
    error (case extract_known_failure known_perl_failures output of
blanchet@41744
   550
             SOME failure => string_for_failure failure
wenzelm@47499
   551
           | NONE => trim_line output ^ ".")
immler@31835
   552
blanchet@42537
   553
fun find_system name [] systems =
blanchet@42537
   554
    find_first (String.isPrefix (name ^ "---")) systems
blanchet@38690
   555
  | find_system name (version :: versions) systems =
blanchet@38690
   556
    case find_first (String.isPrefix (name ^ "---" ^ version)) systems of
blanchet@38690
   557
      NONE => find_system name versions systems
blanchet@38690
   558
    | res => res
blanchet@38690
   559
blanchet@38690
   560
fun get_system name versions =
blanchet@38589
   561
  Synchronized.change_result systems
blanchet@38589
   562
      (fn systems => (if null systems then get_systems () else systems)
blanchet@42955
   563
                     |> `(`(find_system name versions)))
boehmes@32864
   564
blanchet@38690
   565
fun the_system name versions =
blanchet@38690
   566
  case get_system name versions of
blanchet@42955
   567
    (SOME sys, _) => sys
blanchet@46480
   568
  | (NONE, []) => error ("SystemOnTPTP is not available.")
blanchet@42955
   569
  | (NONE, syss) =>
blanchet@46480
   570
    case syss |> filter_out (String.isPrefix "%")
blanchet@46480
   571
              |> filter_out (curry (op =) "") of
blanchet@46480
   572
      [] => error ("SystemOnTPTP is not available.")
blanchet@46480
   573
    | [msg] => error ("SystemOnTPTP is not available: " ^ msg ^ ".")
blanchet@46480
   574
    | syss =>
blanchet@46480
   575
      error ("System " ^ quote name ^ " is not available at SystemOnTPTP.\n" ^
blanchet@46480
   576
             "(Available systems: " ^ commas_quote syss ^ ".)")
immler@31835
   577
blanchet@41148
   578
val max_remote_secs = 240 (* give Geoff Sutcliffe's servers a break *)
blanchet@41148
   579
blanchet@38690
   580
fun remote_config system_name system_versions proof_delims known_failures
blanchet@47976
   581
                  prem_role best_slice : atp_config =
blanchet@47055
   582
  {exec = (["ISABELLE_ATP"], "scripts/remote_atp"),
blanchet@47055
   583
   required_vars = [],
blanchet@47074
   584
   arguments = fn _ => fn _ => fn command => fn timeout => fn _ =>
blanchet@47074
   585
     (if command <> "" then "-c " ^ quote command ^ " " else "") ^
blanchet@47074
   586
     "-s " ^ the_system system_name system_versions ^ " " ^
blanchet@47074
   587
     "-t " ^ string_of_int (Int.min (max_remote_secs, to_secs 1 timeout)),
blanchet@42962
   588
   proof_delims = union (op =) tstp_proof_delims proof_delims,
blanchet@45203
   589
   known_failures = known_failures @ known_perl_failures @ known_says_failures,
blanchet@47976
   590
   prem_role = prem_role,
blanchet@47962
   591
   best_slices = fn ctxt => [(1.0, (false, best_slice ctxt))],
blanchet@47962
   592
   best_max_mono_iters = default_max_mono_iters,
blanchet@47962
   593
   best_max_new_mono_instances = default_max_new_mono_instances}
blanchet@42443
   594
blanchet@43500
   595
fun remotify_config system_name system_versions best_slice
blanchet@47976
   596
        ({proof_delims, known_failures, prem_role, ...} : atp_config)
blanchet@47912
   597
        : atp_config =
blanchet@38690
   598
  remote_config system_name system_versions proof_delims known_failures
blanchet@47976
   599
                prem_role best_slice
blanchet@38023
   600
blanchet@40059
   601
fun remote_atp name system_name system_versions proof_delims known_failures
blanchet@47976
   602
               prem_role best_slice =
blanchet@40060
   603
  (remote_prefix ^ name,
blanchet@47912
   604
   fn () => remote_config system_name system_versions proof_delims
blanchet@47976
   605
                          known_failures prem_role best_slice)
blanchet@43500
   606
fun remotify_atp (name, config) system_name system_versions best_slice =
blanchet@43500
   607
  (remote_prefix ^ name,
blanchet@47606
   608
   remotify_config system_name system_versions best_slice o config)
wenzelm@28592
   609
blanchet@44754
   610
val explicit_tff0 = TFF (TPTP_Monomorphic, TPTP_Explicit)
blanchet@44589
   611
blanchet@43500
   612
val remote_e =
blanchet@43500
   613
  remotify_atp e "EP" ["1.0", "1.1", "1.2"]
blanchet@47074
   614
      (K ((750, FOF, "mono_tags??", combsN, false), "") (* FUDGE *))
blanchet@44099
   615
val remote_leo2 =
blanchet@44099
   616
  remotify_atp leo2 "LEO-II" ["1.2.8", "1.2.6"]
blanchet@47074
   617
      (K ((100, leo2_thf0, "mono_native_higher", liftingN, false), "") (* FUDGE *))
blanchet@44099
   618
val remote_satallax =
blanchet@47074
   619
  remotify_atp satallax "Satallax" ["2.3", "2.2", "2"]
blanchet@47076
   620
      (K ((100, satallax_thf0, "mono_native_higher", keep_lamsN, false), "") (* FUDGE *))
blanchet@43500
   621
val remote_vampire =
blanchet@44499
   622
  remotify_atp vampire "Vampire" ["1.8"]
blanchet@47074
   623
      (K ((250, vampire_tff0, "mono_native", combs_or_liftingN, false), "") (* FUDGE *))
blanchet@44423
   624
val remote_z3_tptp =
blanchet@44754
   625
  remotify_atp z3_tptp "Z3" ["3.0"]
blanchet@47074
   626
      (K ((250, z3_tff0, "mono_native", combsN, false), "") (* FUDGE *))
blanchet@44092
   627
val remote_e_sine =
blanchet@47912
   628
  remote_atp e_sineN "SInE" ["0.4"] [] (#known_failures e_config) Conjecture
blanchet@47074
   629
      (K ((500, FOF, "mono_guards??", combsN, false), "") (* FUDGE *))
blanchet@45338
   630
val remote_iprover =
blanchet@47912
   631
  remote_atp iproverN "iProver" [] [] [] Conjecture
blanchet@47074
   632
      (K ((150, FOF, "mono_guards??", liftingN, false), "") (* FUDGE *))
blanchet@45338
   633
val remote_iprover_eq =
blanchet@47912
   634
  remote_atp iprover_eqN "iProver-Eq" [] [] [] Conjecture
blanchet@47074
   635
      (K ((150, FOF, "mono_guards??", liftingN, false), "") (* FUDGE *))
blanchet@41740
   636
val remote_snark =
blanchet@42939
   637
  remote_atp snarkN "SNARK" ["20080805r029", "20080805r024"]
blanchet@47912
   638
      [("refutation.", "end_refutation.")] [] Hypothesis
blanchet@47074
   639
      (K ((100, explicit_tff0, "mono_native", liftingN, false), "") (* FUDGE *))
blanchet@44092
   640
val remote_e_tofof =
blanchet@47912
   641
  remote_atp e_tofofN "ToFoF" ["0.1"] [] (#known_failures e_config) Hypothesis
blanchet@47074
   642
      (K ((150, explicit_tff0, "mono_native", liftingN, false), "") (* FUDGE *))
blanchet@42938
   643
val remote_waldmeister =
blanchet@42938
   644
  remote_atp waldmeisterN "Waldmeister" ["710"]
blanchet@45521
   645
      [("#START OF PROOF", "Proved Goals:")]
blanchet@45521
   646
      [(OutOfResources, "Too many function symbols"),
blanchet@47506
   647
       (Inappropriate, "****  Unexpected end of file."),
blanchet@45521
   648
       (Crashed, "Unrecoverable Segmentation Fault")]
blanchet@47912
   649
      Hypothesis
blanchet@47898
   650
      (K ((50, CNF_UEQ, "raw_mono_tags??", combsN, false), "") (* FUDGE *))
blanchet@38454
   651
blanchet@38454
   652
(* Setup *)
blanchet@38454
   653
blanchet@40059
   654
fun add_atp (name, config) thy =
blanchet@40059
   655
  Data.map (Symtab.update_new (name, (config, stamp ()))) thy
blanchet@40059
   656
  handle Symtab.DUP name => error ("Duplicate ATP: " ^ quote name ^ ".")
blanchet@40059
   657
blanchet@40059
   658
fun get_atp thy name =
blanchet@40059
   659
  the (Symtab.lookup (Data.get thy) name) |> fst
blanchet@40059
   660
  handle Option.Option => error ("Unknown ATP: " ^ name ^ ".")
blanchet@40059
   661
blanchet@41727
   662
val supported_atps = Symtab.keys o Data.get
blanchet@36371
   663
blanchet@40059
   664
fun is_atp_installed thy name =
blanchet@47606
   665
  let val {exec, required_vars, ...} = get_atp thy name () in
blanchet@47055
   666
    forall (exists (fn var => getenv var <> "")) (fst exec :: required_vars)
blanchet@40059
   667
  end
blanchet@36371
   668
blanchet@40059
   669
fun refresh_systems_on_tptp () =
blanchet@40059
   670
  Synchronized.change systems (fn _ => get_systems ())
blanchet@40059
   671
blanchet@47055
   672
fun effective_term_order ctxt atp =
blanchet@47055
   673
  let val ord = Config.get ctxt term_order in
blanchet@47055
   674
    if ord = smartN then
blanchet@47949
   675
      if atp = spassN andalso is_new_spass_version () then
blanchet@47073
   676
        {is_lpo = false, gen_weights = true, gen_prec = true, gen_simp = false}
blanchet@47055
   677
      else
blanchet@47055
   678
        {is_lpo = false, gen_weights = false, gen_prec = false,
blanchet@47055
   679
         gen_simp = false}
blanchet@47055
   680
    else
blanchet@47055
   681
      let val is_lpo = String.isSubstring lpoN ord in
blanchet@47055
   682
        {is_lpo = is_lpo,
blanchet@47055
   683
         gen_weights = not is_lpo andalso String.isSubstring xweightsN ord,
blanchet@47055
   684
         gen_prec = String.isSubstring xprecN ord,
blanchet@47055
   685
         gen_simp = String.isSubstring xsimpN ord}
blanchet@47055
   686
      end
blanchet@47055
   687
  end
blanchet@47055
   688
blanchet@47606
   689
val atps=
blanchet@47949
   690
  [alt_ergo, e, leo2, dummy_thf, satallax, spass, vampire, z3_tptp, remote_e,
blanchet@47949
   691
   remote_e_sine, remote_e_tofof, remote_iprover, remote_iprover_eq,
blanchet@47949
   692
   remote_leo2, remote_satallax, remote_vampire, remote_z3_tptp, remote_snark,
blanchet@47949
   693
   remote_waldmeister]
blanchet@47055
   694
blanchet@47606
   695
val setup = fold add_atp atps
blanchet@35867
   696
wenzelm@28592
   697
end;