User loginNavigation |
Debuging state.After reading a previous thread on debugging I got to thinking about an experience of mine involving debugging a hardware device called a digital filter. This was a big deal involving many people. Now the key idea is that state systems are really feedback systems. This is very obvious from a hardware point of view because that is the way they are built. I can’t draw a block diagram here so I will try to describe it: Digital filters consist of many patterns of the following type. An input is fed into a subtractor(S) then into a register(R), The output of the register is fed to a multiplier(M) and then fed back to the subtractor(S). The loop R,M,S is the feedback loop. The output is usually the contents of R. Now from this perspective it was obvious to all of us that in order to debug this thing we had to open up the feedback loops at S and simply go around the circuit and compare the actual values with what should be there for a given input based of a simulation. This is a full proof method and produced a working system after many weeks of tedious work and rewiring. Here is the problem as I see it. State systems and the state abstraction always involve feedback and the feedback loops may not be obvious. The only full proof and deliberate way to debug such as system is to open up the loops and trace results compared to an open loop simulation. Open loop tests were once common and were often built in. I am not sure what this means but here is one debugging idea. Suppose we design a system or language to carry a list of its states. And suppose also that we can temporally make those states a constant type (ie not updateable). Now theoretically at least we are in a position to trace through various values based on that state. Another idea might be to log or break whenever a state is updated. I wonder what other readers think about this. This is all fairly obvious but I haven’t seen it myself. By Hank Thediek at 2005-10-01 17:00 | LtU Forum | previous forum topic | next forum topic | other blogs | 5362 reads
|
Browse archives
Active forum topics |
Recent comments
12 weeks 1 day ago
12 weeks 1 day ago
12 weeks 1 day ago
34 weeks 2 days ago
38 weeks 4 days ago
40 weeks 2 days ago
40 weeks 2 days ago
42 weeks 6 days ago
47 weeks 4 days ago
47 weeks 4 days ago