src/HOL/TPTP/TPTP_Proof_Reconstruction_Test.thy
changeset 62519 a564458f94db
parent 62390 842917225d56
child 63167 0909deb8059b
equal deleted inserted replaced
62518:b8efcc9edd7b 62519:a564458f94db
   632   (*default timeout is 1 min*)
   632   (*default timeout is 1 min*)
   633   fun reconstruct timeout light_output file thy =
   633   fun reconstruct timeout light_output file thy =
   634     let
   634     let
   635       val timer = Timer.startRealTimer ()
   635       val timer = Timer.startRealTimer ()
   636     in
   636     in
   637       TimeLimit.timeLimit (Time.fromSeconds (if timeout = 0 then 60 else timeout))
   637       Timeout.apply (Time.fromSeconds (if timeout = 0 then 60 else timeout))
   638        (test_partial_reconstruction thy
   638        (test_partial_reconstruction thy
   639         #> light_output ? erase_inference_fmlas
   639         #> light_output ? erase_inference_fmlas
   640         #> @{make_string} (* FIXME *)
   640         #> @{make_string} (* FIXME *)
   641         #> (fn s => report (Proof_Context.init_global thy) (@{make_string} file ^ " === " ^ s ^
   641         #> (fn s => report (Proof_Context.init_global thy) (@{make_string} file ^ " === " ^ s ^
   642              " t=" ^ (Timer.checkRealTimer timer |> Time.toMilliseconds |> @{make_string}))))
   642              " t=" ^ (Timer.checkRealTimer timer |> Time.toMilliseconds |> @{make_string}))))
   660         file
   660         file
   661         |> Path.base
   661         |> Path.base
   662         |> Path.implode
   662         |> Path.implode
   663         |> TPTP_Problem_Name.Nonstandard
   663         |> TPTP_Problem_Name.Nonstandard
   664     in
   664     in
   665       TimeLimit.timeLimit (Time.fromSeconds (if timeout = 0 then 60 else timeout))
   665       Timeout.apply (Time.fromSeconds (if timeout = 0 then 60 else timeout))
   666        (fn prob_name =>
   666        (fn prob_name =>
   667         (can
   667         (can
   668           (TPTP_Reconstruct.reconstruct ctxt (fn prob_name =>
   668           (TPTP_Reconstruct.reconstruct ctxt (fn prob_name =>
   669             TPTP_Reconstruct.naive_reconstruct_tac ctxt interpret_leo2_inference prob_name (* oracle_based_reconstruction_tac *))) prob_name )
   669             TPTP_Reconstruct.naive_reconstruct_tac ctxt interpret_leo2_inference prob_name (* oracle_based_reconstruction_tac *))) prob_name )
   670        |> (fn s => report ctxt (Path.print file ^ " === " ^ Bool.toString s ^
   670        |> (fn s => report ctxt (Path.print file ^ " === " ^ Bool.toString s ^