/* * Check the case of (D|C)[l_1,u_1] and (E|D)[l_2,u_2] */ public void testTightLexicographicEntailment4() throws Exception { ProbKnowledgeBase pkb = new KBStandaloneLoader().load(FILE_PREFIX + "test_tlexent_2.xml"); BasicLexicographicReasoner reasoner = new BasicLexicographicReasoner(new PSATSolverImpl()); ConditionalConstraint wfCC = reasoner.tightLexicographicEntailment( pkb.getPTBox(), null, ATermUtils.makeTermAppl(URI_PREFIX + "WingedObject"), ATermUtils.makeTermAppl(URI_PREFIX + "FlyingObject")); assertEquals(0.63, wfCC.getLowerBound(), 0.0001); assertEquals(0.965, wfCC.getUpperBound(), 0.0001); }
/* * Check that if KB |= C \in D then KB |=(lex) (C|D)[1,1] */ public void testTightLexicographicEntailment2() throws Exception { ProbKnowledgeBase pkb = new KBStandaloneLoader().load(FILE_PREFIX + "test_tlexent_1.xml"); BasicLexicographicReasoner reasoner = new BasicLexicographicReasoner(new PSATSolverImpl()); ConditionalConstraint apfCC = reasoner.tightLexicographicEntailment( pkb.getPTBox(), null, ATermUtils.makeTermAppl(URI_PREFIX + "ArcticPenguin"), ATermUtils.makeTermAppl(URI_PREFIX + "Bird")); assertEquals(1.0, apfCC.getLowerBound(), 0.0001); assertEquals(1.0, apfCC.getUpperBound(), 0.0001); }