- java.lang.Object
-
- org.logicng.explanations.smus.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.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.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.
-
-
-
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 propositionsadditionalConstraints- the additional constraintsf- the formula factory- Returns:
- the SMUS or
nullif 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 *OptimizationFunctioncall and the handler's SAT handler is used for every subsequent SAT call.- Type Parameters:
P- the subtype of the propositions- Parameters:
propositions- the propositionsadditionalConstraints- the additional constraintsf- the formula factoryhandler- the handler, can benull- Returns:
- the SMUS or
nullif 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 formulasadditionalConstraints- the additional constraintsf- the formula factory- Returns:
- the SMUS or
nullif 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 formulasadditionalConstraints- the additional constraintsf- the formula factoryhandler- the SMUS handler, can benull- Returns:
- the SMUS or
nullif the given propositions are satisfiable or the handler aborted the computation
-
-