Class DlInterpretation
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<B,S>
-
- net.sf.tweety.commons.InterpretationSet<AssertionalAxiom,DlBeliefSet,DlAxiom>
-
- net.sf.tweety.logics.dl.semantics.DlInterpretation
-
- All Implemented Interfaces:
java.lang.Iterable<AssertionalAxiom>
,java.util.Collection<AssertionalAxiom>
,Interpretation<DlBeliefSet,DlAxiom>
public class DlInterpretation extends InterpretationSet<AssertionalAxiom,DlBeliefSet,DlAxiom>
This class models an interpretation for description logics. A DL interpretation consists of a domain (a set of individuals) and a mapping of each concept name to a subset of the domain and of each role name to a binary relation on the domain (the mapping is often referred to as the interpretation function in literature).- Author:
- Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description DlInterpretation(java.util.Collection<AssertionalAxiom> assertions)
Create a new DL interpretation with the given set of concept and role assertions that represent the mapping of concept names and role names to the domain.
-
Method Summary
Modifier and Type Method Description java.util.Set<Individual>
getConceptDomain(ComplexConcept c)
Returns the subset of the domain that belongs to the given concept (the extension of the concept).java.util.Set<Pair<Individual,Individual>>
getRoleDomain(AtomicRole r)
Returns the subset of the domain that belongs to the given role (the extension of the role).boolean
isSubsumedBy(ComplexConcept c1, ComplexConcept c2)
Checks whether a concept is subsumed by another concept (c1 => c2) wrt to this interpretationboolean
satisfies(DlAxiom formula)
Checks whether this interpretation satisfies the given formula.boolean
satisfies(DlBeliefSet beliefBase)
Checks whether this interpretation satisfies the given knowledge base.-
Methods inherited from class net.sf.tweety.commons.InterpretationSet
add, add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class net.sf.tweety.commons.AbstractInterpretation
satisfies
-
-
-
-
Constructor Detail
-
DlInterpretation
public DlInterpretation(java.util.Collection<AssertionalAxiom> assertions)
Create a new DL interpretation with the given set of concept and role assertions that represent the mapping of concept names and role names to the domain.- Parameters:
assertions
- collection of AssertionalAxiom
-
-
Method Detail
-
satisfies
public boolean satisfies(DlAxiom formula) throws java.lang.IllegalArgumentException
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given formula.- Parameters:
formula
- a formula .- Returns:
- "true" if this interpretation satisfies the given formula.
- Throws:
java.lang.IllegalArgumentException
- if the formula does not correspond to the expected language.
-
satisfies
public boolean satisfies(DlBeliefSet beliefBase) throws java.lang.IllegalArgumentException
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Parameters:
beliefBase
- a knowledge base.- Returns:
- "true" if this interpretation satisfies the given knowledge base.
- Throws:
java.lang.IllegalArgumentException
- IllegalArgumentException if the knowledgebase does not correspond to the expected language.
-
isSubsumedBy
public boolean isSubsumedBy(ComplexConcept c1, ComplexConcept c2)
Checks whether a concept is subsumed by another concept (c1 => c2) wrt to this interpretation- Parameters:
c1
- a conceptc2
- a concept- Returns:
- "true" if c1 is subsumed by c2, "false" otherwise
-
getRoleDomain
public java.util.Set<Pair<Individual,Individual>> getRoleDomain(AtomicRole r)
Returns the subset of the domain that belongs to the given role (the extension of the role).- Parameters:
r
- role- Returns:
- binary subset of domain, i.e. a set of pairs of individuals
-
getConceptDomain
public java.util.Set<Individual> getConceptDomain(ComplexConcept c)
Returns the subset of the domain that belongs to the given concept (the extension of the concept).- Parameters:
c
- concept- Returns:
- subset of domain, i.e. a set of individuals
-
-