Update: removed some more restriction, only restriction now is that op can only appear as last sequence element
@@ -413,23 +413,27 @@ void Cycle_ProcessInputBeliefEvents(long currentTime)
{
if(state2 > 1)
{
- int substate = state2 >> 1;
- int shift = 1;
- while((substate >> 1))
+ int substate = state2;
+ int shift = 0;
+ while(substate)
{
substate = (substate >> 1);
shift++;
- }
+ if(substate & 1)
+ {
if(k+shift < FIFO_SIZE)
{
Event *potential_op = FIFO_GetKthNewestSequence(&belief_events, k+shift, 1);
if(potential_op != NULL && potential_op->type != EVENT_TYPE_DELETED && Narsese_isOperation(&potential_op->term))
{
- break;
+ goto CONTINUE;
+ }
+ }
}
}
}
Cycle_ReinforceLink(precondition, &postcondition);
+ CONTINUE:;
}
}
}
