Class SdInconsistencyMeasure

  • All Implemented Interfaces:
    InconsistencyMeasure<Program>

    public class SdInconsistencyMeasure
    extends java.lang.Object
    implements InconsistencyMeasure<Program>
    This class implements the inconsistency measure $I_sd$ from [Ulbricht, Thimm, Brewka. Measuring Inconsistency in Answer Set Programs. JELIA 2016]
    The implememtation is a straightforward brute-force search approach.
    Author:
    Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      SdInconsistencyMeasure​(ASPSolver solver)
      Creates a new inconsistency measure based on the given solver.
    • Method Summary

      Modifier and Type Method Description
      java.lang.Double inconsistencyMeasure​(Program beliefBase)
      This method measures the inconsistency of the given belief base.
      private boolean isConsistent​(java.util.Collection<ASPLiteral> c)
      Checks whether the given set of literals is consistent, i.e.
      • Methods inherited from class java.lang.Object

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

      • solver

        private ASPSolver solver
        The ASP solver used for determining inconsistency
    • Constructor Detail

      • SdInconsistencyMeasure

        public SdInconsistencyMeasure​(ASPSolver solver)
        Creates a new inconsistency measure based on the given solver.
        Parameters:
        solver - some ASP solver
    • Method Detail

      • isConsistent

        private boolean isConsistent​(java.util.Collection<ASPLiteral> c)
        Checks whether the given set of literals is consistent, i.e. does not contain two complementary literals.
        Parameters:
        c - some set
        Returns:
        "true" if the set does not contain two complementary literals
      • inconsistencyMeasure

        public java.lang.Double inconsistencyMeasure​(Program beliefBase)
        Description copied from interface: InconsistencyMeasure
        This method measures the inconsistency of the given belief base.
        Specified by:
        inconsistencyMeasure in interface InconsistencyMeasure<Program>
        Parameters:
        beliefBase - a belief base.
        Returns:
        a Double indicating the degree of inconsistency.