Class SimpleDefaultReasoner
java.lang.Object
org.tweetyproject.logics.rdl.reasoner.SimpleDefaultReasoner
- All Implemented Interfaces:
ModelProvider<FolFormula,
,DefaultTheory, Extension> QualitativeReasoner<DefaultTheory,
,FolFormula> Reasoner<Boolean,
DefaultTheory, FolFormula>
public class SimpleDefaultReasoner
extends 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 -
Method Summary
Modifier and TypeMethodDescriptiongetModel
(DefaultTheory bbase) Returns a single (dedicated) model of the given belief base.getModels
(DefaultTheory bbase) Returns a characterizing model of the given belief baseboolean
query
(DefaultTheory theory, FolFormula query) Queries the given belief base for the given formula.query
(DefaultTheory theory, FolFormula query, InferenceMode inferenceMode) Queries the given default theory for the given query using the given inference mode.
-
Constructor Details
-
SimpleDefaultReasoner
public SimpleDefaultReasoner()
-
-
Method Details
-
getModels
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
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
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<Boolean,
DefaultTheory, FolFormula> - Parameters:
theory
- a belief basequery
- a formula- Returns:
- the answer to the query
-
query
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
-
isInstalled
public boolean isInstalled()- Specified by:
isInstalled
in interfaceQualitativeReasoner<DefaultTheory,
FolFormula> - Returns:
- if the solver is installed
-