use of com.sri.ai.grinder.theory.tuple.rewriter.TupleEqualitySimplifier in project aic-expresso by aic-sri-international.
the class TupleRewriterTest method testTupleEqualitySimplification.
@Test
public void testTupleEqualitySimplification() {
Simplifier tupleEqualitySimplifier = new TupleEqualitySimplifier();
Assert.assertEquals(parse("A1 = B1 and A2 = B2 and A3 = B3"), tupleEqualitySimplifier.apply(parse("(A1, A2, A3) = (B1, B2, B3)"), context));
Expression expr = parse("(A1, A2) = (B1, B2, B3)");
Assert.assertTrue(expr == tupleEqualitySimplifier.apply(expr, context));
expr = parse("A1 = B1");
Assert.assertTrue(expr == tupleEqualitySimplifier.apply(expr, context));
}
Aggregations