Package net.sf.tweety.lp.nlp.syntax
Class NLPNot
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.fol.syntax.FolFormula
-
- net.sf.tweety.lp.nlp.syntax.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.FolFormulaA 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 NLPNotclone()NLPNotcollapseAssociativeFormulas()booleancontainsQuantifier()booleanequals(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()inthashCode()booleanisClosed()booleanisClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)booleanisDnf()booleanisLiteral()booleanisWellBound()booleanisWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)NLPNotsubstitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)net.sf.tweety.logics.fol.syntax.FolFormulatoNnf()StringtoString()-
Methods inherited from class net.sf.tweety.logics.fol.syntax.FolFormula
combineWithAnd, combineWithOr, complement, getQuantifierVariables, getSignature, getUniformProbability, toDnf
-
-
-
-
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:
toNnfin classnet.sf.tweety.logics.fol.syntax.FolFormula
-
collapseAssociativeFormulas
public NLPNot collapseAssociativeFormulas()
- Specified by:
collapseAssociativeFormulasin classnet.sf.tweety.logics.fol.syntax.FolFormula
-
isDnf
public boolean isDnf()
- Specified by:
isDnfin classnet.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:
substitutein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
substitutein classnet.sf.tweety.logics.fol.syntax.FolFormula- Throws:
IllegalArgumentException
-
clone
public NLPNot clone()
- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
clonein classnet.sf.tweety.logics.fol.syntax.FolFormula
-
getAtoms
public Set<net.sf.tweety.logics.fol.syntax.FolAtom> getAtoms()
- Specified by:
getAtomsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
getAtomsin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
getFunctors
public Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
- Specified by:
getFunctorsin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
toString
public String toString()
- Specified by:
toStringin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
equals
public boolean equals(Object other)
-
-