Package com.articulate.sigma.tp
Class Vampire
java.lang.Object
com.articulate.sigma.tp.Vampire
Class for invoking the latest research version of Vampire from Java
A previous version invoked the KIF version of Vampire from Java
but that's 15 years old now. The current Vampire does TPTP3 output
instead of XML.
- Since:
- 14/08/2003, Acapulco
- Author:
- Andrei Voronkov, apease
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic intstatic booleanstatic Vampire.ModeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanassertFormula(String userAssertionTPTP, KB kb, List<Formula> parsedFormulas, boolean tptp) Add an assertion for inference.voidconcatFiles(String f1, String f2, String fout) Read in two files and write their contents to a new fileGet the full ATPResult for this run.Get the SZS status from the last run.getUserAssertions(KB kb) booleanhasError()Check if there was an error during execution.static voidstatic voidvoidCreates a running instance of Vampire adding a set of statements in TFF or TPTP language to a file and then calling Vampire.voidCreates a running instance of Vampire and collects its outputvoidrunCustom(File kbFile, int timeout, Collection<String> commands) Creates a running instance of Vampire with custom command line options.toString()voidwriteStatements(Set<String> stmts, String type) Write all the strings in @param stmts to temp-stmt.[tptp|tff|thf]
-
Field Details
-
qlist
-
output
-
axiomIndex
public static int axiomIndex -
logic
-
mode
-
debug
public static boolean debug -
askQuestion
public static boolean askQuestion
-
-
Constructor Details
-
Vampire
public Vampire()
-
-
Method Details
-
toString
-
getResult
Get the full ATPResult for this run. This provides detailed execution metadata, SZS status, and error info.- Returns:
- The ATPResult, or null if run() hasn't been called
-
hasError
public boolean hasError()Check if there was an error during execution.- Returns:
- true if the result indicates an error
-
getSzsStatus
Get the SZS status from the last run.- Returns:
- The SZSStatus, or SZSStatus.NOT_RUN if not run
-
assertFormula
public static boolean assertFormula(String userAssertionTPTP, KB kb, List<Formula> parsedFormulas, boolean tptp) Add an assertion for inference.- Parameters:
userAssertionTPTP- asserted formula in the TPTP/TFF syntaxkb- Knowledge baseparsedFormulas- a lit of parsed formulas in KIF syntaxtptp- convert formula to TPTP if tptp = true- Returns:
- true if all assertions are added for inference TODO: This function might not be necessary if we find a way to directly add assertion into opened inference engine (e_ltb_runner)
-
run
Creates a running instance of Vampire and collects its output- Parameters:
kbFile- A File object denoting the initial knowledge base to be loaded by the Vampire executable.timeout- the time given for Vampire to finish execution- Throws:
ExecutableNotFoundException- if the Vampire executable is not foundProverCrashedException- if Vampire crashes with a non-zero exit codeProverTimeoutException- if Vampire times outException- for other errors
-
runCustom
Creates a running instance of Vampire with custom command line options.- Parameters:
kbFile- A File object denoting the initial knowledge base to be loaded by the Vampire executable.- Throws:
ExecutableNotFoundException- if the Vampire executable is not foundProverCrashedException- if Vampire crashes with a non-zero exit codeProverTimeoutException- if Vampire times outException- for other errors
-
writeStatements
Write all the strings in @param stmts to temp-stmt.[tptp|tff|thf] -
concatFiles
Read in two files and write their contents to a new file- Throws:
IOException
-
getUserAssertions
-
run
Creates a running instance of Vampire adding a set of statements in TFF or TPTP language to a file and then calling Vampire. Note that any query must be given as a "conjecture"- Parameters:
kb- the current knowledge basekbFile- the current knowledge base TPTP filetimeout- the timeout given to Vampire to find a proofstmts- a Set of user assertions- Throws:
Exception- of something goes south
-
printHelp
public static void printHelp() -
main
- Throws:
Exception
-