Module logicng

Class SATPredicate

  • All Implemented Interfaces:
    FormulaPredicate

    public final class SATPredicate
    extends Object
    implements FormulaPredicate
    A SAT solver based SAT predicate. Indicates whether a formula is satisfiable or not.
    Since:
    1.0
    Version:
    1.5.1
    • Constructor Detail

      • SATPredicate

        public SATPredicate​(FormulaFactory f)
        Constructs a new SAT predicate with a given formula factory.
        Parameters:
        f - the formula factory
    • Method Detail

      • test

        public boolean test​(Formula formula,
                            boolean cache)
        Description copied from interface: FormulaPredicate
        Tests the predicate on a given formula.
        Specified by:
        test in interface FormulaPredicate
        Parameters:
        formula - the input formula
        cache - indicates whether the result should be cached in the formula's cache
        Returns:
        true if the formula holds, false otherwise