JuliaInterpreter.jl icon indicating copy to clipboard operation
JuliaInterpreter.jl copied to clipboard

rr

Open timholy opened this issue 6 years ago • 3 comments

In the C/C++ world rr seems to be the greatest thing ever because you can go backwards in time. Should we consider something similar here? We could just (1) deepcopy the original inputs, and then (2) push!(statements, (stmt, scopeof(frame), pc)) for each statement we encounter, where statements is a single linear record of everything you did. This would unwind all the loops, all the calls, etc. You'd have to figure out some scheme for recording "name changes" from passing objects in as arguments, but perhaps the slot numbers basically already do that.

timholy avatar Mar 22 '19 12:03 timholy

(wrong button, sorry)

timholy avatar Mar 22 '19 14:03 timholy

I don't see how you could go back in time (other than to the start of the function where you did the deepcopy) based on this.

KristofferC avatar Sep 04 '19 13:09 KristofferC

https://stackoverflow.com/questions/1470434/how-does-reverse-debugging-work

Definitely requires saving the initial state and irreversible changes. That is, x += 1 would not need saving the old value but x = 5 would. The point being, since we know every change that's being made, we could record adequate history information to go in either direction.

timholy avatar Sep 04 '19 15:09 timholy