Module logicng

Class CNFPredicate

  • All Implemented Interfaces:
    FormulaPredicate

    public final class CNFPredicate
    extends Object
    implements FormulaPredicate
    CNF predicate. Indicates whether a formula is in CNF or not.
    Since:
    1.0
    Version:
    1.0
    • Method Detail

      • get

        public static CNFPredicate get()
        Returns the singleton of the predicate.
        Returns:
        the predicate instance
      • 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