Class SimpleRelationalCReasoner
java.lang.Object
org.tweetyproject.logics.rcl.reasoner.SimpleRelationalCReasoner
- All Implemented Interfaces:
ModelProvider<RelationalConditional,
,RclBeliefSet, RelationalRankingFunction> QualitativeReasoner<RclBeliefSet,
,FolFormula> Reasoner<Boolean,
RclBeliefSet, FolFormula>
public class SimpleRelationalCReasoner
extends Object
implements QualitativeReasoner<RclBeliefSet,FolFormula>, ModelProvider<RelationalConditional,RclBeliefSet,RelationalRankingFunction>
This class models a relational brute force c-reasoner for relational conditional logic. Reasoning is performed
by computing a minimal c-representation for the given knowledge base.
A c-representation for a conditional knowledge base R={r1,...,rn} is a ranking function k such that k accepts every conditional in R (k |= R) and if there are numbers k0,k1+,k1-,...,kn+,kn- with
k(w)=k0 + \sum_{w verifies ri} ki+ + \sum_{w falsifies ri} kj- for every w. A c-representation is minimal if k0+...+kn- is minimal.
The c-representation is computed using a brute force approach.
See Gabriele Kern-Isberner. Conditionals in nonmonotonic reasoning and belief revision. Lecture Notes in Computer Science, Volume 2087. 2001.
See also [Kern-Isberner,Thimm, "A Ranking Semantics for Relational Defaults", in preparation].
A c-representation for a conditional knowledge base R={r1,...,rn} is a ranking function k such that k accepts every conditional in R (k |= R) and if there are numbers k0,k1+,k1-,...,kn+,kn- with
k(w)=k0 + \sum_{w verifies ri} ki+ + \sum_{w falsifies ri} kj- for every w. A c-representation is minimal if k0+...+kn- is minimal.
The c-representation is computed using a brute force approach.
See Gabriele Kern-Isberner. Conditionals in nonmonotonic reasoning and belief revision. Lecture Notes in Computer Science, Volume 2087. 2001.
See also [Kern-Isberner,Thimm, "A Ranking Semantics for Relational Defaults", in preparation].
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionSimpleRelationalCReasoner
(boolean simple) Creates a new relational c-representation reasoner. -
Method Summary
Modifier and TypeMethodDescriptiongetModel
(RclBeliefSet bbase) Returns a single (dedicated) model of the given belief base.getModel
(RclBeliefSet bs, FolSignature signature) Retrieves the C representation of the given belief set wrt.getModels
(RclBeliefSet 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
(RclBeliefSet bs, FolFormula query) Queries the given belief base with the provided formula and returns a boolean result.query
(RclBeliefSet bs, FolFormula query, FolSignature signature) Queries the given belief set wrt.
-
Constructor Details
-
SimpleRelationalCReasoner
public SimpleRelationalCReasoner(boolean simple) Creates a new relational c-representation reasoner.- Parameters:
simple
- whether the computed c-representation is simple.
-
-
Method Details
-
query
Queries the given belief set wrt. the given signature.- Parameters:
bs
- some belief setquery
- some querysignature
- some signature- Returns:
- true iff the query is true
-
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<RclBeliefSet,
FolFormula> - Specified by:
query
in interfaceReasoner<Boolean,
RclBeliefSet, FolFormula> - Parameters:
bs
- 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.
-
getModels
Description copied from interface:ModelProvider
Returns a characterizing model of the given belief base- Specified by:
getModels
in interfaceModelProvider<RelationalConditional,
RclBeliefSet, RelationalRankingFunction> - 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<RelationalConditional,
RclBeliefSet, RelationalRankingFunction> - Parameters:
bbase
- some belief base- Returns:
- a selected model of the belief base.
-
getModel
Retrieves the C representation of the given belief set wrt. the given signature- Parameters:
bs
- some belief setsignature
- some signature- Returns:
- the c representation (a ranking function)
-
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<RclBeliefSet,
FolFormula> - Returns:
- `true` if the solver is installed and available, `false` otherwise.
-