use of at.ac.tuwien.kr.alpha.core.rules.CompiledRule in project Alpha by alpha-asp.
the class SubstitutionTest method groundAndPrintRule.
@Test
public void groundAndPrintRule() {
Rule<Head> rule = PARSER.parse("x :- p(X,Y), not q(X,Y).").getRules().get(0);
CompiledRule nonGroundRule = InternalRule.fromNormalRule(NormalRuleImpl.fromBasicRule(rule));
Substitution substitution1 = BasicSubstitution.specializeSubstitution(PX, PA, BasicSubstitution.EMPTY_SUBSTITUTION);
Substitution substitution2 = BasicSubstitution.specializeSubstitution(PY, PB, substitution1);
String printedString = SubstitutionTestUtil.groundAndPrintRule(nonGroundRule, substitution2);
assertEquals("x :- p(a, b), not q(a, b).", printedString);
}
Aggregations