Module logicng

Class TautologyPredicate

  • All Implemented Interfaces:
    FormulaPredicate

    public final class TautologyPredicate
    extends Object
    implements FormulaPredicate
    Tautology predicate. Indicates whether a formula is a tautology or not.
    Since:
    1.0
    Version:
    2.0
    • Constructor Detail

      • TautologyPredicate

        public TautologyPredicate​(FormulaFactory f)
        Constructs a new tautology 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