Package net.sf.tweety.logics.fol.syntax
Class Negation
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.fol.syntax.FolFormula
-
- net.sf.tweety.logics.fol.syntax.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 Summary
Constructors Constructor Description Negation(net.sf.tweety.logics.commons.syntax.RelationalFormula formula)
-
Method Summary
Modifier and Type Method Description Negationclone()FolFormulacollapseAssociativeFormulas()This method collapses all associative operations appearing in this term, e.g.booleancontainsQuantifier()booleanequals(Object obj)Set<FolAtom>getAtoms()FolFormulagetFormula()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()Checks whether this formula is in disjunctive normal form.booleanisLiteral()booleanisWellBound()booleanisWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)Negationsubstitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)FolFormulatoNnf()Makes the negation normal form of this formula.StringtoString()-
Methods inherited from class net.sf.tweety.logics.fol.syntax.FolFormula
combineWithAnd, combineWithOr, complement, getQuantifierVariables, getSignature, getUniformProbability, toDnf
-
-
-
-
Method Detail
-
getFormula
public FolFormula getFormula()
- Specified by:
getFormulain interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula- Overrides:
getFormulain classnet.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:
getFunctorsin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
getAtoms
public Set<FolAtom> getAtoms()
- Specified by:
getAtomsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
getAtomsin classnet.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:
substitutein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
substitutein classFolFormula- 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:
toStringin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
isDnf
public boolean isDnf()
Description copied from class:FolFormulaChecks whether this formula is in disjunctive normal form.- Specified by:
isDnfin classFolFormula- Returns:
- "true" iff this formula is in disjunctive normal form.
-
toNnf
public FolFormula toNnf()
Description copied from class:FolFormulaMakes the negation normal form of this formula.- Specified by:
toNnfin classFolFormula- Returns:
- the NNF of this formula
-
collapseAssociativeFormulas
public FolFormula collapseAssociativeFormulas()
Description copied from class:FolFormulaThis method collapses all associative operations appearing in this term, e.g. every a||(b||c) becomes a||b||c.- Specified by:
collapseAssociativeFormulasin classFolFormula- 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:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
clonein classFolFormula
-
-