equal
deleted
inserted
replaced
5 Import TPTP problems as Isabelle terms or goals. |
5 Import TPTP problems as Isabelle terms or goals. |
6 *) |
6 *) |
7 |
7 |
8 signature ATP_PROBLEM_IMPORT = |
8 signature ATP_PROBLEM_IMPORT = |
9 sig |
9 sig |
10 val isabelle_tptp_file : int -> string -> unit |
|
11 val nitpick_tptp_file : int -> string -> unit |
10 val nitpick_tptp_file : int -> string -> unit |
12 val refute_tptp_file : int -> string -> unit |
11 val refute_tptp_file : int -> string -> unit |
13 val sledgehammer_tptp_file : int -> string -> unit |
12 val sledgehammer_tptp_file : int -> string -> unit |
|
13 val isabelle_tptp_file : int -> string -> unit |
14 val translate_tptp_file : string -> string -> string -> unit |
14 val translate_tptp_file : string -> string -> string -> unit |
15 end; |
15 end; |
16 |
16 |
17 structure ATP_Problem_Import : ATP_PROBLEM_IMPORT = |
17 structure ATP_Problem_Import : ATP_PROBLEM_IMPORT = |
18 struct |
18 struct |
46 ||> List.partition (has_role TPTP_Syntax.Role_Definition) |
46 ||> List.partition (has_role TPTP_Syntax.Role_Definition) |
47 in |
47 in |
48 (map get_prop conjs, pairself (map get_prop) defs_and_nondefs, |
48 (map get_prop conjs, pairself (map get_prop) defs_and_nondefs, |
49 Theory.checkpoint thy) |
49 Theory.checkpoint thy) |
50 end |
50 end |
51 |
|
52 (** Isabelle (combination of provers) **) |
|
53 |
|
54 fun isabelle_tptp_file timeout file_name = () |
|
55 |
|
56 |
51 |
57 (** Nitpick (alias Nitrox) **) |
52 (** Nitpick (alias Nitrox) **) |
58 |
53 |
59 fun aptrueprop f ((t0 as @{const Trueprop}) $ t1) = t0 $ f t1 |
54 fun aptrueprop f ((t0 as @{const Trueprop}) $ t1) = t0 $ f t1 |
60 | aptrueprop f t = f t |
55 | aptrueprop f t = f t |
119 end |
114 end |
120 |
115 |
121 |
116 |
122 (** Sledgehammer **) |
117 (** Sledgehammer **) |
123 |
118 |
124 fun sledgehammer_tptp_file timeout file_name = () |
119 fun apply_tactic_to_tptp_file tactic timeout file_name = |
|
120 let |
|
121 val (conjs, (defs, nondefs), thy) = read_tptp_file @{theory} file_name |
|
122 val ctxt = Proof_Context.init_global thy |
|
123 in |
|
124 Goal.prove ctxt [] (defs @ nondefs) (hd conjs) (fn _ => tactic ctxt |
|
125 end |
125 |
126 |
|
127 val sledgehammer_tptp_file = |
|
128 apply_tactic_to_tptp_file Sledgehammer_Tactics.sledgehammer_as_oracle_tac |
|
129 |
|
130 |
|
131 (** Isabelle (combination of provers) **) |
|
132 |
|
133 val isabelle_tac = |
|
134 ... |
|
135 |
|
136 val isabelle_tptp_file = |
|
137 ... |
126 |
138 |
127 (** Translator between TPTP(-like) file formats **) |
139 (** Translator between TPTP(-like) file formats **) |
128 |
140 |
129 fun translate_tptp_file format in_file_name out_file_name = () |
141 fun translate_tptp_file format in_file_name out_file_name = () |
130 |
142 |