A systematic approach to software debugging is the wolf-fence algorithm. The idea is we continually cut our search code broadly in half until we find where our problem is.
We need to systematically eliminate possible causes, to get the most information for the least effort to quickly identify the root cause. Our tools include a “wolf-fence” and the “causal control flow of the program”.
- Wolf-fence: we check variables at some time in the program’s execution. If all look good, we know everything before should be fine.
- Causal control: for two correct inputs, do we get the right output?