Hook into the interpreter and refresh it after every step.
It's important to watch out for the memory load. For example if we have a large array filled in sequentially, storing the whole array at every step may consume a very large amount of memory.
A solution may be to store the memory sparsely, in a TreeSet: and if a value does not change, the unchanged value should not be stored. This does not, however, solve the array problem, unless the array elements themselves are stored in a TreeSet, in a recursive structure. Somehow.
Hook into the interpreter and refresh it after every step.
It's important to watch out for the memory load. For example if we have a large array filled in sequentially, storing the whole array at every step may consume a very large amount of memory.
A solution may be to store the memory sparsely, in a TreeSet: and if a value does not change, the unchanged value should not be stored. This does not, however, solve the array problem, unless the array elements themselves are stored in a TreeSet, in a recursive structure. Somehow.