protected void checkAtLeastForNonblocked(AtLeastConcept atleast,Node nonblocked) {
int suitableSuccessors=0;
int requiredSuccessors=atleast.getNumber();
Role r=atleast.getOnRole();
LiteralConcept c=atleast.getToConcept();
Retrieval retrieval;
int position;
if (r instanceof AtomicRole) {
retrieval=m_ternaryRetrieval01Bound;
retrieval.getBindingsBuffer()[0]=r;
retrieval.getBindingsBuffer()[1]=nonblocked;
position=2;
} else {
retrieval=m_ternaryRetrieval02Bound;
retrieval.getBindingsBuffer()[0]=((InverseRole)r).getInverseOf();
retrieval.getBindingsBuffer()[2]=nonblocked;
position=1;
}
retrieval.open();
Object[] tupleBuffer=retrieval.getTupleBuffer();
List<Node> possiblyInvalidlyBlocked=new ArrayList<Node>();
while (!retrieval.afterLast()&&suitableSuccessors<requiredSuccessors) {
Node rSuccessor=(Node)tupleBuffer[position];
if (rSuccessor.isBlocked()&&!((ValidatedBlockingObject)rSuccessor.getBlockingObject()).blockViolatesParentConstraints()) {
if (m_extensionManager.containsConceptAssertion(c,rSuccessor.getBlocker()))
suitableSuccessors++;
else
possiblyInvalidlyBlocked.add(rSuccessor);
} else if (m_extensionManager.containsConceptAssertion(c,rSuccessor))
suitableSuccessors++;
retrieval.next();
}
// unblock nodes until we have enough suitable successors
for (int i=0;i<possiblyInvalidlyBlocked.size()&&suitableSuccessors<requiredSuccessors;i++) {
Node blocked=possiblyInvalidlyBlocked.get(i);
if (m_extensionManager.containsConceptAssertion(c,blocked)) {