Sunday, July 14, 2013

Inferring State (Part X) / Day 35

Day 35 - Saturday July 13th
Despite the successes described in the last post, I had omitted some other small flaws. Particularly, if a single instruction changes the state of the system, and we're only looking at that instruction, then at most we've noted one variable has changed and we're in a new state. But if that is all you look at, then when you get into this state and start recording variable values, you find only the one that has changed. So you're (probably) missing a lot of information. This can be resolved by identifying the prior state, and importing or inheriting all the other variables with their unchanged values (if they were changed, you would have observed a new store instruction). That's what I implemented today.

Still, not everything is perfect: if a variable goes out of scope from one state to the next, the code will currently import that variable and its last value anyways. Further, the method for tracking the store instructions does not seem to support even primitive typed arrays.

No comments:

Post a Comment