Wednesday, September 04, 2013

[oeumawwi] Automatically logging progress

Create a tool to automatically instrument code so as to display progress, a completion percentage, and so as to be able to tell the last completed step before the program hangs (or seems to hang).

The desire is that no loops of an unknown number of iterations, e.g., while( predicate() ) {...}, may emit progress output every iteration.  If the maximum number of iterations is known statically at compile time, then OK.  Known dynamically at run time before entering the loop, also OK.

For imperative code, it is probably fairly simple to bracket sections of code -- straight line assembly -- which complete in deterministic time, though exceptions might make it complicated.

For a functional programming language?

Small problem if the entire code is wrapped in an event loop like "repeat until the user says stop".

No comments :