if( log.isLoggable( Level.FINE ) )
log.fine( "RULE: " + fact + " " + ds );
ATermAppl pred = fact.getElements().get( Compiler.PRED );
Individual subj = abox.getIndividual( fact.getElements().get( Compiler.SUBJ ) );
if( subj.isMerged() ) {
ds = ds.union( subj.getMergeDependency( true ), abox.doExplanation() );
subj = subj.getSame();
}
ATermAppl objTerm = fact.getElements().get( Compiler.OBJ );
if( pred.equals( Compiler.TYPE ) ) {
// add a type assertion for the individual
ATermAppl type = objTerm;
addType( subj, type, ds );
}
else {
Node obj = abox.getNode( objTerm );
if( obj != null && obj.isMerged() ) {
// ds = ds.union( ds, abox.doExplanation() );
obj = obj.getSame();
}
if( pred.equals( Compiler.SAME_AS ) ) {
Individual ind2 = (Individual) obj;
mergeTo( ind2, subj, ds );
}
else if( pred.equals( Compiler.DIFF_FROM ) ) {
Individual ind2 = (Individual) obj;
subj.setDifferent( ind2, ds );
}
else {
// add code for inferring roles, too
Role r = abox.getRole( pred );