Class SimpleRelationalCReasoner
- java.lang.Object
-
- net.sf.tweety.logics.rcl.reasoner.SimpleRelationalCReasoner
-
- All Implemented Interfaces:
ModelProvider<RelationalConditional,RclBeliefSet,RelationalRankingFunction>
,QualitativeReasoner<RclBeliefSet,FolFormula>
,Reasoner<java.lang.Boolean,RclBeliefSet,FolFormula>
public class SimpleRelationalCReasoner extends java.lang.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].- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description SimpleRelationalCReasoner(boolean simple)
Creates a new relational c-representation reasoner.
-
Method Summary
Modifier and Type Method Description RelationalRankingFunction
getModel(RclBeliefSet bbase)
Returns a single (dedicated) model of the given belief base.RelationalRankingFunction
getModel(RclBeliefSet bs, FolSignature signature)
Retrieves the C representation of the given belief set wrt.java.util.Collection<RelationalRankingFunction>
getModels(RclBeliefSet bbase)
Returns a characterizing model of the given belief basejava.lang.Boolean
query(RclBeliefSet bs, FolFormula query)
Queries the given belief base for the given formula.java.lang.Boolean
query(RclBeliefSet bs, FolFormula query, FolSignature signature)
Queries the given belief set wrt.
-
-
-
Method Detail
-
query
public java.lang.Boolean query(RclBeliefSet bs, FolFormula query, FolSignature signature)
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
public java.lang.Boolean query(RclBeliefSet bs, FolFormula 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<java.lang.Boolean,RclBeliefSet,FolFormula>
- Parameters:
bs
- a belief basequery
- a formula- Returns:
- the answer to the query
-
getModels
public java.util.Collection<RelationalRankingFunction> getModels(RclBeliefSet bbase)
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
public RelationalRankingFunction getModel(RclBeliefSet 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<RelationalConditional,RclBeliefSet,RelationalRankingFunction>
- Parameters:
bbase
- some belief base- Returns:
- a selected model of the belief base.
-
getModel
public RelationalRankingFunction getModel(RclBeliefSet bs, FolSignature signature)
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)
-
-