question: 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 ; }
target:  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.