if (toMatchIndex==parentOfBlockedXIndex)
return satisfiesDLClauseForBlockedXAnyZAndAnyY(dlClauseInfo,blockedX,parentOfBlockedXIndex,toMatchIndex+1); // assignment already fixed, skip
else if (toMatchIndex==dlClauseInfo.m_yConstraints.length)
return satisfiesDLClauseForBlockedXAndMatchedNodes(dlClauseInfo,blockedX,parentOfBlockedXIndex);
else {
Node blocker=blockedX.getBlocker();
Node blockerParent=blocker.getParent();
YConstraint yConstraint=dlClauseInfo.m_yConstraints[toMatchIndex];
assert yConstraint.m_x2yRoles.length!=0 || yConstraint.m_y2xRoles.length!=0;
int yNodeIndex;
ExtensionTable.Retrieval retrieval;
if (yConstraint.m_x2yRoles.length!=0) {
retrieval=dlClauseInfo.m_x2yRetrievals[toMatchIndex];
retrieval.getBindingsBuffer()[0]=dlClauseInfo.m_x2yRoles[toMatchIndex];
retrieval.getBindingsBuffer()[1]=blocker;
yNodeIndex=2;
}
else {
retrieval=dlClauseInfo.m_y2xRetrievals[toMatchIndex];
retrieval.getBindingsBuffer()[0]=dlClauseInfo.m_y2xRoles[toMatchIndex];
retrieval.getBindingsBuffer()[2]=blocker;
yNodeIndex=1;
}
retrieval.open();
Object[] tupleBuffer=retrieval.getTupleBuffer();
while (!retrieval.afterLast()) {
Node nodeY=(Node)tupleBuffer[yNodeIndex];
if (nodeY!=blockerParent && yConstraint.isSatisfiedExplicitly(m_extensionManager,blocker,nodeY)) {
dlClauseInfo.m_yNodes[toMatchIndex]=nodeY;
boolean result=satisfiesDLClauseForBlockedXAnyZAndAnyY(dlClauseInfo,blockedX,parentOfBlockedXIndex,toMatchIndex+1);
dlClauseInfo.m_yNodes[toMatchIndex]=null; // checking done, reset assignment
if (!result)