Module logicng

Class 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 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 implicant
        handler - 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 implicate
        handler - a SAT handler for the underlying SAT Solver
        Returns:
        a prime implicate of null if the computation was aborted by the handler