Package net.sf.tweety.logics.fol.syntax
Class Disjunction
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.fol.syntax.FolFormula
-
- net.sf.tweety.logics.fol.syntax.AssociativeFolFormula
-
- net.sf.tweety.logics.fol.syntax.Disjunction
-
- All Implemented Interfaces:
java.lang.Iterable<RelationalFormula>
,java.util.Collection<RelationalFormula>
,java.util.List<RelationalFormula>
,Formula
,AssociativeFormulaSupport.AssociativeSupportBridge
,AssociativeFormula<RelationalFormula>
,ClassicalFormula
,ComplexLogicalFormula
,Conjunctable
,Disjunctable
,Invertable
,LogicStructure
,ProbabilityAware
,QuantifiedFormula
,SimpleLogicalFormula
public class Disjunction extends AssociativeFolFormula
The classical disjunction of first-order logic.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description Disjunction()
Creates a new (empty) disjunction.Disjunction(java.util.Collection<? extends RelationalFormula> formulas)
Creates a new disjunction with the given inner formulas.Disjunction(RelationalFormula first, RelationalFormula second)
Creates a new disjunction with the two given formulae
-
Method Summary
Modifier and Type Method Description Disjunction
clone()
Creates a deep copy of this formulaRelationalFormula
collapseAssociativeFormulas()
This method collapses all associative operations appearing in this term, e.g.Disjunction
createEmptyFormula()
java.lang.String
getEmptySymbol()
java.lang.String
getOperatorSymbol()
boolean
isDnf()
Checks whether this formula is in disjunctive normal form.FolFormula
toNnf()
Makes the negation normal form of this formula.-
Methods inherited from class net.sf.tweety.logics.fol.syntax.AssociativeFolFormula
add, add, add, addAll, addAll, clear, contains, containsAll, containsQuantifier, createEmptySignature, equals, get, getAtoms, getFormulas, getFormulas, getFunctors, getPredicates, getQuantifierVariables, getTerms, getTerms, getUnboundVariables, hashCode, indexOf, isClosed, isClosed, isEmpty, isLiteral, isWellBound, isWellBound, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, substitute, substitute, toArray, toArray, toString
-
Methods inherited from class net.sf.tweety.logics.fol.syntax.FolFormula
combineWithAnd, combineWithOr, complement, getSignature, getUniformProbability, toDnf
-
Methods inherited from class net.sf.tweety.logics.commons.syntax.RelationalFormula
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed
-
Methods inherited from interface net.sf.tweety.commons.Formula
getSignature
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
getPredicateCls
-
-
-
-
Constructor Detail
-
Disjunction
public Disjunction(java.util.Collection<? extends RelationalFormula> formulas)
Creates a new disjunction with the given inner formulas.- Parameters:
formulas
- a collection of formulas.
-
Disjunction
public Disjunction()
Creates a new (empty) disjunction.
-
Disjunction
public Disjunction(RelationalFormula first, RelationalFormula second)
Creates a new disjunction with the two given formulae- Parameters:
first
- a relational formula.second
- a relational formula.
-
-
Method Detail
-
isDnf
public boolean isDnf()
Description copied from class:FolFormula
Checks whether this formula is in disjunctive normal form.- Specified by:
isDnf
in classFolFormula
- Returns:
- "true" iff this formula is in disjunctive normal form.
-
toNnf
public FolFormula toNnf()
Description copied from class:FolFormula
Makes the negation normal form of this formula.- Specified by:
toNnf
in classFolFormula
- Returns:
- the NNF of this formula
-
collapseAssociativeFormulas
public RelationalFormula 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 classFolFormula
- Returns:
- the collapsed formula.
-
clone
public Disjunction clone()
Description copied from interface:SimpleLogicalFormula
Creates a deep copy of this formula- Specified by:
clone
in interfaceComplexLogicalFormula
- Specified by:
clone
in interfaceSimpleLogicalFormula
- Specified by:
clone
in classFolFormula
- Returns:
- the cloned formula
-
createEmptyFormula
public Disjunction createEmptyFormula()
- Returns:
- an empty version of the AssociativeFormula
-
getOperatorSymbol
public java.lang.String getOperatorSymbol()
- Returns:
- A String representing the operator which connects two items of the associative formula.
-
getEmptySymbol
public java.lang.String getEmptySymbol()
- Returns:
- A String representing an empty version of the Associative Formula implementation
-
-