Class MlFormula

  • 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:
    Necessity, Possibility

    public abstract class MlFormula
    extends net.sf.tweety.logics.fol.syntax.FolFormula
    This class models a modal formula, i.e. it encapsulates an modal operator and a formula (either a modal formula or a FolFormula).
    Author:
    Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      MlFormula​(net.sf.tweety.logics.commons.syntax.RelationalFormula formula)  
    • Method Summary

      Modifier and Type Method Description
      net.sf.tweety.logics.fol.syntax.Conjunction combineWithAnd​(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)  
      net.sf.tweety.logics.fol.syntax.Disjunction combineWithOr​(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)  
      net.sf.tweety.logics.commons.syntax.RelationalFormula complement()  
      boolean containsModalityOperator()
      Checks whether this formula contains a modal operator ("necessity" operator or "possibility" operator).
      boolean containsQuantifier()  
      boolean equals​(Object obj)  
      Set<net.sf.tweety.logics.fol.syntax.FolAtom> getAtoms()  
      net.sf.tweety.logics.commons.syntax.RelationalFormula getFormula()
      Returns the inner formula of this modal formula.
      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.Variable> getQuantifierVariables()  
      net.sf.tweety.logics.fol.syntax.FolSignature getSignature()  
      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()  
      net.sf.tweety.math.probability.Probability getUniformProbability()  
      int hashCode()  
      boolean isClosed()  
      boolean isClosed​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)  
      boolean isLiteral()  
      boolean isWellBound()  
      boolean isWellBound​(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)  
      • Methods inherited from class net.sf.tweety.logics.fol.syntax.FolFormula

        clone, collapseAssociativeFormulas, isDnf, substitute, toDnf, toNnf
      • Methods inherited from class net.sf.tweety.logics.commons.syntax.RelationalFormula

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

      • MlFormula

        public MlFormula​(net.sf.tweety.logics.commons.syntax.RelationalFormula formula)
    • Method Detail

      • getSignature

        public net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
        Specified by:
        getSignature in interface net.sf.tweety.commons.Formula
        Overrides:
        getSignature in class net.sf.tweety.logics.fol.syntax.FolFormula
      • getUniformProbability

        public net.sf.tweety.math.probability.Probability getUniformProbability()
        Specified by:
        getUniformProbability in interface net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware
        Overrides:
        getUniformProbability in class net.sf.tweety.logics.fol.syntax.FolFormula
      • getFormula

        public net.sf.tweety.logics.commons.syntax.RelationalFormula getFormula()
        Returns the inner formula of this modal formula.
        Specified by:
        getFormula in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
        Overrides:
        getFormula in class net.sf.tweety.logics.commons.syntax.RelationalFormula
        Returns:
        the inner formula of this modal formula.
      • 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:
        getFunctors in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • 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
      • containsQuantifier

        public boolean containsQuantifier()
      • isClosed

        public boolean isClosed()
      • 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)
      • combineWithAnd

        public net.sf.tweety.logics.fol.syntax.Conjunction combineWithAnd​(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)
        Specified by:
        combineWithAnd in interface net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable
        Overrides:
        combineWithAnd in class net.sf.tweety.logics.fol.syntax.FolFormula
      • combineWithOr

        public net.sf.tweety.logics.fol.syntax.Disjunction combineWithOr​(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)
        Specified by:
        combineWithOr in interface net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable
        Overrides:
        combineWithOr in class net.sf.tweety.logics.fol.syntax.FolFormula
      • complement

        public net.sf.tweety.logics.commons.syntax.RelationalFormula complement()
        Specified by:
        complement in interface net.sf.tweety.logics.commons.syntax.interfaces.Invertable
        Overrides:
        complement in class net.sf.tweety.logics.fol.syntax.FolFormula
      • isLiteral

        public boolean isLiteral()
      • 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)
      • 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 net.sf.tweety.logics.fol.syntax.FolFormula
      • hashCode

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

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

        public boolean containsModalityOperator()
        Checks whether this formula contains a modal operator ("necessity" operator or "possibility" operator).
        Returns:
        true if formula contains modality, false otherwise