use of fr.lirmm.graphik.graal.io.dlp.DlgpParser in project graal by graphik-team.
the class DefaultKnowledgeBaseQueryTest method testInfinityQueryWithTimeout.
/**
* Test method for
* {@link fr.lirmm.graphik.graal.kb.DefaultKnowledgeBase#query(fr.lirmm.graphik.graal.api.core.Query, long)}.
* @throws AtomSetException
* @throws KnowledgeBaseException
* @throws ParseException
* @throws IteratorException
* @throws TimeoutException
* @throws KBBuilderException
*/
@Test(expected = TimeoutException.class)
public void testInfinityQueryWithTimeout() throws AtomSetException, ParseException, KnowledgeBaseException, IteratorException, TimeoutException, KBBuilderException {
KBBuilder kbBuilder = new KBBuilder();
kbBuilder.setApproach(Approach.SATURATION_ONLY);
kbBuilder.addAll(new DlgpParser("p(X,Y), h(Y) :- h(X). p(X,Z) :- p(X,Y), p(Y,Z). h(a)."));
KnowledgeBase kb = kbBuilder.build();
kb.query(DlgpParser.parseQuery("? :- p(a)."), 10000);
}
Aggregations