10 type failure = ATP_Proof.failure |
10 type failure = ATP_Proof.failure |
11 |
11 |
12 type atp_config = |
12 type atp_config = |
13 {exec: string * string, |
13 {exec: string * string, |
14 required_execs: (string * string) list, |
14 required_execs: (string * string) list, |
15 arguments: bool -> Time.time -> string, |
15 arguments: bool -> Time.time -> (unit -> (string * real) list) -> string, |
16 has_incomplete_mode: bool, |
16 has_incomplete_mode: bool, |
17 proof_delims: (string * string) list, |
17 proof_delims: (string * string) list, |
18 known_failures: (failure * string) list, |
18 known_failures: (failure * string) list, |
19 default_max_relevant: int, |
19 default_max_relevant: int, |
20 explicit_forall: bool, |
20 explicit_forall: bool, |
21 use_conjecture_for_hypotheses: bool} |
21 use_conjecture_for_hypotheses: bool} |
|
22 |
|
23 (* for experimentation purposes -- do not use in production code *) |
|
24 val e_generate_weights : bool Unsynchronized.ref |
|
25 val e_weight_factor : real Unsynchronized.ref |
|
26 val e_default_weight : real Unsynchronized.ref |
22 |
27 |
23 val eN : string |
28 val eN : string |
24 val spassN : string |
29 val spassN : string |
25 val vampireN : string |
30 val vampireN : string |
26 val sine_eN : string |
31 val sine_eN : string |
42 (* ATP configuration *) |
47 (* ATP configuration *) |
43 |
48 |
44 type atp_config = |
49 type atp_config = |
45 {exec: string * string, |
50 {exec: string * string, |
46 required_execs: (string * string) list, |
51 required_execs: (string * string) list, |
47 arguments: bool -> Time.time -> string, |
52 arguments: bool -> Time.time -> (unit -> (string * real) list) -> string, |
48 has_incomplete_mode: bool, |
53 has_incomplete_mode: bool, |
49 proof_delims: (string * string) list, |
54 proof_delims: (string * string) list, |
50 known_failures: (failure * string) list, |
55 known_failures: (failure * string) list, |
51 default_max_relevant: int, |
56 default_max_relevant: int, |
52 explicit_forall: bool, |
57 explicit_forall: bool, |
92 else 1000 |
97 else 1000 |
93 |
98 |
94 val tstp_proof_delims = |
99 val tstp_proof_delims = |
95 ("# SZS output start CNFRefutation.", "# SZS output end CNFRefutation") |
100 ("# SZS output start CNFRefutation.", "# SZS output end CNFRefutation") |
96 |
101 |
|
102 val e_generate_weights = Unsynchronized.ref false |
|
103 val e_weight_factor = Unsynchronized.ref 4.0 |
|
104 val e_default_weight = Unsynchronized.ref 0.5 |
|
105 |
|
106 fun e_weights weights = |
|
107 if !e_generate_weights then |
|
108 "(1*FunWeight(ConstPrio," ^ |
|
109 string_of_int (Real.ceil (!e_default_weight * !e_weight_factor)) ^ |
|
110 ",1,1.5,1.5,1.5" ^ |
|
111 (weights () |
|
112 |> map (fn (s, w) => "," ^ s ^ ":" ^ |
|
113 string_of_int (Real.ceil (w * !e_weight_factor))) |
|
114 |> implode) ^ ")+5*AutoDev)" |
|
115 else |
|
116 "AutoDev" |
|
117 |
97 val e_config : atp_config = |
118 val e_config : atp_config = |
98 {exec = ("E_HOME", "eproof"), |
119 {exec = ("E_HOME", "eproof"), |
99 required_execs = [], |
120 required_execs = [], |
100 arguments = fn _ => fn timeout => |
121 arguments = fn _ => fn timeout => fn weights => |
101 "--tstp-in --tstp-out -l5 -xAutoDev -tAutoDev --silent \ |
122 "--tstp-in --tstp-out -l5 -x'" ^ e_weights weights ^ "' -tAutoDev \ |
102 \--cpu-limit=" ^ string_of_int (to_secs (e_bonus ()) timeout), |
123 \--silent --cpu-limit=" ^ string_of_int (to_secs (e_bonus ()) timeout), |
103 has_incomplete_mode = false, |
124 has_incomplete_mode = false, |
104 proof_delims = [tstp_proof_delims], |
125 proof_delims = [tstp_proof_delims], |
105 known_failures = |
126 known_failures = |
106 [(Unprovable, "SZS status: CounterSatisfiable"), |
127 [(Unprovable, "SZS status: CounterSatisfiable"), |
107 (Unprovable, "SZS status CounterSatisfiable"), |
128 (Unprovable, "SZS status CounterSatisfiable"), |
123 (* The "-VarWeight=3" option helps the higher-order problems, probably by |
144 (* The "-VarWeight=3" option helps the higher-order problems, probably by |
124 counteracting the presence of "hAPP". *) |
145 counteracting the presence of "hAPP". *) |
125 val spass_config : atp_config = |
146 val spass_config : atp_config = |
126 {exec = ("ISABELLE_ATP", "scripts/spass"), |
147 {exec = ("ISABELLE_ATP", "scripts/spass"), |
127 required_execs = [("SPASS_HOME", "SPASS"), ("SPASS_HOME", "tptp2dfg")], |
148 required_execs = [("SPASS_HOME", "SPASS"), ("SPASS_HOME", "tptp2dfg")], |
128 arguments = fn complete => fn timeout => |
149 arguments = fn complete => fn timeout => fn _ => |
129 ("-Auto -PGiven=0 -PProblem=0 -Splits=0 -FullRed=0 -DocProof \ |
150 ("-Auto -PGiven=0 -PProblem=0 -Splits=0 -FullRed=0 -DocProof \ |
130 \-VarWeight=3 -TimeLimit=" ^ string_of_int (to_secs 0 timeout)) |
151 \-VarWeight=3 -TimeLimit=" ^ string_of_int (to_secs 0 timeout)) |
131 |> not complete ? prefix "-SOS=1 ", |
152 |> not complete ? prefix "-SOS=1 ", |
132 has_incomplete_mode = true, |
153 has_incomplete_mode = true, |
133 proof_delims = [("Here is a proof", "Formulae used in the proof")], |
154 proof_delims = [("Here is a proof", "Formulae used in the proof")], |
150 (* Vampire *) |
171 (* Vampire *) |
151 |
172 |
152 val vampire_config : atp_config = |
173 val vampire_config : atp_config = |
153 {exec = ("VAMPIRE_HOME", "vampire"), |
174 {exec = ("VAMPIRE_HOME", "vampire"), |
154 required_execs = [], |
175 required_execs = [], |
155 arguments = fn complete => fn timeout => |
176 arguments = fn complete => fn timeout => fn _ => |
156 (* This would work too but it's less tested: "--proof tptp " ^ *) |
177 (* This would work too but it's less tested: "--proof tptp " ^ *) |
157 "--mode casc -t " ^ string_of_int (to_secs 0 timeout) ^ |
178 "--mode casc -t " ^ string_of_int (to_secs 0 timeout) ^ |
158 " --thanks \"Andrei and Krystof\" --input_file" |
179 " --thanks \"Andrei and Krystof\" --input_file" |
159 |> not complete ? prefix "--sos on ", |
180 |> not complete ? prefix "--sos on ", |
160 has_incomplete_mode = true, |
181 has_incomplete_mode = true, |
212 fun remote_config system_name system_versions proof_delims known_failures |
233 fun remote_config system_name system_versions proof_delims known_failures |
213 default_max_relevant use_conjecture_for_hypotheses |
234 default_max_relevant use_conjecture_for_hypotheses |
214 : atp_config = |
235 : atp_config = |
215 {exec = ("ISABELLE_ATP", "scripts/remote_atp"), |
236 {exec = ("ISABELLE_ATP", "scripts/remote_atp"), |
216 required_execs = [], |
237 required_execs = [], |
217 arguments = fn _ => fn timeout => |
238 arguments = fn _ => fn timeout => fn _ => |
218 " -t " ^ string_of_int (Int.min (max_remote_secs, (to_secs 0 timeout))) |
239 " -t " ^ string_of_int (Int.min (max_remote_secs, (to_secs 0 timeout))) |
219 ^ " -s " ^ the_system system_name system_versions, |
240 ^ " -s " ^ the_system system_name system_versions, |
220 has_incomplete_mode = false, |
241 has_incomplete_mode = false, |
221 proof_delims = insert (op =) tstp_proof_delims proof_delims, |
242 proof_delims = insert (op =) tstp_proof_delims proof_delims, |
222 known_failures = |
243 known_failures = |