# HG changeset patch # User blanchet # Date 1304330973 -7200 # Node ID a7dff503ffabbcc0a67f8718f677877355afc189 # Parent a2db47fa015eec188fc014e7bc7bcc6ea4a06f88 make SML/NJ happy diff -r a2db47fa015e -r a7dff503ffab src/HOL/Tools/ATP/atp_proof.ML --- a/src/HOL/Tools/ATP/atp_proof.ML Mon May 02 12:09:33 2011 +0200 +++ b/src/HOL/Tools/ATP/atp_proof.ML Mon May 02 12:09:33 2011 +0200 @@ -317,33 +317,33 @@ (* Syntax: (cnf|fof|tff)\(, , \). The could be an identifier, but we assume integers. *) -val parse_tstp_line = - ((Scan.this_string "cnf" || Scan.this_string "fof" || Scan.this_string "tff") - -- $$ "(") - |-- scan_general_id --| $$ "," -- Symbol.scan_id --| $$ "," - -- parse_formula -- parse_tstp_extra_arguments --| $$ ")" --| $$ "." - >> (fn (((num, role), phi), deps) => - let - val (name, deps) = - case deps of - ["file", _, s] => - ((num, - if s = vampire_unknown_fact then NONE - else SOME (s |> perhaps (try (unprefix tofof_fact_prefix)))), - []) - | _ => ((num, NONE), deps) - in - case role of - "definition" => - (case phi of - AConn (AIff, [phi1 as AAtom _, phi2]) => - Definition (name, phi1, phi2) - | AAtom (ATerm ("c_equal", _)) => - (* Vampire's equality proxy axiom *) - Inference (name, phi, map (rpair NONE) deps) - | _ => raise Fail "malformed definition") - | _ => Inference (name, phi, map (rpair NONE) deps) - end) +fun parse_tstp_line x = + (((Scan.this_string "cnf" || Scan.this_string "fof" || Scan.this_string "tff") + -- $$ "(") + |-- scan_general_id --| $$ "," -- Symbol.scan_id --| $$ "," + -- parse_formula -- parse_tstp_extra_arguments --| $$ ")" --| $$ "." + >> (fn (((num, role), phi), deps) => + let + val (name, deps) = + case deps of + ["file", _, s] => + ((num, + if s = vampire_unknown_fact then NONE + else SOME (s |> perhaps (try (unprefix tofof_fact_prefix)))), + []) + | _ => ((num, NONE), deps) + in + case role of + "definition" => + (case phi of + AConn (AIff, [phi1 as AAtom _, phi2]) => + Definition (name, phi1, phi2) + | AAtom (ATerm ("c_equal", _)) => + (* Vampire's equality proxy axiom *) + Inference (name, phi, map (rpair NONE) deps) + | _ => raise Fail "malformed definition") + | _ => Inference (name, phi, map (rpair NONE) deps) + end)) x (**** PARSING OF VAMPIRE OUTPUT ****) @@ -353,13 +353,13 @@ $$ "(" |-- parse_vampire_detritus --| $$ ")" (* Syntax: . *) -val parse_vampire_line = - scan_general_id --| $$ "." -- parse_formula - --| Scan.option parse_vampire_braced_stuff - --| Scan.option parse_vampire_parenthesized_detritus - -- parse_annotation - >> (fn ((num, phi), deps) => - Inference ((num, NONE), phi, map (rpair NONE) deps)) +fun parse_vampire_line x = + (scan_general_id --| $$ "." -- parse_formula + --| Scan.option parse_vampire_braced_stuff + --| Scan.option parse_vampire_parenthesized_detritus + -- parse_annotation + >> (fn ((num, phi), deps) => + Inference ((num, NONE), phi, map (rpair NONE) deps))) x (**** PARSING OF SPASS OUTPUT ****)