for (Literal possEqLit : equalityClause.getLiterals()) {
// Must be a positive term equality to be used
// for paramodulation.
if (possEqLit.isPositiveLiteral()
&& possEqLit.getAtomicSentence() instanceof TermEquality) {
TermEquality assertion = (TermEquality) possEqLit
.getAtomicSentence();
// Test matching for both sides of the equality
for (int x = 0; x < 2; x++) {
Term toMatch, toReplaceWith;
if (x == 0) {
toMatch = assertion.getTerm1();
toReplaceWith = assertion.getTerm2();
} else {
toMatch = assertion.getTerm2();
toReplaceWith = assertion.getTerm1();
}
for (Literal l1 : topClause.getLiterals()) {
IdentifyCandidateMatchingTerm icm = getMatchingSubstitution(
toMatch, l1.getAtomicSentence());