Predicate expression = (Predicate) parser
.parse("P(A,F(B,G(A,H(B)),C),D)");
TermEquality assertion = (TermEquality) parser.parse("B = E");
Demodulation demodulation = new Demodulation();
Predicate altExpression = (Predicate) demodulation.apply(assertion,
expression);
System.out.println("Demodulate '" + expression + "' with '" + assertion
+ "' to give");
System.out.println(altExpression.toString());
System.out.println("and again to give");
System.out.println(demodulation.apply(assertion, altExpression)
.toString());
System.out.println("");
}