Class Negation

  • All Implemented Interfaces:
    net.sf.tweety.commons.Formula, net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula, net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula, net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable, net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable, net.sf.tweety.logics.commons.syntax.interfaces.Invertable, net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure, net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware, net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula, net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula

    public class Negation
    extends FolFormula
    The classical negation of first-order logic.
    Author:
    Matthias Thimm
    • Constructor Detail

      • Negation

        public Negation​(net.sf.tweety.logics.commons.syntax.RelationalFormula formula)
    • Method Detail

      • getFormula

        public FolFormula getFormula()
        Specified by:
        getFormula in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
        Overrides:
        getFormula in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • getPredicates

        public Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
      • getFunctors

        public Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
        Specified by:
        getFunctors in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • getAtoms

        public Set<FolAtom> getAtoms()
        Specified by:
        getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Specified by:
        getAtoms in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • containsQuantifier

        public boolean containsQuantifier()
      • isClosed

        public boolean isClosed()
      • substitute

        public Negation substitute​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
                                   net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
                            throws IllegalArgumentException
        Specified by:
        substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
        Specified by:
        substitute in class FolFormula
        Throws:
        IllegalArgumentException
      • isClosed

        public boolean isClosed​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
      • getUnboundVariables

        public Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()
      • isWellBound

        public boolean isWellBound()
      • isWellBound

        public boolean isWellBound​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
      • isLiteral

        public boolean isLiteral()
      • toString

        public String toString()
        Specified by:
        toString in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Overrides:
        equals in class Object
      • isDnf

        public boolean isDnf()
        Description copied from class: FolFormula
        Checks whether this formula is in disjunctive normal form.
        Specified by:
        isDnf in class FolFormula
        Returns:
        "true" iff this formula is in disjunctive normal form.
      • toNnf

        public FolFormula toNnf()
        Description copied from class: FolFormula
        Makes the negation normal form of this formula.
        Specified by:
        toNnf in class FolFormula
        Returns:
        the NNF of this formula
      • collapseAssociativeFormulas

        public FolFormula collapseAssociativeFormulas()
        Description copied from class: FolFormula
        This method collapses all associative operations appearing in this term, e.g. every a||(b||c) becomes a||b||c.
        Specified by:
        collapseAssociativeFormulas in class FolFormula
        Returns:
        the collapsed formula.
      • getTerms

        public Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
      • getTerms

        public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms​(Class<C> cls)
      • clone

        public Negation clone()
        Specified by:
        clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
        Specified by:
        clone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Specified by:
        clone in class FolFormula