equal
deleted
inserted
replaced
22 val metis_systematic_type_tag : string |
22 val metis_systematic_type_tag : string |
23 val metis_ad_hoc_type_tag : string |
23 val metis_ad_hoc_type_tag : string |
24 val metis_generated_var_prefix : string |
24 val metis_generated_var_prefix : string |
25 val trace : bool Config.T |
25 val trace : bool Config.T |
26 val verbose : bool Config.T |
26 val verbose : bool Config.T |
27 val lambda_trans : string Config.T |
|
28 val trace_msg : Proof.context -> (unit -> string) -> unit |
27 val trace_msg : Proof.context -> (unit -> string) -> unit |
29 val verbose_warning : Proof.context -> string -> unit |
28 val verbose_warning : Proof.context -> string -> unit |
30 val metis_name_table : ((string * int) * ((type_enc -> string) * bool)) list |
29 val metis_name_table : ((string * int) * ((type_enc -> string) * bool)) list |
31 val reveal_old_skolem_terms : (string * term) list -> term -> term |
30 val reveal_old_skolem_terms : (string * term) list -> term -> term |
32 val reveal_lambda_lifted : (string * term) list -> term -> term |
31 val reveal_lambda_lifted : (string * term) list -> term -> term |
50 val metis_ad_hoc_type_tag = "**" |
49 val metis_ad_hoc_type_tag = "**" |
51 val metis_generated_var_prefix = "_" |
50 val metis_generated_var_prefix = "_" |
52 |
51 |
53 val trace = Attrib.setup_config_bool @{binding metis_trace} (K false) |
52 val trace = Attrib.setup_config_bool @{binding metis_trace} (K false) |
54 val verbose = Attrib.setup_config_bool @{binding metis_verbose} (K true) |
53 val verbose = Attrib.setup_config_bool @{binding metis_verbose} (K true) |
55 val lambda_trans = |
|
56 Attrib.setup_config_string @{binding metis_lambda_trans} (K combinatorsN) |
|
57 |
54 |
58 fun trace_msg ctxt msg = if Config.get ctxt trace then tracing (msg ()) else () |
55 fun trace_msg ctxt msg = if Config.get ctxt trace then tracing (msg ()) else () |
59 fun verbose_warning ctxt msg = |
56 fun verbose_warning ctxt msg = |
60 if Config.get ctxt verbose then warning ("Metis: " ^ msg) else () |
57 if Config.get ctxt verbose then warning ("Metis: " ^ msg) else () |
61 |
58 |
200 | NONE => TrueI |> Isa_Raw |> some |
197 | NONE => TrueI |> Isa_Raw |> some |
201 end |
198 end |
202 | metis_axiom_from_atp _ _ _ = raise Fail "not CNF -- expected formula" |
199 | metis_axiom_from_atp _ _ _ = raise Fail "not CNF -- expected formula" |
203 |
200 |
204 (* Function to generate metis clauses, including comb and type clauses *) |
201 (* Function to generate metis clauses, including comb and type clauses *) |
205 fun prepare_metis_problem ctxt type_enc lambda_trans conj_clauses fact_clauses = |
202 fun prepare_metis_problem ctxt type_enc lam_trans conj_clauses fact_clauses = |
206 let |
203 let |
207 val (conj_clauses, fact_clauses) = |
204 val (conj_clauses, fact_clauses) = |
208 if polymorphism_of_type_enc type_enc = Polymorphic then |
205 if polymorphism_of_type_enc type_enc = Polymorphic then |
209 (conj_clauses, fact_clauses) |
206 (conj_clauses, fact_clauses) |
210 else |
207 else |
230 (* |
227 (* |
231 val _ = |
228 val _ = |
232 tracing ("PROPS:\n" ^ |
229 tracing ("PROPS:\n" ^ |
233 cat_lines (map (Syntax.string_of_term ctxt o snd) props)) |
230 cat_lines (map (Syntax.string_of_term ctxt o snd) props)) |
234 *) |
231 *) |
235 val lambda_trans = |
232 val lam_trans = if lam_trans = combinatorsN then no_lamsN else lam_trans |
236 if lambda_trans = combinatorsN then no_lamsN else lambda_trans |
|
237 val (atp_problem, _, _, _, _, _, lifted, sym_tab) = |
233 val (atp_problem, _, _, _, _, _, lifted, sym_tab) = |
238 prepare_atp_problem ctxt CNF Hypothesis Axiom type_enc false lambda_trans |
234 prepare_atp_problem ctxt CNF Hypothesis Axiom type_enc false lam_trans |
239 false false [] @{prop False} props |
235 false false [] @{prop False} props |
240 (* |
236 (* |
241 val _ = tracing ("ATP PROBLEM: " ^ |
237 val _ = tracing ("ATP PROBLEM: " ^ |
242 cat_lines (lines_for_atp_problem CNF atp_problem)) |
238 cat_lines (lines_for_atp_problem CNF atp_problem)) |
243 *) |
239 *) |