Class NLPNot

  • 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 NLPNot
    extends net.sf.tweety.logics.fol.syntax.FolFormula
    A default negation of a first order formula, nested logic programs only allow not quantified formulas. The NLPNot wraps a FOLFormula and checks that this formula does not contain quantifiers, the functionality is delegated to the used inner formula instance.
    Author:
    Tim Janus
    • Constructor Summary

      Constructors 
      Constructor Description
      NLPNot​(net.sf.tweety.logics.fol.syntax.FolFormula inner)
      Ctor: Creates a new default not for nested logic programs by using the given FOL formula as inner formula.
    • Method Summary

      Modifier and Type Method Description
      NLPNot clone()  
      NLPNot collapseAssociativeFormulas()  
      boolean containsQuantifier()  
      boolean equals​(Object other)  
      Set<net.sf.tweety.logics.fol.syntax.FolAtom> getAtoms()  
      Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()  
      Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()  
      Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()  
      <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>
      Set<C>
      getTerms​(Class<C> cls)  
      Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()  
      int hashCode()  
      boolean isClosed()  
      boolean isClosed​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)  
      boolean isDnf()  
      boolean isLiteral()  
      boolean isWellBound()  
      boolean isWellBound​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)  
      NLPNot substitute​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)  
      net.sf.tweety.logics.fol.syntax.FolFormula toNnf()  
      String toString()  
      • Methods inherited from class net.sf.tweety.logics.fol.syntax.FolFormula

        combineWithAnd, combineWithOr, complement, getQuantifierVariables, getSignature, getUniformProbability, toDnf
      • Methods inherited from class net.sf.tweety.logics.commons.syntax.RelationalFormula

        allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed, substitute
    • Constructor Detail

      • NLPNot

        public NLPNot​(net.sf.tweety.logics.fol.syntax.FolFormula inner)
        Ctor: Creates a new default not for nested logic programs by using the given FOL formula as inner formula.
        Parameters:
        inner - The FOL formula used as inner formula.
    • Method Detail

      • getPredicates

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

        public boolean isLiteral()
      • getUnboundVariables

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

        public boolean containsQuantifier()
      • isWellBound

        public boolean isWellBound()
      • isWellBound

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

        public boolean isClosed()
      • isClosed

        public boolean isClosed​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
      • 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)
      • toNnf

        public net.sf.tweety.logics.fol.syntax.FolFormula toNnf()
        Specified by:
        toNnf in class net.sf.tweety.logics.fol.syntax.FolFormula
      • collapseAssociativeFormulas

        public NLPNot collapseAssociativeFormulas()
        Specified by:
        collapseAssociativeFormulas in class net.sf.tweety.logics.fol.syntax.FolFormula
      • isDnf

        public boolean isDnf()
        Specified by:
        isDnf in class net.sf.tweety.logics.fol.syntax.FolFormula
      • substitute

        public NLPNot 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 net.sf.tweety.logics.fol.syntax.FolFormula
        Throws:
        IllegalArgumentException
      • clone

        public NLPNot 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 net.sf.tweety.logics.fol.syntax.FolFormula
      • getAtoms

        public Set<net.sf.tweety.logics.fol.syntax.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
      • getFunctors

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

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

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

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