Package net.sf.tweety.logics.ml.reasoner
Class SPASSMlReasoner
- java.lang.Object
-
- net.sf.tweety.logics.ml.reasoner.AbstractMlReasoner
-
- net.sf.tweety.logics.ml.reasoner.SPASSMlReasoner
-
- All Implemented Interfaces:
net.sf.tweety.commons.QualitativeReasoner<MlBeliefSet,net.sf.tweety.logics.fol.syntax.FolFormula>,net.sf.tweety.commons.Reasoner<Boolean,MlBeliefSet,net.sf.tweety.logics.fol.syntax.FolFormula>
public class SPASSMlReasoner extends AbstractMlReasoner
Invokes SPASS (http://www.mpi-inf.mpg.de/departments/automation-of-logic/software/spass-workbench/), an automated theorem prover for first-order logic, modal logic and description logics.
Note: There are unresolved errors for some cases, see net.sf.tweety.logics.ml.SPASSTest#ComplexQueryTest() for examples.- Author:
- Anna Gessler, Matthias Thimm
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.logics.ml.reasoner.AbstractMlReasoner
defaultReasoner
-
-
Constructor Summary
Constructors Constructor Description SPASSMlReasoner(String binaryLocation)Constructs a new instance pointing to a specific SPASSSPASSMlReasoner(String binaryLocation, net.sf.tweety.commons.util.Shell bash)Constructs a new instance pointing to a specific SPASS Prover.
-
Method Summary
Modifier and Type Method Description Booleanquery(MlBeliefSet kb, net.sf.tweety.logics.fol.syntax.FolFormula query)StringqueryProof(MlBeliefSet kb, net.sf.tweety.commons.Formula query)Determines the answer wrt.voidsetCmdOptions(String s)Sets the command line options that will be used by SPASS when executing the query.-
Methods inherited from class net.sf.tweety.logics.ml.reasoner.AbstractMlReasoner
getDefaultReasoner, setDefaultReasoner
-
-
-
-
Constructor Detail
-
SPASSMlReasoner
public SPASSMlReasoner(String binaryLocation, net.sf.tweety.commons.util.Shell bash)
Constructs a new instance pointing to a specific SPASS Prover.- Parameters:
binaryLocation- of the SPASS executable on the hard drivebash- shell to run commands
-
SPASSMlReasoner
public SPASSMlReasoner(String binaryLocation)
Constructs a new instance pointing to a specific SPASS- Parameters:
binaryLocation- of the SPASS executable on the hard drive
-
-
Method Detail
-
setCmdOptions
public void setCmdOptions(String s)
Sets the command line options that will be used by SPASS when executing the query.- Parameters:
s- a string containing the command line arguments
-
query
public Boolean query(MlBeliefSet kb, net.sf.tweety.logics.fol.syntax.FolFormula query)
- Specified by:
queryin interfacenet.sf.tweety.commons.QualitativeReasoner<MlBeliefSet,net.sf.tweety.logics.fol.syntax.FolFormula>- Specified by:
queryin interfacenet.sf.tweety.commons.Reasoner<Boolean,MlBeliefSet,net.sf.tweety.logics.fol.syntax.FolFormula>- Specified by:
queryin classAbstractMlReasoner
-
queryProof
public String queryProof(MlBeliefSet kb, net.sf.tweety.commons.Formula query)
Determines the answer wrt. to the given query and returns the proof (if applicable). May decrease SPASS's performance, usequery(MlBeliefSet,FolFormula)if only a yes/no result is needed.- Parameters:
kb- a modal belief setquery- a formula- Returns:
- a string containing proof documentation
-
-