public class CReasoner extends Reasoner
Modifier and Type | Field and Description |
---|---|
private RankingFunction |
crepresentation
The c-representation for this knowledge base.
|
Constructor and Description |
---|
CReasoner(BeliefBase beliefBase)
Creates a new c-representation reasoner for the given knowledge base.
|
Modifier and Type | Method and Description |
---|---|
private RankingFunction |
computeCRepresentation()
Computes a minimal c-representation for this reasoner's knowledge base.
|
private Statement |
getAcceptanceConstraint(Conditional cond,
java.util.Map<PossibleWorld,IntegerVariable> ranks)
For the given conditional (B|A) and the given ranks of possible worlds, this
method constructs the inequation k(AB) < k(A-B) where k(AB) is the minimum of
the ranks of the interpretations that satisfy AB.
|
RankingFunction |
getCRepresentation()
Returns the c-representation this reasoner bases on.
|
private Statement |
getRankConstraint(PossibleWorld w,
IntegerVariable ranki,
java.util.Map<Conditional,IntegerVariable> kappa_pos,
java.util.Map<Conditional,IntegerVariable> kappa_neg)
For the given interpretation "i" and the given kappas, this method
computes the constraint
k("i")=\sum_{"i" verifies ri} ki+ + \sum_{"i" falsifies ri} kj- |
Answer |
query(Formula query)
This method determines the answer of the given query
wrt.
|
getKnowledgeBase
private RankingFunction crepresentation
public CReasoner(BeliefBase beliefBase)
beliefBase
- a knowledge base.public Answer query(Formula query)
Reasoner
public RankingFunction getCRepresentation()
private RankingFunction computeCRepresentation()
private Statement getAcceptanceConstraint(Conditional cond, java.util.Map<PossibleWorld,IntegerVariable> ranks)
cond
- a conditionalranks
- a map from possible worlds to integer variablesprivate Statement getRankConstraint(PossibleWorld w, IntegerVariable ranki, java.util.Map<Conditional,IntegerVariable> kappa_pos, java.util.Map<Conditional,IntegerVariable> kappa_neg)
i
- a possible world.ranki
- the rank (an integer variable) of interpretation "i".kappa_pos
- the positive penalties for interpretations.kappa_min
- the negative penalties for interpretations.