Package net.sf.tweety.logics.fol.syntax
Class FolFormula
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.fol.syntax.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.RelationalFormulaThe 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 FolFormulaclone()abstract net.sf.tweety.logics.commons.syntax.RelationalFormulacollapseAssociativeFormulas()This method collapses all associative operations appearing in this term, e.g.ConjunctioncombineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)DisjunctioncombineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)net.sf.tweety.logics.commons.syntax.RelationalFormulacomplement()Set<net.sf.tweety.logics.commons.syntax.Variable>getQuantifierVariables()FolSignaturegetSignature()net.sf.tweety.math.probability.ProbabilitygetUniformProbability()abstract booleanisDnf()Checks whether this formula is in disjunctive normal form.abstract FolFormulasubstitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)FolFormulatoDnf()Makes a disjunctive normal form of this formula.abstract FolFormulatoNnf()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 class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure
getTerms, getTerms
-
-
-
-
Method Detail
-
combineWithAnd
public Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)
- Specified by:
combineWithAndin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Conjunctable- Specified by:
combineWithAndin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
combineWithOr
public Disjunction combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)
- Specified by:
combineWithOrin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Disjunctable- Specified by:
combineWithOrin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
complement
public net.sf.tweety.logics.commons.syntax.RelationalFormula complement()
- Specified by:
complementin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Invertable- Specified by:
complementin classnet.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:
getUniformProbabilityin interfacenet.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware- Specified by:
getUniformProbabilityin classnet.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:
substitutein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
substitutein classnet.sf.tweety.logics.commons.syntax.RelationalFormula- Throws:
IllegalArgumentException
-
clone
public abstract FolFormula clone()
- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
clonein classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
getSignature
public FolSignature getSignature()
-
-