Module logicng

Class TermPredicate

  • All Implemented Interfaces:
    FormulaPredicate

    public final class TermPredicate
    extends Object
    implements FormulaPredicate
    Term predicate. Indicates whether a formula is a minterm (conjunction of literals) or maxterm (disjunction of literals).
    Since:
    2.2.0
    Version:
    2.3.0
    • Method Detail

      • minterm

        public static TermPredicate minterm()
        Returns the singleton minterm predicate.
        Returns:
        the minterm predicate instance
      • maxterm

        public static TermPredicate maxterm()
        Returns the singleton maxterm predicate.
        Returns:
        the maxterm 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