|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.linguistics.kif.Formula
public class Formula
Handle operations on an individual formula. This includes formatting for presentation as well as pre-processing for sending to the inference engine.
| Field Summary | |
|---|---|
int |
endLine
The line in the file on which the formula ends. |
java.lang.String |
sourceFile
The source file in which the formula appears. |
int |
startLine
The line in the file on which the formula starts. |
java.lang.String |
theFormula
The formula. |
| Constructor Summary | |
|---|---|
Formula()
|
|
| Method Summary | |
|---|---|
java.util.ArrayList |
argumentsToArrayList(int start)
************************************************************** Return all the arguments in a simple formula as a list, starting at the given argument. |
java.lang.String |
car()
************************************************************** Return the LISP 'car' of the formula - the first element of the list. |
java.lang.String |
cdr()
************************************************************** Return the LISP 'cdr' of the formula - the rest of a list minus its first element. |
int |
compareTo(java.lang.Object f)
************************************************************** Implement the Comparable interface by defining the compareTo method. |
boolean |
deepEquals(Formula f)
************************************************************** Test if the contents of the formula are equal to the argument. |
boolean |
equals(java.lang.String s)
************************************************************** Test if the contents of the formula are equal to the String argument. |
java.lang.String |
format(java.lang.String hyperlink,
java.lang.String indentChars,
java.lang.String eolChars)
************************************************************** Format a formula for either text or HTML presentation by inserting the proper hyperlink code, characters for indentation and end of line. |
java.lang.String |
getArgument(int argnum)
************************************************************** Return the numbered argument of the given formula. |
java.lang.String |
htmlFormat(java.lang.String html)
************************************************************** Format a formula for HTML presentation. |
static boolean |
isNegatedQuery(java.lang.String query,
java.lang.String formula)
************************************************************** Compare the given formula to the negated query and return whether they are the same (minus the negation). |
boolean |
logicallyEquals(java.lang.String s)
************************************************************** Test if the contents of the formula are equal to the argument at a deeper level than a simple string equals. |
static void |
main(java.lang.String[] args)
************************************************************** A test method. |
java.lang.String |
makeQuantifiersExplicit()
************************************************************** Makes implicit universal quantification explicit. |
static java.lang.String |
postProcess(java.lang.String s)
************************************************************** Remove the 'holds' prefix wherever it appears. |
java.util.ArrayList |
preProcess()
************************************************************** Pre-process a formula before sending it to Vampire. |
void |
read(java.lang.String s)
************************************************************** Read a String into the variable 'theFormula'. |
java.lang.String |
textFormat()
Deprecated. |
java.lang.String |
toString()
************************************************************** Format a formula for text presentation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String sourceFile
public int startLine
public int endLine
public java.lang.String theFormula
| Constructor Detail |
|---|
public Formula()
| Method Detail |
|---|
public void read(java.lang.String s)
public int compareTo(java.lang.Object f)
throws java.lang.ClassCastException
compareTo in interface java.lang.Comparablejava.lang.ClassCastExceptionpublic java.lang.String car()
public java.lang.String cdr()
public boolean logicallyEquals(java.lang.String s)
public boolean equals(java.lang.String s)
public boolean deepEquals(Formula f)
public java.lang.String getArgument(int argnum)
public java.util.ArrayList argumentsToArrayList(int start)
public java.lang.String makeQuantifiersExplicit()
public java.util.ArrayList preProcess()
public static boolean isNegatedQuery(java.lang.String query,
java.lang.String formula)
public static java.lang.String postProcess(java.lang.String s)
public java.lang.String format(java.lang.String hyperlink,
java.lang.String indentChars,
java.lang.String eolChars)
hyperlink - - the URL to be referenced to a hyperlinked term.indentChars - - the proper characters for indenting text.eolChars - - the proper character for end of line.public java.lang.String textFormat()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String htmlFormat(java.lang.String html)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||