Module logicng

Class ContainsPBCPredicate

  • All Implemented Interfaces:
    FormulaPredicate

    public final class ContainsPBCPredicate
    extends Object
    implements FormulaPredicate
    Predicate to test if a formula contains any subformula that is a pseudo-Boolean constraint.
    Since:
    2.0.0
    Version:
    2.0.0
    • Method Detail

      • get

        public static ContainsPBCPredicate 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