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
-
-
Field Summary
Fields Modifier and Type Field Description private Pair<ComplexConcept,ComplexConcept>axiom
-
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 EquivalenceAxiomclone()Creates a deep copy of this formulabooleanequals(java.lang.Object obj)Pair<ComplexConcept,ComplexConcept>getFormulas()java.util.Set<Predicate>getPredicates()Processes the set of all predicates which appear in this formulaDlSignaturegetSignature()Returns the signature of the language of this formula.inthashCode()booleanisLiteral()java.lang.StringtoString()-
Methods inherited from class net.sf.tweety.logics.dl.syntax.DlAxiom
getAtoms, getPredicateCls
-
-
-
-
Field Detail
-
axiom
private Pair<ComplexConcept,ComplexConcept> axiom
-
-
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:FormulaReturns the signature of the language of this formula.- Specified by:
getSignaturein interfaceFormula- Specified by:
getSignaturein classDlAxiom- Returns:
- the signature of the language of this formula.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFormulas
public Pair<ComplexConcept,ComplexConcept> getFormulas()
-
getPredicates
public java.util.Set<Predicate> getPredicates()
Description copied from interface:SimpleLogicalFormulaProcesses the set of all predicates which appear in this formula- Specified by:
getPredicatesin interfaceSimpleLogicalFormula- Specified by:
getPredicatesin classDlAxiom- Returns:
- all predicates that appear in this formula
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteralin interfaceSimpleLogicalFormula- Overrides:
isLiteralin classDlAxiom- Returns:
- true if the formula represents a literal in the language or false otherwise
-
clone
public EquivalenceAxiom clone()
Description copied from interface:SimpleLogicalFormulaCreates a deep copy of this formula- Specified by:
clonein interfaceSimpleLogicalFormula- Specified by:
clonein classDlAxiom- Returns:
- the cloned formula
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceSimpleLogicalFormula- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfaceSimpleLogicalFormula- Overrides:
equalsin classjava.lang.Object
-
-