Package net.sf.tweety.logics.dl.syntax
Class EquivalenceAxiom
- java.lang.Object
-
- net.sf.tweety.logics.dl.syntax.DlAxiom
-
- net.sf.tweety.logics.dl.syntax.EquivalenceAxiom
-
- All Implemented Interfaces:
Formula
,SimpleLogicalFormula
public class EquivalenceAxiom extends DlAxiom
This class models an equivalence axiom, also known as general concept inclusion (GCU), meaning an expression of the form "C is a subset of or equal to D" with C and D as Concepts. This can also be read as "C implies D". If C implies D and C implies C, the two concepts are equivalent.
Equivalence axioms are used in the TBox of a DL knowledge base to model relationships between concepts, e.g. "MaleHuman is a subset or equal to Human".- Author:
- Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description EquivalenceAxiom(ComplexConcept c, ComplexConcept d)
Creates a new equivalence axiom with the given formulas (atomic or complex concepts).
-
Method Summary
Modifier and Type Method Description EquivalenceAxiom
clone()
Creates a deep copy of this formulaboolean
equals(java.lang.Object obj)
Pair<ComplexConcept,ComplexConcept>
getFormulas()
java.util.Set<Predicate>
getPredicates()
Processes the set of all predicates which appear in this formulaDlSignature
getSignature()
Returns the signature of the language of this formula.int
hashCode()
boolean
isLiteral()
java.lang.String
toString()
-
Methods inherited from class net.sf.tweety.logics.dl.syntax.DlAxiom
getAtoms, getPredicateCls
-
-
-
-
Constructor Detail
-
EquivalenceAxiom
public EquivalenceAxiom(ComplexConcept c, ComplexConcept d)
Creates a new equivalence axiom with the given formulas (atomic or complex concepts).- Parameters:
c
- some conceptd
- some concept
-
-
Method Detail
-
getSignature
public DlSignature getSignature()
Description copied from interface:Formula
Returns the signature of the language of this formula.- Specified by:
getSignature
in interfaceFormula
- Specified by:
getSignature
in classDlAxiom
- Returns:
- the signature of the language of this formula.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getFormulas
public Pair<ComplexConcept,ComplexConcept> getFormulas()
-
getPredicates
public 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
- Specified by:
getPredicates
in classDlAxiom
- Returns:
- all predicates that appear in this formula
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteral
in interfaceSimpleLogicalFormula
- Overrides:
isLiteral
in classDlAxiom
- Returns:
- true if the formula represents a literal in the language or false otherwise
-
clone
public EquivalenceAxiom clone()
Description copied from interface:SimpleLogicalFormula
Creates a deep copy of this formula- Specified by:
clone
in interfaceSimpleLogicalFormula
- Specified by:
clone
in classDlAxiom
- Returns:
- the cloned formula
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classjava.lang.Object
-
-