Menu

#2 Current implementation of iteration counter is faulty

open
kernel (1)
2
2004-12-09
2004-12-09
No

If we model a loop inside a fork inside a loop then it is possible that an old pass with a high iteration number (in the innermost circle) can be mistaken with a new pass with the same iteration number (now produced by the outer circle, but passing in the inner circle).

The proposed solution (after a discussion between Sérgio and Jorge) is to change the "iteration" counter to a stack-based iteration counter, increasing the stack at the entry of a loop and decreasing at the exit.

Happy coding. ;)

Discussion


Log in to post a comment.

MongoDB Logo MongoDB