public class SpassFolReasoner extends FolReasoner
Modifier and Type | Field and Description |
---|---|
private Shell |
bash
Shell to run SPASS.
|
private java.lang.String |
binaryLocation
String representation of the SPASS path.
|
private java.lang.String |
cmdOptions
Command line options that will be used by SPASS when executing the query.
|
defaultReasoner
Constructor and Description |
---|
SpassFolReasoner(java.lang.String binaryLocation)
Constructs a new instance pointing to a specific SPASS
|
SpassFolReasoner(java.lang.String binaryLocation,
Shell bash)
Constructs a new instance pointing to a specific SPASS Prover.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equivalent(FolBeliefSet kb,
FolFormula a,
FolFormula b)
This method determines whether two formulas are
equivalent wrt.
|
private boolean |
evaluateResult(java.lang.String output)
Evaluates SPASS results.
|
java.lang.Boolean |
query(FolBeliefSet kb,
FolFormula query)
Queries the given belief base for the given formula.
|
java.lang.String |
queryProof(FolBeliefSet kb,
Formula query)
Determines the answer wrt.
|
void |
setCmdOptions(java.lang.String s)
Sets the command line options that will be used by SPASS when executing the query.
|
getDefaultReasoner, setDefaultReasoner
private java.lang.String binaryLocation
private Shell bash
private java.lang.String cmdOptions
public SpassFolReasoner(java.lang.String binaryLocation, Shell bash)
binaryLocation
- of the SPASS executable on the hard drivebash
- shell to run commandspublic SpassFolReasoner(java.lang.String binaryLocation)
binaryLocation
- of the SPASS executable on the hard drivepublic void setCmdOptions(java.lang.String s)
s
- a string containing the command line argumentspublic java.lang.Boolean query(FolBeliefSet kb, FolFormula query)
Reasoner
query
in interface QualitativeReasoner<FolBeliefSet,FolFormula>
query
in interface Reasoner<java.lang.Boolean,FolBeliefSet,FolFormula>
query
in class FolReasoner
kb
- a belief basequery
- a formulapublic java.lang.String queryProof(FolBeliefSet kb, Formula query)
net.sf.tweety.logics.SpassFolReasoner.reasoner.SPASS#query(Formula)
if only a yes/no result is needed.query
- a formulaprivate boolean evaluateResult(java.lang.String output)
output
- of a SPASS querypublic boolean equivalent(FolBeliefSet kb, FolFormula a, FolFormula b)
FolReasoner
equivalent
in class FolReasoner
kb
- the knowledge basea
- the first formula.b
- the second formula.