assertTrue( kb.getDifferents( term( "b" ) ).contains( term( "a" ) ) );
}
@Test
public void testSHOIN() {
KnowledgeBase kb = new KnowledgeBase();
kb.addObjectProperty( term( "R1" ) );
kb.addObjectProperty( term( "invR1" ) );
kb.addObjectProperty( term( "R2" ) );
kb.addObjectProperty( term( "invR2" ) );
kb.addObjectProperty( term( "S1" ) );
kb.addObjectProperty( term( "invS1" ) );
kb.addObjectProperty( term( "S2" ) );
kb.addObjectProperty( term( "invS2" ) );
kb.addInverseProperty( term( "R1" ), term( "invR1" ) );
kb.addInverseProperty( term( "R2" ), term( "invR2" ) );
kb.addInverseProperty( term( "S1" ), term( "invS1" ) );
kb.addInverseProperty( term( "S2" ), term( "invS2" ) );
kb.addIndividual( term( "o1" ) );
kb.addIndividual( term( "o2" ) );
kb.addSubClass( value( term( "o1" ) ), and( max( term( "invR1" ), 2, ATermUtils.TOP ), all(
term( "invR1" ), some( term( "S1" ), some( term( "invS2" ), some( term( "R2" ),
value( term( "o2" ) ) ) ) ) ) ) );
kb.addSubClass( value( term( "o2" ) ), and( max( term( "invR2" ), 2, ATermUtils.TOP ), all(
term( "invR2" ), some( term( "S2" ), some( term( "invS1" ), some( term( "R1" ),
value( term( "o1" ) ) ) ) ) ) ) );
assertTrue( kb.isConsistent() );
assertTrue( kb.isSatisfiable( and( value( term( "o1" ) ), some( term( "invR1" ), TOP ) ) ) );
}