Search in sources :

Example 1 with AtomErasingChecker

use of fr.lirmm.graphik.graal.core.unifier.checker.AtomErasingChecker in project graal by graphik-team.

the class GRDTest method AtomErasingFilterTest.

@Test
public void AtomErasingFilterTest() {
    Rule r1 = DefaultRuleFactory.instance().create(DefaultAtomSetFactory.instance().create(TestUtils.pXZ), DefaultAtomSetFactory.instance().create(TestUtils.pXY, TestUtils.pYZ));
    Rule r2 = DefaultRuleFactory.instance().create(TestUtils.pUU, TestUtils.sU);
    Substitution s = new HashMapSubstitution();
    s.put(DefaultTermFactory.instance().createVariable("X"), DefaultTermFactory.instance().createVariable("U"));
    s.put(DefaultTermFactory.instance().createVariable("Y"), DefaultTermFactory.instance().createVariable("U"));
    s.put(DefaultTermFactory.instance().createVariable("Z"), DefaultTermFactory.instance().createVariable("U"));
    AtomErasingChecker filter = AtomErasingChecker.instance();
    Assert.assertFalse(filter.isValidDependency(r1, r2, s));
}
Also used : AtomErasingChecker(fr.lirmm.graphik.graal.core.unifier.checker.AtomErasingChecker) HashMapSubstitution(fr.lirmm.graphik.graal.core.HashMapSubstitution) Substitution(fr.lirmm.graphik.graal.api.core.Substitution) Rule(fr.lirmm.graphik.graal.api.core.Rule) HashMapSubstitution(fr.lirmm.graphik.graal.core.HashMapSubstitution) Test(org.junit.Test)

Aggregations

Rule (fr.lirmm.graphik.graal.api.core.Rule)1 Substitution (fr.lirmm.graphik.graal.api.core.Substitution)1 HashMapSubstitution (fr.lirmm.graphik.graal.core.HashMapSubstitution)1 AtomErasingChecker (fr.lirmm.graphik.graal.core.unifier.checker.AtomErasingChecker)1 Test (org.junit.Test)1