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
-
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
Checks whether the underlying solver or reasoning mechanism used by this reasoner is installed and available for use.query
(DefaultTheory theory, FolFormula query) Queries the given belief base with the provided formula and returns a boolean result.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()Defaul Constructor
-
-
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:QualitativeReasoner
Queries the given belief base with the provided formula and returns a boolean result. The result indicates whether the formula is entailed or satisfied by the belief base according to the qualitative reasoning method implemented by the reasoner.- Specified by:
query
in interfaceQualitativeReasoner<DefaultTheory,
FolFormula> - Specified by:
query
in interfaceReasoner<Boolean,
DefaultTheory, FolFormula> - Parameters:
theory
- The belief base to be queried.query
- The formula for which the query is made.- Returns:
- `TRUE` if the formula is entailed or satisfied by the belief base, `FALSE` otherwise.
-
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()Description copied from interface:QualitativeReasoner
Checks whether the underlying solver or reasoning mechanism used by this reasoner is installed and available for use. This can be helpful when the reasoner depends on external tools or libraries for performing the reasoning tasks.- Specified by:
isInstalled
in interfaceQualitativeReasoner<DefaultTheory,
FolFormula> - Returns:
- `true` if the solver is installed and available, `false` otherwise.
-