Module logicng

Class SmusComputation


  • public final class SmusComputation
    extends Object
    Computation of a SMUS (smallest MUS, smallest minimal unsatisfiable set).

    Implementation is based on "Smallest MUS extraction with minimal hitting set dualization" (Ignatiev, Previti, Liffiton, & Marques-Silva, 2015).

    Since:
    2.0.0
    Version:
    2.1.0
    • Method Detail

      • computeSmus

        public static <P extends Proposition> List<P> computeSmus​(List<P> propositions,
                                                                  List<Formula> additionalConstraints,
                                                                  FormulaFactory f)
        Computes the SMUS for the given list of propositions modulo some additional constraint.
        Type Parameters:
        P - the subtype of the propositions
        Parameters:
        propositions - the propositions
        additionalConstraints - the additional constraints
        f - the formula factory
        Returns:
        the SMUS or null if the given propositions are satisfiable or the handler aborted the computation
      • computeSmus

        public static <P extends Proposition> List<P> computeSmus​(List<P> propositions,
                                                                  List<Formula> additionalConstraints,
                                                                  FormulaFactory f,
                                                                  OptimizationHandler handler)
        Computes the SMUS for the given list of propositions modulo some additional constraint.

        The SMUS computation can be called with an OptimizationHandler. The given handler instance will be used for every subsequent * OptimizationFunction call and the handler's SAT handler is used for every subsequent SAT call.

        Type Parameters:
        P - the subtype of the propositions
        Parameters:
        propositions - the propositions
        additionalConstraints - the additional constraints
        f - the formula factory
        handler - the handler, can be null
        Returns:
        the SMUS or null if the given propositions are satisfiable or the handler aborted the computation
      • computeSmusForFormulas

        public static List<Formula> computeSmusForFormulas​(List<Formula> formulas,
                                                           List<Formula> additionalConstraints,
                                                           FormulaFactory f)
        Computes the SMUS for the given list of formulas and some additional constraints.
        Parameters:
        formulas - the formulas
        additionalConstraints - the additional constraints
        f - the formula factory
        Returns:
        the SMUS or null if the given propositions are satisfiable or the handler aborted the computation
      • computeSmusForFormulas

        public static List<Formula> computeSmusForFormulas​(List<Formula> formulas,
                                                           List<Formula> additionalConstraints,
                                                           FormulaFactory f,
                                                           OptimizationHandler handler)
        Computes the SMUS for the given list of formulas and some additional constraints.
        Parameters:
        formulas - the formulas
        additionalConstraints - the additional constraints
        f - the formula factory
        handler - the SMUS handler, can be null
        Returns:
        the SMUS or null if the given propositions are satisfiable or the handler aborted the computation