Class SimpleRelationalCReasoner

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger log
      Logger.
      private boolean simple
      indicates whether the computed c-representation is simple.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleRelationalCReasoner​(boolean simple)
      Creates a new relational c-representation reasoner.
    • Field Detail

      • log

        private static org.slf4j.Logger log
        Logger.
      • simple

        private boolean simple
        indicates whether the computed c-representation is simple.
    • Constructor Detail

      • SimpleRelationalCReasoner

        public SimpleRelationalCReasoner​(boolean simple)
        Creates a new relational c-representation reasoner.
        Parameters:
        simple - whether the computed c-representation is simple.
    • 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 set
        query - some query
        signature - some signature
        Returns:
        true iff the query is true
      • constructRankingFunction

        private RelationalRankingFunction constructRankingFunction​(java.lang.Integer[] kappa,
                                                                   java.util.Map<java.lang.Integer,​RelationalConditional> indexToConditional,
                                                                   FolSignature signature)
        Constructs a ranking function with the given kappa values [k1+,k1-,...,kn+,kn-], i.e. for every possible world w set
        k(w)=k0 + \sum_{ w verifies ri} ki+ + \sum_{w falsifies ri} kj-
        Parameters:
        kappa - the kappa values
        indexToConditional - a map mapping indices to conditionals
        signature - the signature
        Returns:
        the ranking function
      • increment

        private java.lang.Integer[] increment​(java.util.List<java.lang.Integer[]> kappa_all,
                                              int numConditionals)
        This method increments the given array by one value.
        Parameters:
        kappa_all - the values of all kappas
        numConditionals - the number of conditionals
        Returns:
        an array of integers.
      • incrementStep

        private boolean incrementStep​(java.lang.Integer[] kappaRow)
        This method increments the given vector (which composes of exactly one "1" entry and zeros otherwise), e.g. [0,0,1,0] -> [0,0,0,1] and [0,0,0,1] -> [1,0,0,0]
        Parameters:
        kappaRow - a vector of zeros and one "1"
        Returns:
        "true" if there is an overflow, i.e. when [0,0,0,1] -> [1,0,0,0], otherwise "false".
      • 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 set
        signature - some signature
        Returns:
        the c representation (a ranking function)