use of fr.lirmm.graphik.graal.core.unifier.checker.RestrictedProductivityChecker in project graal by graphik-team.
the class GRDTest method test2.
@Test
public void test2() throws ParseException {
Rule r1 = DlgpParser.parseRule("wf(X0,Y0), o(Y0) :- e(X0).");
Rule r2 = DlgpParser.parseRule("wf(Y1,X1) :- o(Y1).");
Substitution s = new HashMapSubstitution();
s.put(DefaultTermFactory.instance().createVariable("Y1"), DefaultTermFactory.instance().createVariable("Y0"));
RestrictedProductivityChecker filter = RestrictedProductivityChecker.instance();
Assert.assertTrue(filter.isValidDependency(r1, r2, s));
}
use of fr.lirmm.graphik.graal.core.unifier.checker.RestrictedProductivityChecker in project graal by graphik-team.
the class GRDTest method test.
@Test
public void test() throws ParseException {
Rule r1 = DlgpParser.parseRule("wf(X0,Y0), o(Y0) :- e(X0).");
Rule r2 = DlgpParser.parseRule("e(X1), wf(X1,Y1) :- o(Y1).");
Substitution s = new HashMapSubstitution();
s.put(DefaultTermFactory.instance().createVariable("Y1"), DefaultTermFactory.instance().createVariable("Y0"));
RestrictedProductivityChecker filter = RestrictedProductivityChecker.instance();
Assert.assertFalse(filter.isValidDependency(r1, r2, s));
}
Aggregations