src/HOL/Tools/ATP/atp_proof.ML
changeset 57656 49077e289606
parent 57293 4e619ee65a61
child 57697 44341963ade3
equal deleted inserted replaced
57655:dde0e76996ad 57656:49077e289606
   300 (* "skip_term" is there to cope with Waldmeister nonsense such as "theory(equality)". *)
   300 (* "skip_term" is there to cope with Waldmeister nonsense such as "theory(equality)". *)
   301 fun parse_dependency x =
   301 fun parse_dependency x =
   302   (parse_inference_source >> snd
   302   (parse_inference_source >> snd
   303    || scan_general_id --| skip_term >> single) x
   303    || scan_general_id --| skip_term >> single) x
   304 and parse_dependencies x =
   304 and parse_dependencies x =
   305   (Scan.repeat (Scan.option ($$ ",") |-- parse_dependency) >> flat) x
   305   (Scan.repeat (Scan.option ($$ ",") |-- parse_dependency)
       
   306    >> (flat #> filter_out (curry (op =) "theory"))) x
   306 and parse_file_source x =
   307 and parse_file_source x =
   307   (Scan.this_string "file" |-- $$ "(" |-- scan_general_id
   308   (Scan.this_string "file" |-- $$ "(" |-- scan_general_id
   308    -- Scan.option ($$ "," |-- scan_general_id
   309    -- Scan.option ($$ "," |-- scan_general_id
   309      --| Scan.option ($$ "," |-- $$ "[" -- Scan.option scan_general_id --| $$ "]")) --| $$ ")") x
   310      --| Scan.option ($$ "," |-- $$ "[" -- Scan.option scan_general_id --| $$ "]")) --| $$ ")") x
   310 and parse_inference_source x =
   311 and parse_inference_source x =
   674   (case split_lines s of
   675   (case split_lines s of
   675     "The transformed problem consists of the following conjectures:" :: conj ::
   676     "The transformed problem consists of the following conjectures:" :: conj ::
   676     _ :: proof_term :: _ => SOME (unprefix " " conj :: find_enclosed "<<" ">>" proof_term)
   677     _ :: proof_term :: _ => SOME (unprefix " " conj :: find_enclosed "<<" ">>" proof_term)
   677   | _ => NONE)
   678   | _ => NONE)
   678 
   679 
   679 fun atp_proof_of_tstplike_proof local_prover _ "" = []
   680 fun atp_proof_of_tstplike_proof _ _ "" = []
   680   | atp_proof_of_tstplike_proof local_prover problem tstp =
   681   | atp_proof_of_tstplike_proof local_prover problem tstp =
   681     (case core_of_agsyhol_proof tstp of
   682     (case core_of_agsyhol_proof tstp of
   682       SOME facts => facts |> map (core_inference agsyhol_core_rule)
   683       SOME facts => facts |> map (core_inference agsyhol_core_rule)
   683     | NONE =>
   684     | NONE =>
   684       tstp ^ "$" (* the $ sign acts as a sentinel (FIXME: needed?) *)
   685       tstp ^ "$" (* the $ sign acts as a sentinel (FIXME: needed?) *)