public class Prover9Writer extends java.lang.Object implements FolWriter
Prover9FolReasoner
Modifier and Type | Field and Description |
---|---|
(package private) java.io.Writer |
writer
output is redirected to this writer
|
Constructor and Description |
---|
Prover9Writer()
creates new Prover9Writer
|
Prover9Writer(java.io.Writer writer)
creates new Prover9Writer
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the Writer.
|
private java.lang.String |
parens(java.lang.String str)
Puts str in parentheses.
|
void |
printBase(FolBeliefSet b)
Prints formatted representation of a knowledge base.
|
void |
printEquivalence(FolFormula a,
FolFormula b)
Prints an Equivalence.
|
private java.lang.String |
printFormula(RelationalFormula f)
Creates a representation of a formula in Prover9 format.
|
void |
printQuery(FolFormula query)
Prints formatted representation of a query.
|
private java.lang.String |
printVar(Variable v)
Crates a type check or type def for a variable
|
java.lang.String |
toString() |
public Prover9Writer(java.io.Writer writer)
writer
- output is redirected to this writerpublic Prover9Writer()
public void printQuery(FolFormula query) throws java.io.IOException
FolWriter
printQuery
in interface FolWriter
query
- the formula to be queriedjava.io.IOException
public void printEquivalence(FolFormula a, FolFormula b) throws java.io.IOException
FolWriter
printEquivalence
in interface FolWriter
a
- formula on one side of the equationb
- formula on the other side of the equationjava.io.IOException
public void printBase(FolBeliefSet b) throws java.io.IOException
FolWriter
private java.lang.String printVar(Variable v)
v
- a variableprivate java.lang.String printFormula(RelationalFormula f)
f
- a formulaprivate java.lang.String parens(java.lang.String str)
str
- a stringpublic void close() throws java.io.IOException
FolWriter
public java.lang.String toString()
toString
in class java.lang.Object