Package net.sf.tweety.logics.dl.syntax
Class ComplexConcept
- java.lang.Object
-
- net.sf.tweety.logics.dl.syntax.ComplexConcept
-
- All Implemented Interfaces:
Formula
,ClassicalFormula
,Conjunctable
,Disjunctable
,Invertable
,ProbabilityAware
,SimpleLogicalFormula
- Direct Known Subclasses:
AssociativeDlFormula
,AtomicConcept
,AtomicRole
,BottomConcept
,Complement
,ExistentialRestriction
,TopConcept
,UniversalRestriction
public abstract class ComplexConcept extends java.lang.Object implements ClassicalFormula
The common abstract class for concepts (also called concepts, complex concepts or concept descriptions) of description logics.
Specifically, this library supports formulas of the description logic ALC (attributive concept language with complements). In an ALC language for a given signature, concepts are:- All atomic concepts of the signature
- The universal concept
- The bottom concept
- Complex concept descriptions, which are built with the following constructors:
- The intersection of two concept descriptions
- The union of two concept descriptions
- The complement of a concept description
- The universal restriction of a role by a concept description
- The existential restriction of a role by a concept description
- Author:
- Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description ComplexConcept()
-
Method Summary
Modifier and Type Method Description abstract ComplexConcept
clone()
Creates a deep copy of this formulaabstract ComplexConcept
collapseAssociativeFormulas()
This method collapses all associative operations appearing in this term, e.g.Intersection
combineWithAnd(Conjunctable f)
Returns a conjunction of this and the given formula.Union
combineWithOr(Disjunctable f)
ComplexConcept
complement()
abstract boolean
equals(java.lang.Object other)
java.util.Set<? extends Atom>
getAtoms()
Processes the set of all atoms which appear in this formulajava.lang.Class<? extends Predicate>
getPredicateCls()
abstract java.util.Set<Predicate>
getPredicates()
Processes the set of all predicates which appear in this formulaabstract DlSignature
getSignature()
Returns the signature of the language of this formula.Probability
getUniformProbability()
abstract int
hashCode()
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
isLiteral
-
-
-
-
Method Detail
-
complement
public ComplexConcept complement()
- Specified by:
complement
in interfaceInvertable
- Returns:
- the complement of this formula.
-
combineWithOr
public Union combineWithOr(Disjunctable f)
- Specified by:
combineWithOr
in interfaceDisjunctable
- Parameters:
f
- a formula to be combined with OR and this.- Returns:
- a disjunction of this and the given formula.
-
combineWithAnd
public Intersection combineWithAnd(Conjunctable f)
Description copied from interface:Conjunctable
Returns a conjunction of this and the given formula.- Specified by:
combineWithAnd
in interfaceConjunctable
- Parameters:
f
- a formula to be combined with AND and this.- Returns:
- a conjunction of this and the given formula.
-
collapseAssociativeFormulas
public abstract ComplexConcept 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.
-
clone
public abstract ComplexConcept clone()
Creates a deep copy of this formula- Specified by:
clone
in interfaceSimpleLogicalFormula
- Returns:
- the cloned formula
-
getAtoms
public java.util.Set<? extends Atom> getAtoms()
Description copied from interface:SimpleLogicalFormula
Processes the set of all atoms which appear in this formula- Specified by:
getAtoms
in interfaceSimpleLogicalFormula
- Returns:
- The set of all atoms
-
getPredicateCls
public java.lang.Class<? extends Predicate> getPredicateCls()
- Specified by:
getPredicateCls
in interfaceSimpleLogicalFormula
- Returns:
- The class description of the predicate used by this formula.
-
getUniformProbability
public Probability getUniformProbability()
- Specified by:
getUniformProbability
in interfaceProbabilityAware
- Returns:
- this formula's probability in the uniform distribution.
-
getSignature
public abstract DlSignature getSignature()
Description copied from interface:Formula
Returns the signature of the language of this formula.- Specified by:
getSignature
in interfaceFormula
- Returns:
- the signature of the language of this formula.
-
hashCode
public abstract int hashCode()
- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public abstract boolean equals(java.lang.Object other)
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classjava.lang.Object
-
getPredicates
public abstract java.util.Set<Predicate> getPredicates()
Description copied from interface:SimpleLogicalFormula
Processes the set of all predicates which appear in this formula- Specified by:
getPredicates
in interfaceSimpleLogicalFormula
- Returns:
- all predicates that appear in this formula
-
-