Class MleanCoPReasoner
- java.lang.Object
-
- org.tweetyproject.logics.ml.reasoner.AbstractMlReasoner
-
- org.tweetyproject.logics.ml.reasoner.MleanCoPReasoner
-
- All Implemented Interfaces:
QualitativeReasoner<MlBeliefSet,FolFormula>,Reasoner<java.lang.Boolean,MlBeliefSet,FolFormula>
public class MleanCoPReasoner extends AbstractMlReasoner
Invokes MleanCoP (http://www.leancop.de/mleancop/), a compact automated theorem prover for modal first-order logic based on the clausal connection calculus. It checks whether a given formula is valid.
NOTE: Make sure to set the PROVER_PATH variable in the mleancop.sh script to the location of the mleancop files (= the Prolog files).- Author:
- Anna Gessler, Matthias Thimm
-
-
Field Summary
-
Fields inherited from class org.tweetyproject.logics.ml.reasoner.AbstractMlReasoner
defaultReasoner
-
-
Constructor Summary
Constructors Constructor Description MleanCoPReasoner(java.lang.String location)Constructs a new instance pointing to a specific MleanCoProver.MleanCoPReasoner(java.lang.String location, Shell bash)Constructs a new instance pointing to a specific MleanCoProver.
-
Method Summary
Modifier and Type Method Description java.lang.StringgetScriptLocation()Get the mleancop.sh path.java.lang.Booleanquery(MlBeliefSet beliefbase, FolFormula formula)Queries the given belief base for the given formula.voidsetScriptLocation(java.lang.String location)Set the mleancop.sh path.-
Methods inherited from class org.tweetyproject.logics.ml.reasoner.AbstractMlReasoner
getDefaultReasoner, setDefaultReasoner
-
-
-
-
Constructor Detail
-
MleanCoPReasoner
public MleanCoPReasoner(java.lang.String location, Shell bash)Constructs a new instance pointing to a specific MleanCoProver.- Parameters:
location- mleancop.sh path on the hard drivebash- shell to run commands
-
MleanCoPReasoner
public MleanCoPReasoner(java.lang.String location)
Constructs a new instance pointing to a specific MleanCoProver.- Parameters:
location- mleancop.sh path on the hard drive
-
-
Method Detail
-
getScriptLocation
public java.lang.String getScriptLocation()
Get the mleancop.sh path.- Returns:
- location of MleanCOP shell script
-
setScriptLocation
public void setScriptLocation(java.lang.String location)
Set the mleancop.sh path.- Parameters:
location- of MleanCOP shell script
-
query
public java.lang.Boolean query(MlBeliefSet beliefbase, FolFormula formula)
Description copied from interface:ReasonerQueries the given belief base for the given formula.- Specified by:
queryin interfaceQualitativeReasoner<MlBeliefSet,FolFormula>- Specified by:
queryin interfaceReasoner<java.lang.Boolean,MlBeliefSet,FolFormula>- Specified by:
queryin classAbstractMlReasoner- Parameters:
beliefbase- a belief baseformula- a formula- Returns:
- the answer to the query
-
-