Class SpecialFormula

  • 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
    Direct Known Subclasses:
    Contradiction, Tautology

    public abstract class SpecialFormula
    extends FolFormula
    This class captures the common functionalities of the special formulas tautology and contradiction.
    Author:
    Matthias Thimm
    • Constructor Detail

      • SpecialFormula

        public SpecialFormula()
    • Method Detail

      • containsQuantifier

        public boolean containsQuantifier()
      • 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)
      • 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
      • getPredicates

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

        public boolean isClosed()
      • isClosed

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

        public boolean isWellBound()
      • isWellBound

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

        public boolean isLiteral()
      • substitute

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

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

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

        public Set<FolFormula> getQuantifiedFormulas()
      • 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.