org.mindswap.pellet.tbox.impl
Class TBoxExpImpl

java.lang.Object
  extended by org.mindswap.pellet.tbox.impl.TBoxExpImpl
All Implemented Interfaces:
TBox

public class TBoxExpImpl
extends java.lang.Object
implements TBox

Title: Implementation of TBox interface to generate explanations efficiently and correctly.

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Field Summary
static java.util.logging.Logger log
           
 TgBox Tg
           
 TuBox Tu
           
 
Constructor Summary
TBoxExpImpl(KnowledgeBase kb)
           
 
Method Summary
 void absorb()
          Absorb GCIs into primitive definitions
 boolean addAxiom(aterm.ATermAppl axiom)
          Add a TBox axiom.
 boolean addClass(aterm.ATermAppl term)
          Add a named class declaration
 boolean containsAxiom(aterm.ATermAppl axiom)
           
 java.util.Collection<aterm.ATermAppl> getAbsorbedAxioms()
           
 java.util.Set<aterm.ATermAppl> getAllClasses()
          Return all the named classes plus TOP and BOTTOM
 java.util.Collection<aterm.ATermAppl> getAssertedAxioms()
          Return all the asserted axioms in this TBox
 java.util.Set<aterm.ATermAppl> getAxiomExplanation(aterm.ATermAppl axiom)
          Return a single explanation for the given TBox axiom.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getAxiomExplanations(aterm.ATermAppl axiom)
          Return multiple explanations for the given TBox axiom.
 java.util.Collection<aterm.ATermAppl> getAxioms()
          Return all the axioms defined in this TBox (may include new axioms introduced during absorption)
 java.util.Collection<aterm.ATermAppl> getAxioms(aterm.ATermAppl term)
          Return all the sub and equivalent class axioms that have the given concept on the left hand side
 java.util.Set<aterm.ATermAppl> getClasses()
          Return all the named classes
 KnowledgeBase getKB()
           
 java.util.List<Pair<aterm.ATermAppl,DependencySet>> getUC()
          Return the concepts the comprise the universal concept.
 void internalize()
          Turn the non-absorbed GCIs into disjunctions that will be used in the universal concept
 void normalize()
          Normalize the primitive definitions so they can be directly used in unfolding
 void print()
           
 void print(java.lang.Appendable str)
           
 boolean removeAxiom(aterm.ATermAppl axiom)
          Remove axiom from TBox and all other axioms that depend on it.
 boolean removeAxiom(aterm.ATermAppl dependantAxiom, aterm.ATermAppl explanationAxiom)
          Remove all explanations for dependantAxiom that contain explanationAxiom.
 java.lang.String toString()
           
 java.util.List<Pair<aterm.ATermAppl,java.util.Set<aterm.ATermAppl>>> unfold(aterm.ATermAppl c)
          Lazy unfold the given concept
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static java.util.logging.Logger log

Tu

public TuBox Tu

Tg

public TgBox Tg
Constructor Detail

TBoxExpImpl

public TBoxExpImpl(KnowledgeBase kb)
Method Detail

getKB

public KnowledgeBase getKB()

getAllClasses

public java.util.Set<aterm.ATermAppl> getAllClasses()
Description copied from interface: TBox
Return all the named classes plus TOP and BOTTOM

Specified by:
getAllClasses in interface TBox

getAxiomExplanations

public java.util.Set<java.util.Set<aterm.ATermAppl>> getAxiomExplanations(aterm.ATermAppl axiom)
Description copied from interface: TBox
Return multiple explanations for the given TBox axiom.

Specified by:
getAxiomExplanations in interface TBox
Returns:

getAxiomExplanation

public java.util.Set<aterm.ATermAppl> getAxiomExplanation(aterm.ATermAppl axiom)
Description copied from interface: TBox
Return a single explanation for the given TBox axiom.

Specified by:
getAxiomExplanation in interface TBox
Returns:

addAxiom

public boolean addAxiom(aterm.ATermAppl axiom)
Description copied from interface: TBox
Add a TBox axiom.

Specified by:
addAxiom in interface TBox
Returns:

removeAxiom

public boolean removeAxiom(aterm.ATermAppl axiom)
Description copied from interface: TBox
Remove axiom from TBox and all other axioms that depend on it. An axiom depends on another axiom if it is a syntactic transformation (as in disjoint axiom is transformed into subclass) or it is obtained via absorption (as equivalent class axioms are absorbed into subclass axioms). This method is syntactic sugar for TBox.removeAxiom(ATermAppl, ATermAppl) where both parameters are axiom.

Specified by:
removeAxiom in interface TBox
Returns:

removeAxiom

public boolean removeAxiom(aterm.ATermAppl dependantAxiom,
                           aterm.ATermAppl explanationAxiom)
Description copied from interface: TBox
Remove all explanations for dependantAxiom that contain explanationAxiom. If no explanations remain, dependantAxiom is removed and all axioms which depend on it are updated (and will be removed if they have no additional explanations).

Specified by:
removeAxiom in interface TBox
Returns:

getAxioms

public java.util.Collection<aterm.ATermAppl> getAxioms()
Description copied from interface: TBox
Return all the axioms defined in this TBox (may include new axioms introduced during absorption)

Specified by:
getAxioms in interface TBox

getAssertedAxioms

public java.util.Collection<aterm.ATermAppl> getAssertedAxioms()
Description copied from interface: TBox
Return all the asserted axioms in this TBox

Specified by:
getAssertedAxioms in interface TBox

getAbsorbedAxioms

public java.util.Collection<aterm.ATermAppl> getAbsorbedAxioms()

containsAxiom

public boolean containsAxiom(aterm.ATermAppl axiom)

absorb

public void absorb()
Description copied from interface: TBox
Absorb GCIs into primitive definitions

Specified by:
absorb in interface TBox

print

public void print()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

print

public void print(java.lang.Appendable str)

getUC

public java.util.List<Pair<aterm.ATermAppl,DependencySet>> getUC()
Description copied from interface: TBox
Return the concepts the comprise the universal concept. Universal concept is the conjunction of concepts returned in the list and each concept in the list is added to the every individual during tableau completion. The return value is a list of pairs where the each concept is paired with the set of asserted axioms that gives the set of assertions for that concept.

Specified by:
getUC in interface TBox
Returns:
Returns the UC.

addClass

public boolean addClass(aterm.ATermAppl term)
Description copied from interface: TBox
Add a named class declaration

Specified by:
addClass in interface TBox
Returns:
true if TBox changed as a result of this call

getClasses

public java.util.Set<aterm.ATermAppl> getClasses()
Description copied from interface: TBox
Return all the named classes

Specified by:
getClasses in interface TBox

getAxioms

public java.util.Collection<aterm.ATermAppl> getAxioms(aterm.ATermAppl term)
Description copied from interface: TBox
Return all the sub and equivalent class axioms that have the given concept on the left hand side

Specified by:
getAxioms in interface TBox

normalize

public void normalize()
Description copied from interface: TBox
Normalize the primitive definitions so they can be directly used in unfolding

Specified by:
normalize in interface TBox

internalize

public void internalize()
Description copied from interface: TBox
Turn the non-absorbed GCIs into disjunctions that will be used in the universal concept

Specified by:
internalize in interface TBox

unfold

public java.util.List<Pair<aterm.ATermAppl,java.util.Set<aterm.ATermAppl>>> unfold(aterm.ATermAppl c)
Description copied from interface: TBox
Lazy unfold the given concept

Specified by:
unfold in interface TBox
Returns:


Copyright © 2004 Evren Sirin. All Rights Reserved.