@SuppressWarnings("javadoc")
public void testFlatten()
{
Semantics sem1 = Semantics.readSemantics("foo(a|b c|d)");
Semantics sem2 = Semantics.readSemantics("foo(a c) foo(b c) foo(a d) foo(b d)");
assertTrue(new Semantics().join(sem1.flattenDisjunctions()).equals(sem2, new InstantiationContext()));
sem1 = Semantics.readSemantics("foo(a|b c|d) bar(e f|g)");
assertTrue(sem1.flattenDisjunctions().size() == 8);
}