Class ExclusiveDisjunction
java.lang.Object
org.tweetyproject.logics.commons.syntax.RelationalFormula
org.tweetyproject.logics.fol.syntax.FolFormula
org.tweetyproject.logics.fol.syntax.AssociativeFolFormula
org.tweetyproject.logics.fol.syntax.ExclusiveDisjunction
- All Implemented Interfaces:
Iterable<RelationalFormula>
,Collection<RelationalFormula>
,List<RelationalFormula>
,SequencedCollection<RelationalFormula>
,Formula
,AssociativeFormulaSupport.AssociativeSupportBridge
,AssociativeFormula<RelationalFormula>
,ClassicalFormula
,ComplexLogicalFormula
,Conjunctable
,Disjunctable
,Invertable
,LogicStructure
,ProbabilityAware
,QuantifiedFormula
,SimpleLogicalFormula
The exclusive disjunction (XOR) in first-order logic.
- Author:
- Anna Gessler
-
Constructor Summary
ConstructorDescriptionCreates a new (empty) exclusive disjunction.ExclusiveDisjunction
(Collection<? extends RelationalFormula> formulas) Creates a new exclusive disjunction with the given inner formulas.ExclusiveDisjunction
(RelationalFormula first, RelationalFormula second) Creates a new exclusive disjunction with the two given formulae -
Method Summary
Methods inherited from class org.tweetyproject.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 org.tweetyproject.logics.fol.syntax.FolFormula
combineWithAnd, combineWithOr, complement, getSignature, getUniformProbability, toDnf
Methods inherited from class org.tweetyproject.logics.commons.syntax.RelationalFormula
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface org.tweetyproject.commons.Formula
getSignature
Methods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
Methods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.SimpleLogicalFormula
getPredicateCls
-
Constructor Details
-
ExclusiveDisjunction
Creates a new exclusive disjunction with the given inner formulas.- Parameters:
formulas
- a collection of formulas.
-
ExclusiveDisjunction
public ExclusiveDisjunction()Creates a new (empty) exclusive disjunction. -
ExclusiveDisjunction
Creates a new exclusive disjunction with the two given formulae- Parameters:
first
- a relational formula.second
- a relational formula.
-
-
Method Details
-
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
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
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
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
- Returns:
- an empty version of the AssociativeFormula
-
getOperatorSymbol
- Returns:
- A String representing the operator which connects two items of the associative formula.
-
getEmptySymbol
- Returns:
- A String representing an empty version of the Associative Formula implementation
-