Class ExistsQuantifiedFormula

  • 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 ExistsQuantifiedFormula
    extends FolFormula
    Exists-quantified first-order logic formula. Delegates to QuantifiedFormulaSupport for shared functionalities with other quantified formulas.
    Author:
    Matthias Thimm, Anna Gessler
    • Field Detail

      • support

        protected net.sf.tweety.logics.commons.syntax.QuantifiedFormulaSupport<FolFormula> support
        This helper class implements common functionalities of quantified formulas, meaning the implementation can delegate the method calls to the support class.
    • Constructor Detail

      • ExistsQuantifiedFormula

        public ExistsQuantifiedFormula​(net.sf.tweety.logics.commons.syntax.RelationalFormula folFormula,
                                       Set<net.sf.tweety.logics.commons.syntax.Variable> variables)
        Creates a new quantified folFormula with the given folFormula and variables.
        Parameters:
        folFormula - the folFormula this quantified folFormula ranges over.
        variables - the variables of this quantified folFormula.
      • ExistsQuantifiedFormula

        public ExistsQuantifiedFormula​(net.sf.tweety.logics.commons.syntax.RelationalFormula folFormula,
                                       net.sf.tweety.logics.commons.syntax.Variable variable)
        Creates a new quantified folFormula with the given folFormula and variable.
        Parameters:
        folFormula - the folFormula this quantified folFormula ranges over.
        variable - the variable of this quantified folFormula.
    • Method Detail

      • getQuantifiedFormulas

        public Set<FolFormula> getQuantifiedFormulas()
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Overrides:
        equals in class Object
      • 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.
      • toString

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

        public ExistsQuantifiedFormula 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
      • 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
      • getQuantifierVariables

        public Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()
        Specified by:
        getQuantifierVariables in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
        Overrides:
        getQuantifierVariables in class FolFormula
      • setFormula

        public void setFormula​(FolFormula formula)
      • setQuantifierVariables

        public void setQuantifierVariables​(Set<net.sf.tweety.logics.commons.syntax.Variable> variables)
      • 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
      • getFunctors

        public Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
        Specified by:
        getFunctors in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • 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.
      • 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)