- java.lang.Object
-
- org.logicng.primecomputation.NaivePrimeReduction
-
public final class NaivePrimeReduction extends Object
Naive implementation for reducing implicants and implicates to prime ones.The computation is initialized with the formula for which the prime implicants/implicates should be computed.
- Since:
- 2.0.0
- Version:
- 2.1.0
-
-
Constructor Summary
Constructors Constructor Description NaivePrimeReduction(Formula formula)Creates a new prime implicant computation for a given formula.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedSet<Literal>reduceImplicant(SortedSet<Literal> implicant)Computes a prime implicant from the given implicant for the given formula.SortedSet<Literal>reduceImplicant(SortedSet<Literal> implicant, SATHandler handler)Computes a prime implicant from the given implicant for the given formula.SortedSet<Literal>reduceImplicate(SortedSet<Literal> implicate)Computes a prime implicate from the given implicate for the given formula.SortedSet<Literal>reduceImplicate(SortedSet<Literal> implicate, SATHandler handler)Computes a prime implicate from the given implicate for the given formula.
-
-
-
Constructor Detail
-
NaivePrimeReduction
public NaivePrimeReduction(Formula formula)
Creates a new prime implicant computation for a given formula.- Parameters:
formula- the formula
-
-
Method Detail
-
reduceImplicant
public SortedSet<Literal> reduceImplicant(SortedSet<Literal> implicant)
Computes a prime implicant from the given implicant for the given formula. Assumption: Given implicant is a satisfying assignment for the formula- Parameters:
implicant- the implicant- Returns:
- a prime implicant
-
reduceImplicant
public SortedSet<Literal> reduceImplicant(SortedSet<Literal> implicant, SATHandler handler)
Computes a prime implicant from the given implicant for the given formula. Assumption: Given implicant is a satisfying assignment for the formula- Parameters:
implicant- the implicanthandler- a SAT handler for the underlying SAT Solver- Returns:
- a prime implicant or null if the computation was aborted by the handler
-
reduceImplicate
public SortedSet<Literal> reduceImplicate(SortedSet<Literal> implicate)
Computes a prime implicate from the given implicate for the given formula. Assumption: Given implicate is a falsifying assignment for the formula, i.e. a satisfying assignment for the negated formula- Parameters:
implicate- the implicate- Returns:
- a prime implicate
-
reduceImplicate
public SortedSet<Literal> reduceImplicate(SortedSet<Literal> implicate, SATHandler handler)
Computes a prime implicate from the given implicate for the given formula. Assumption: Given implicate is a falsifying assignment for the formula, i.e. a satisfying assignment for the negated formula- Parameters:
implicate- the implicatehandler- a SAT handler for the underlying SAT Solver- Returns:
- a prime implicate of null if the computation was aborted by the handler
-
-