Class Conjunction
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.Conjunction
- 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 classical conjunction of first-order logic.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new (empty) conjunction.Conjunction(Collection<? extends RelationalFormula> formulas) Creates a new conjunction with the given inner formulas.Conjunction(RelationalFormula first, RelationalFormula second) Creates a new conjunction with the two given formulae -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a deep copy of this formulaThis method collapses all associative operations appearing in this term, e.g.booleanisDnf()Checks whether this formula is in disjunctive normal form.substitute(Term<?> v, Term<?> t) Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.toNnf()Makes the negation normal form of this formula.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, toArray, toArray, toStringMethods inherited from class org.tweetyproject.logics.fol.syntax.FolFormula
combineWithAnd, combineWithOr, complement, getSignature, getUniformProbability, toDnfMethods inherited from class org.tweetyproject.logics.commons.syntax.RelationalFormula
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isGround, isWellFormedMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.tweetyproject.commons.Formula
getSignatureMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliteratorMethods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.SimpleLogicalFormula
getPredicateCls
-
Constructor Details
-
Conjunction
Creates a new conjunction with the given inner formulas.- Parameters:
formulas- a collection of formulas.
-
Conjunction
public Conjunction()Creates a new (empty) conjunction. -
Conjunction
Creates a new conjunction with the two given formulae- Parameters:
first- a relational formula.second- a relational formula.
-
-
Method Details
-
isDnf
public boolean isDnf()Description copied from class:FolFormulaChecks whether this formula is in disjunctive normal form.- Specified by:
isDnfin classFolFormula- Returns:
- "true" iff this formula is in disjunctive normal form.
-
substitute
Description copied from class:RelationalFormulaSubstitutes all occurrences of term "v" in this formula by term "t" and returns the new formula. NOTE: if "v" is a variable and bound to a quantifier then "v" is not substituted in that quantifiers inner formula.- Specified by:
substitutein interfaceComplexLogicalFormula- Overrides:
substitutein classAssociativeFolFormula- Parameters:
v- the term to be substituted.t- the term to substitute.- Returns:
- a formula where every occurrence of "v" is replaced by "t".
- Throws:
IllegalArgumentException- if "v" and "t" are of different sorts (NOTE: this exception is only thrown when "v" actually appears in this formula).
-
toNnf
Description copied from class:FolFormulaMakes the negation normal form of this formula.- Specified by:
toNnfin classFolFormula- Returns:
- the NNF of this formula
-
collapseAssociativeFormulas
Description copied from class:FolFormulaThis method collapses all associative operations appearing in this term, e.g. every a||(b||c) becomes a||b||c.- Specified by:
collapseAssociativeFormulasin classFolFormula- Returns:
- the collapsed formula.
-
clone
Description copied from interface:SimpleLogicalFormulaCreates a deep copy of this formula- Specified by:
clonein interfaceComplexLogicalFormula- Specified by:
clonein interfaceSimpleLogicalFormula- Specified by:
clonein 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
-