next up previous contents index
Next: Dreams and Tree-Stacks Up: Control Delimiters Previous: Debugging   Contents   Index


Rewinding Execution

In the Forth system we are developing, because of the tree-stack architecture, only the edited routine needs to be recompiled. This is the first time-savings. Then, instead of starting execution over at the beginning of the program, the program is rewound, so to speak, to the point where that subroutine was called. Because of the tree-structured stacks, the status of the stacks is reclaimable at the point of the call. This permits execution to do a ``take two'', as it were, on that subroutine, without having to run all the rest of the program over. This is only possible, however, if no global variables have been modified. This includes dream-local instance variables. If the only variable modifications have been to variables on the stacks, this rewinding can occur. This can save a tremendous amount of time.

Further more, if the bug showed up during a real-time run, running the program again cannot guarantee that the same bug will show up twice, but if the same program is rewound a little bit and played again, all the data values collected in real-time will still be there, and the situation that revealed the bug will occur again. This can represent a tremendous savings of the programmer's time and of development expense.


next up previous contents index
Next: Dreams and Tree-Stacks Up: Control Delimiters Previous: Debugging   Contents   Index
Robert J. Brown
1999-09-26