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
ConstructorsConstructorDescriptionSimpleRelationalCReasoner
(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
query
(RclBeliefSet bs, FolFormula query) Queries the given belief base for the given formula.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:Reasoner
Queries the given belief base for the given formula.- Specified by:
query
in interfaceQualitativeReasoner<RclBeliefSet,
FolFormula> - Specified by:
query
in interfaceReasoner<Boolean,
RclBeliefSet, FolFormula> - Parameters:
bs
- a belief basequery
- a formula- Returns:
- the answer to the query
-
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()- Specified by:
isInstalled
in interfaceQualitativeReasoner<RclBeliefSet,
FolFormula> - Returns:
- if the solver is installed
-