Class ZReasoner

  • All Implemented Interfaces:
    ModelProvider<Conditional,​ClBeliefSet,​RankingFunction>, QualitativeReasoner<ClBeliefSet,​PlFormula>, Reasoner<java.lang.Boolean,​ClBeliefSet,​PlFormula>

    public class ZReasoner
    extends AbstractConditionalLogicReasoner
    This class models a z-reasoner for conditional logic. Reasoning is performed by computing a ranking function based on a tolerating partitioning of a consistent knowledge base
    The conditionals of the knowledge base KB are splitted in different partitions. The first partition KB_0 contains all conditionals (B_i|A_i) that are tolerated by all other rules of the knowledge base, i.e., there exists a world w that satisfies A_iB_i and for all other conditionals (B_j|A_j) it satisfies the material implication A_j => B_j. These conditionals are removed from the knowledge base. The second partition KB_1 contains all conditionals of the remaining conditional set that are tolerated by it. This is done until the original knowledge base is the empty set. This is simultaniously a test on whether or not the knowledge base is consistent. There exists such a partitioning iff the knowledge base is consistent. A world falsifying a conditional r_i gets penalty points according to the maxium partition that contains a falsified world. The penalty points represent the ranking function and are computed as follows Z(r_i) = j iff r_i in KB_j ( 0, if w |= A_i => B_i for all 1<=i<=n Z(w) = < ( max {z(r_i)} + 1 for all conditionals r_i=(B_i|A_i) with w |= A_i !B_i

    See Judea Pearl. System Z: a natural ordering of defaults with tractable applications to default reasoning. In Proceedings of the 3rd conference on Theoretical aspects of reasoning about knowledge, TARK '90, San Francicso, Morgan Kaufmann Publishers Inc. (1990) 121-135
    Author:
    Katharina Diekmann, Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      ZReasoner()  
    • Method Summary

      Modifier and Type Method Description
      RankingFunction getModel​(ClBeliefSet beliefset)
      Returns a single (dedicated) model of the given belief base.
      private boolean isTolerated​(Conditional f, ClBeliefSet kb, java.util.Set<PossibleWorld> omega)
      Checks whether or not the given formula is tolerated by the knowledge base, i.e., there is a world omega that satisfies the formula and does not falsify each conditional (B|A) in the knowledge base (it satisfies the material implication A => B).
      private java.util.ArrayList<ClBeliefSet> partition​(ClBeliefSet kb, java.util.Set<PossibleWorld> omega)
      Returns a partitioning of a knowledge base into partitions containing all conditionals that tolerate the remaining set of conditionals of a knowledge base.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZReasoner

        public ZReasoner()
    • Method Detail

      • partition

        private java.util.ArrayList<ClBeliefSet> partition​(ClBeliefSet kb,
                                                           java.util.Set<PossibleWorld> omega)
        Returns a partitioning of a knowledge base into partitions containing all conditionals that tolerate the remaining set of conditionals of a knowledge base.
        Parameters:
        kb - Knowledge base that needs to be partitioned
        omega - a set of possible worlds
        Returns:
        ArrayList containing consistent belief sets
      • isTolerated

        private boolean isTolerated​(Conditional f,
                                    ClBeliefSet kb,
                                    java.util.Set<PossibleWorld> omega)
        Checks whether or not the given formula is tolerated by the knowledge base, i.e., there is a world omega that satisfies the formula and does not falsify each conditional (B|A) in the knowledge base (it satisfies the material implication A => B).
        Parameters:
        f - formula that should be tolerated by the knowledge base
        kb - corresponding knowledge base
        omega - a set of possible worlds
        Returns:
        true if the Conditional f is tolerated, false otherwise