Package net.sf.tweety.logics.ml.syntax
Class MlFormula
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.fol.syntax.FolFormula
-
- net.sf.tweety.logics.ml.syntax.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.FolFormulaThis 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.ConjunctioncombineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)net.sf.tweety.logics.fol.syntax.DisjunctioncombineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)net.sf.tweety.logics.commons.syntax.RelationalFormulacomplement()booleancontainsModalityOperator()Checks whether this formula contains a modal operator ("necessity" operator or "possibility" operator).booleancontainsQuantifier()booleanequals(Object obj)Set<net.sf.tweety.logics.fol.syntax.FolAtom>getAtoms()net.sf.tweety.logics.commons.syntax.RelationalFormulagetFormula()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.FolSignaturegetSignature()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.ProbabilitygetUniformProbability()inthashCode()booleanisClosed()booleanisClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)booleanisLiteral()booleanisWellBound()booleanisWellBound(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
-
-
-
-
Method Detail
-
getSignature
public net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
- Specified by:
getSignaturein interfacenet.sf.tweety.commons.Formula- Overrides:
getSignaturein classnet.sf.tweety.logics.fol.syntax.FolFormula
-
getUniformProbability
public net.sf.tweety.math.probability.Probability getUniformProbability()
- Specified by:
getUniformProbabilityin interfacenet.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware- Overrides:
getUniformProbabilityin classnet.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:
getFormulain interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula- Overrides:
getFormulain classnet.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:
getFunctorsin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
getAtoms
public Set<net.sf.tweety.logics.fol.syntax.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()
-
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:
combineWithAndin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Conjunctable- Overrides:
combineWithAndin classnet.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:
combineWithOrin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Disjunctable- Overrides:
combineWithOrin classnet.sf.tweety.logics.fol.syntax.FolFormula
-
complement
public net.sf.tweety.logics.commons.syntax.RelationalFormula complement()
- Specified by:
complementin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Invertable- Overrides:
complementin classnet.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:
getQuantifierVariablesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula- Overrides:
getQuantifierVariablesin classnet.sf.tweety.logics.fol.syntax.FolFormula
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
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
-
-