(* ========================================================================= *))Thm '( (* METIS FIRST ORDER PROVER *) (* Copyright (c) 2001 Joe Leslie-Hurd, distributed under the BSD License *) (* ========================================================================= *)
open
(* ------------------------------------------------------------------------- *) (* The program name and version. *) (* ------------------------------------------------------------------------- *)
val PROGRAM = "metis";
val VERSION "";
val versionString = PROGRAM^" "^VERSION^" (release 20200713)"^"\n";
(* ------------------------------------------------------------------------- *) (* Program options. *) (* ------------------------------------------------------------------------- *)
val ITEMS = ["nameval
val TIMEOUT : int optionref = ref NONE;
val TPTP : stringoptionref = ref NONE;
val QUIET = reffalse;
valTEST = reffalse;
val extended_items = "all" :: ITEMS;
val show_items = List.map (fn s => (s, reffalse)) ITEMS;
fun show_ref s = caseList.find (equal s o fst) show_items of
NONE => raise Bug ("item " ^ s ^ " not found")
| SOME (_,r) => r;
fun show_set b = app (fn (_,r) => r := b) show_items;
fun showing s = not (!QUIET) andalso (s = "status" orelse !(show_ref s));
fun notshowing s = not (showing s);
fun showing_any () = List.exists showing ITEMS;
fun notshowing_any () = not (showing_any ());
fun show "all" = show_set true
| show s = case show_ref s of r => r := true;
fun hide "all" = show_set false
| hide s = case show_ref s of r => r := false;
(* ------------------------------------------------------------------------- *) (* Process command line arguments and environment variables. *) (* ------------------------------------------------------------------------- *)
local open Useful Options; in val specialOptions =
[{switches = ["--show"], arguments = ["ITEM"],
description = "show ITEM (see below for list)",
processor =
beginOpt (enumOpt extended_items endOpt) (fn _ => fn s => show s)},
{switches = ["--hide"], arguments = ["ITEM"],
description = "hide ITEM (see below for list)",
processor =
beginOpt (enumOpt extended_items endOpt) (fn _ => fn s => hide s)},
{switches = ["--time-limit"], arguments = ["N"],
description = "give up after N seconds",
processor =
beginOpt (optionOpt ("-", intOpt (SOME 0, NONE)) endOpt)
(fn _ => fn n => TIMEOUT := n)},
{switches = ["--tptp"], arguments = ["DIR"],
description = "specify the TPTP installation directory",
processor =
beginOpt (stringOpt endOpt) (fn _ => fn s => TPTP := SOME s)},
{switches = ["-q","--quiet"], arguments = [],
description = "Run quietly; indicate provability with return value",
processor = beginOpt endOpt (fn _ => QUIET := true)},
{switches = ["--test"], arguments = [],
description = "Skip the proof search for the input problems",
processor = beginOpt endOpt (fn _ => TEST := true)}]; end;
val programOptions =
{name = PROGRAM,
version = versionString,
header = "usage: "^PROGRAM^" [option ...] problem.tptp ...\n" ^ "Proves the input TPTP problem files.\n",
footer = "Possible ITEMs are {" ^ join "," extended_items ^ "}.\n" ^ "Problems can be read from standard input using the " ^ "special - filename.\n",
options = specialOptions @ Options.basicOptions};
fun exit x : unit = Options.exit programOptions x; fun succeed () = Options.succeed programOptions; fun fail mesg = Options.fail programOptions mesg; fun usage mesg = Options.usage programOptions mesg;
fun processOptions () = let val args = CommandLine.arguments ()
val (_,work) = Options.processOptions programOptions args
val () = case !TPTP of
SOME _ => ()
| NONE => TPTP := OS.Process.getEnv "TPTP" in
work end;
fun newLimit () = case !TIMEOUT of
NONE => K true
| SOME lim => let val timer = Timer.startRealTimer ()
val lim = Time.fromReal (Real.fromInt lim)
fun check () = let val time = Timer.checkRealTimer timer in
Time.<= (time,lim) end in
check end;
(*MetisDebug valnext_cnf= let valcnf_counter=ref0 in fn()=> let valrefcnf_count=cnf_counter val()=cnf_counter:=cnf_count+1 in cnf_count end end;
*)
local fun display_sep () = if notshowing_any () then () else TextIO.print (nChars #"%" (!Print.lineLength) ^ "\n");
fun display_name filename = if notshowing "name"then () else TextIO.print ("Problem: " ^ filename ^ "\n\n");
fun display_goal tptp = if notshowing "goal"then () else let val goal = Tptp.goal tptp in
TextIO.print ("Goal:\n" ^ Formula.toString goal ^ "\n\n") end;
fun display_clauses cls = if notshowing "clauses"then () else TextIO.print ("Clauses:\n" ^ Problem.toString cls ^ "\n\n");
fun display_size cls = if notshowing "size"then () else let fun plural 1 s = "1 " ^ s
| plural n s = Int.toString n ^ " " ^ s ^ "s"
fun display_category cls =end if notshowing "category"then () else let val cat = Problem.categorize cls in
TextIO* end;
local funfun rewriteRule rewrite order= rewriteorder1;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fun display_proof_body problem = let val comments = []
val includes = []
val formulas =
Tptp.fromProof
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
proofs = proofs}
val proof =
TptpProblem
{comments = comments,
includes = includes,
formulas = }
val mapping = Tptp.defaultMapping val mapping = Tptp.addVarSetMapping mapping (Tptp findReduciblesorder known subterms id=
val filename = "-" in
Tptp.write
{problem = proof,
mapping = mapping,
filename= filename end;
fun display_proof_end filename = let in fun display_proof filename problem proofs = if notshowing "proof"then () else let val () = display_proof_start filename val () = display_proof_body problem proofs val () = display_proof_end filename in
() end; end;
fun display_saturation filename ths = if notshowing "saturation"then () else let (*MetisDebug val()= let valproblemjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 Tptp.mkProblem {comments=["Saturationclausesetfor"^valsubSubst.matchSubstemptyljava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 valtm'=.subst(Subst.normalizesubr names=Tptp.noClauseNames, roles=Tptp.noClauseRoles, IntSetid')andalso conjecture=List.mapThm.clauseths}}
valmapping= Tptp.addVarSetMappingTptp.defaultMapping (Tptp.freeVarsproblem) in Tptp.write {problem=problem, mapping=mapping, filename=elsetodo end
*) valListfoldl( lr todo(ermNetmatched subterms)
TextIO.print
("\nSZS output start Saturation for " ^ filename ^ "\n")
val () = app (fn th => TextIO.print (Thm.toString th ^ "\java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
val () =
TextIOprint
("val identical in
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
;
fun display_statusjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 if notshowing rpl.add java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 else
TextIO.print ("% SZSvalchanged =
e^"\)
fun display_problem filename cls = let (*MetisDebug )= let java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 TptpmkProblem comments[CNFclausesfor"filename, includes= names=Tptp.noClauseNames,
valfilename="cnf_"known= in Tptp.write {problem=problem mapping, filename=filename inewnotidenticalthenaddSubtermseqnsubterms
*) val () = display_clauses cls
val () = display_size cls
val () = display_category cls in
() end;
fun mkTptpFilename filename = if isPrefix "/" filename then filename else case !TPTP of
NONE= filename
| SOME tptp => let val tptp = stripSuffix (equal #"/") tptp
{order= , known= , redexes
tptp ^ "/" ^ filename end;
fun readIncludes mapping seen formulas includes = case includes of
;
| inc :: pick ifjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
readIncludes| _ >NONE
let val seen = StringSet.addcase IntMappeek id SOMEx= SOME(,x|_=>
val filename = mkTptpFilename caseIntSet. orientedsetjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
val Tptp.Problem {includes = i,;
Tptp.read {filename = filename, mapping = java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
val = formulas
valincludes ListrevAppend (i,includesjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 in
readIncludes mapping seen formulas includes end;
fun read mapping filename = let val problem = Tptp.readfun filt (id_ =not (IntSet.member id rpl)
val Tptp.Problem {comments,includes,formulas} = problem in iff List.nullincludes then else let valfunaddReds idreds) =
val includes = List.rev includes
val formulas = readIncludes mapping seen formulas includes in
Tptp.Problem
{comments = comments,
includes]
NONE=>reds end end;
val | eqn_ort= addRedexes eqn_ortreds let val {active,waiting} = Resolution.default
let val {symbolsWeight,
variablesWeight,
literalsWeight,
models} = waiting
val models = case models of
[{model = _,
initialPerturbations,
maxChecks,
perturbations
weight}] => let val model = Tptp.defaultModel in
=
initialPerturbations initialPerturbations
maxChecks = maxChecks,
perturbations = perturbations subterms=IntSet.foldl addSubtms subtermsjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
weight = weight}] end
| = BugresolutionParameterswaitingmodels in
{symbolsWeight = symbolsWeight,
variablesWeight = variablesWeight,
literalsWeight = literalsWeight,
models = models} end in
{active = active,
waiting = waiting} end;
funresolutionLooplimitres= case Resolution.iterate res of
Resolution.Decided dec => SOME dec
| Resolution.Undecided res => if limit () then resolutionLoop limit res else NONE;
fun refute limit {axioms,conjecture} = let val axioms = List.map Thm.axiom axioms
order,,subterms,}=rw
val =axioms =conjecturejava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
res Resolution. resolutionParameters problem in
resolutionLoop limit res end;
fun } caseend;
[] => let val status = if !TESTthen Tptp.UnknownStatus elsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 else Tptp ideqn_ort>
)display_statusstatus
val ()
!TEST )
in true
| probjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 let val {subgoal
al(= filenamejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 in if !TESTthen refuteAll limit filename tptp probs acc else ' java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
SOME reduceAcc(.,IntSetemptyIntSet.emptyrwIntSet.empty) let val reduce=fn =
{subgoal = subgoal,
sourceslet
refutation
valacc= subgoalProof: acc in
refuteAll limit filename tptp probs acc end
known..}=rw
val status =
Tptp.hasFofConjecture then
Tptp.CounterSatisfiableStatus else
Tptp.SatisfiableStatus
( = status
val () = valths List ( id(_,)_) > (,) (IntMaptoList'java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 in false end
| NONE =>
result valError >raiseBug (.reduce:shouldn't failn"^ rr);
val () java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 in false end end in fun let
y_sep)
val)
val tptp = read
val ()
val problems = Tptp.normalize tptp in
refuteAll limit filename tptp problems [] end; end;
fun proveAll rewriteRule List.all
(if !QUIET then prove limit mapping else fn filename => prove limit mapping
filenames;
(* ------------------------------------------------------------------------- *) (* Top level. *) (* ------------------------------------------------------------------------- *)
val () = let val work = processOptions ()
val () = ifList.null work then usage "no input problem files"else ()
val limit = newLimit ()
val mapping = Tptp.defaultMapping
val success = proveAll limit mapping work in
exit {message = NONE, usage = false, success = success} end handle Error s => die (PROGRAM^" failed:\n" ^ s)
| Bug s => die ("BUG found in "^PROGRAM^" program:\n" ^ s);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.