Class FolFormula

  • 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:
    AssociativeFolFormula, Equivalence, ExistsQuantifiedFormula, FolAtom, ForallQuantifiedFormula, Implication, Negation, SpecialFormula

    public abstract class FolFormula
    extends net.sf.tweety.logics.commons.syntax.RelationalFormula
    The common abstract class for formulas of first-order logic. NOTE: "RelationalFormula" and "FolFormula" differ in their meaning as follows:
    • A relational formula is any formula over a first-order signature, i.e. even a conditional
    • A first-order formula is the actual first-order formula in the classical sense.
    Author:
    Matthias Thimm, Tim Janus
    • Constructor Summary

      Constructors 
      Constructor Description
      FolFormula()  
    • Method Summary

      Modifier and Type Method Description
      abstract FolFormula clone()  
      abstract net.sf.tweety.logics.commons.syntax.RelationalFormula collapseAssociativeFormulas()
      This method collapses all associative operations appearing in this term, e.g.
      Conjunction combineWithAnd​(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)  
      Disjunction combineWithOr​(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)  
      net.sf.tweety.logics.commons.syntax.RelationalFormula complement()  
      Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()  
      FolSignature getSignature()  
      net.sf.tweety.math.probability.Probability getUniformProbability()  
      abstract boolean isDnf()
      Checks whether this formula is in disjunctive normal form.
      abstract FolFormula substitute​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)  
      FolFormula toDnf()
      Makes a disjunctive normal form of this formula.
      abstract FolFormula toNnf()
      Makes the negation normal form of this formula.
      • Methods inherited from class net.sf.tweety.logics.commons.syntax.RelationalFormula

        allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getAtoms, getFormula, getFunctors, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed, substitute, toString
      • Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure

        getTerms, getTerms
      • Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula

        containsQuantifier, getUnboundVariables, isClosed, isClosed, isWellBound, isWellBound
      • Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula

        equals, getPredicates, hashCode, isLiteral
    • Constructor Detail

      • FolFormula

        public FolFormula()
    • Method Detail

      • combineWithAnd

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

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

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

        public Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()
      • toDnf

        public FolFormula toDnf()
        Makes a disjunctive normal form of this formula.
        Returns:
        the DNF of this formula
      • toNnf

        public abstract FolFormula toNnf()
        Makes the negation normal form of this formula.
        Returns:
        the NNF of this formula
      • collapseAssociativeFormulas

        public abstract net.sf.tweety.logics.commons.syntax.RelationalFormula collapseAssociativeFormulas()
        This method collapses all associative operations appearing in this term, e.g. every a||(b||c) becomes a||b||c.
        Returns:
        the collapsed formula.
      • getUniformProbability

        public net.sf.tweety.math.probability.Probability getUniformProbability()
        Specified by:
        getUniformProbability in interface net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware
        Specified by:
        getUniformProbability in class net.sf.tweety.logics.commons.syntax.RelationalFormula
      • isDnf

        public abstract boolean isDnf()
        Checks whether this formula is in disjunctive normal form.
        Returns:
        "true" iff this formula is in disjunctive normal form.
      • substitute

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

        public abstract FolFormula 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 net.sf.tweety.logics.commons.syntax.RelationalFormula