Class SimpleDefaultReasoner
- java.lang.Object
-
- net.sf.tweety.logics.rdl.reasoner.SimpleDefaultReasoner
-
- All Implemented Interfaces:
ModelProvider<FolFormula,DefaultTheory,Extension>
,QualitativeReasoner<DefaultTheory,FolFormula>
,Reasoner<java.lang.Boolean,DefaultTheory,FolFormula>
public class SimpleDefaultReasoner extends java.lang.Object implements QualitativeReasoner<DefaultTheory,FolFormula>, ModelProvider<FolFormula,DefaultTheory,Extension>
Implements a naive reasoner for default logic based on exhaustive application of defaults in process trees.- Author:
- Matthias Thimm, Nils Geilen
-
-
Constructor Summary
Constructors Constructor Description SimpleDefaultReasoner()
-
Method Summary
Modifier and Type Method Description Extension
getModel(DefaultTheory bbase)
Returns a single (dedicated) model of the given belief base.java.util.Collection<Extension>
getModels(DefaultTheory bbase)
Returns a characterizing model of the given belief basejava.lang.Boolean
query(DefaultTheory theory, FolFormula query)
Queries the given belief base for the given formula.java.lang.Boolean
query(DefaultTheory theory, FolFormula query, InferenceMode inferenceMode)
Queries the given default theory for the given query using the given inference mode.
-
-
-
Method Detail
-
getModels
public java.util.Collection<Extension> getModels(DefaultTheory bbase)
Description copied from interface:ModelProvider
Returns a characterizing model of the given belief base- Specified by:
getModels
in interfaceModelProvider<FolFormula,DefaultTheory,Extension>
- Parameters:
bbase
- some belief base- Returns:
- the (selected) models of the belief base
-
getModel
public Extension getModel(DefaultTheory bbase)
Description copied from interface:ModelProvider
Returns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.- Specified by:
getModel
in interfaceModelProvider<FolFormula,DefaultTheory,Extension>
- Parameters:
bbase
- some belief base- Returns:
- a selected model of the belief base.
-
query
public java.lang.Boolean query(DefaultTheory theory, FolFormula query)
Description copied from interface:Reasoner
Queries the given belief base for the given formula.- Specified by:
query
in interfaceQualitativeReasoner<DefaultTheory,FolFormula>
- Specified by:
query
in interfaceReasoner<java.lang.Boolean,DefaultTheory,FolFormula>
- Parameters:
theory
- a belief basequery
- a formula- Returns:
- the answer to the query
-
query
public java.lang.Boolean query(DefaultTheory theory, FolFormula query, InferenceMode inferenceMode)
Queries the given default theory for the given query using the given inference mode.- Parameters:
theory
- a default theoryquery
- a formulainferenceMode
- either InferenceMode.SKEPTICAL or InferenceMode.CREDULOUS- Returns:
- "true" if the formula is accepted
-
-