boolean computeSuperProperties(){
  Set<OwlProperty> ancestors=new HashSet<OwlProperty>();
  Set<OwlProperty> frontier=new HashSet<OwlProperty>(superProperties);
  while (!frontier.isEmpty()) {
    Set<OwlProperty> next=new HashSet<OwlProperty>();
    for (    OwlProperty ancestor : frontier) {
      ancestors.add(ancestor);
      next.addAll(ancestor.superProperties);
    }
    next.removeAll(ancestors);
    frontier=next;
  }
  boolean newInfo=!ancestors.equals(superProperties);
  superProperties=ancestors;
  return newInfo;
}

boolean computeSuperProperties ( ) { Set < OwlProperty > ancestors = new HashSet < OwlProperty > ( ) ; Set < OwlProperty > frontier = new HashSet < OwlProperty > ( superProperties ) ; while ( ! frontier . isEmpty ( ) ) { Set < OwlProperty > next = new HashSet < OwlProperty > ( ) ; for ( OwlProperty ancestor : frontier ) { ancestors . add ( ancestor ) ; next . addAll ( ancestor . superProperties ) ; } next . removeAll ( ancestors ) ; frontier = next ; } boolean newInfo = ! ancestors . equals ( superProperties ) ; superProperties = ancestors ; return newInfo ; }
apply rl rule scm - spo : subpropertyof transitivity . follows subpropertyof chains to compute all the ancestor properties . assumes the hierarchy is small enough that a simple bfs is fine .
