ML ‹
val tptp_test_out = Attrib.setup_config_string @{binding "tptp_test_out"} (K "")
val tptp_test_all = Attrib.setup_config_bool @{binding "tptp_test_all"} (K false)
val tptp_test_timeout =
Attrib.setup_config_int @{binding "tptp_test_timeout"} (K 5)
fun test_all ctxt = Config.get ctxt tptp_test_all
fun get_timeout ctxt = Config.get ctxt tptp_test_timeout
fun S x y z = x z (y z) ›
section"Parser tests"
ML ‹
fun payload_of (TPTP_Syntax.Annotated_Formula (_, _, _, _, fmla, _)) = fmla
val payloads_of = map payload_of ›
section"Source problems"
ML ‹
(*problem source*)
val tptp_probs_dir =
Path.explode "$TPTP/Problems"
|> Path.expand; ›
section"Supporting test functions"
ML ‹ funreportctxtstr= let valtptp_test_out=Config.getctxttptp_test_out in iftptp_test_out=""thenwarningstr else let valout_stream=TextIO.openAppendtptp_test_out in(TextIO.output(out_stream,str^"\n"); TextIO.flushOutout_stream; TextIO.closeOutout_stream) end end
funtest_fnctxtfmsgdefault_valfile_name= let val_=TPTP_Syntax.debugtracing(msg^""^Path.printfile_name) in \<^try>\<open>(ffile_name;())catchexn=>
(*otherwise report exceptions as warnings*)
(report ctxt (msg ^ " test: file " ^ Path.print file_name ^ " raised exception: " ^ Runtime.exn_message exn);
default_val)› end
fun timed_test ctxt f test_files = let fun f' x = (f x; ())
val time =
Timing.timing (List.app f') test_files
|> fst
val duration =
#elapsed time
|> Time.toSeconds
|> Real.fromLargeInt
val average =
(StringCvt.FIX (SOME 3),
(duration / Real.fromInt (length test_files)))
|-> Real.fmt in
report ctxt ("Test timing: " ^ Timing.message time ^ "\n(about " ^ average ^ "s per problem)") end ›
ML ‹ funsituatefile_name=tptp_probs_dir+Path.explodefile_name;
fun parser_test ctxt = (*FIXME argument order*)
test_fn ctxt
(fn file_name =>
Path.implode file_name
|> (fn file =>
((*report ctxt file; this is if you want the filename in the log*)
TPTP_Parser.parse_file file))) "parser"
()
fun parse_timed file =
Timing.timing TPTP_Parser.parse_file (Path.implode file) ›
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-06-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.