Slashdot Log In
Hindsight: Reversible Computing
Posted by
Hemos
on Fri Mar 11, 2005 08:35 AM
from the step-back-into-the-past dept.
from the step-back-into-the-past dept.
One of the more interesting tech pieces that came out this week has been Hindsight [PDF]. Hindsight is made by Virtutech and is billed as the "the first complete, general-purpose tool for reverse execution and debugging of arbitrary electronic systems." The demos were received extremely well and it just looks cool.
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Sounds good - but expensive. (Score:5, Informative)
Hindsight will go into beta sites in May, with production slated for July. Incremental cost over Simics is around $5,000 per seat, but Hindsight won't target single seats. A typical engagement, including Simics, Hindsight and some initial model development, is estimated at $200,000 to $300,000 for a software development group with 10 to 20 seats.
Not necessarily (Score:5, Informative)
Parent
That's just nutty... (Score:4, Informative)
That would be quite nice... It almost seems like a shuttle head or what not for programmers... Rewind, play, slow motion and so on... I know they said it's the first complete one, but is there anything else out there like this?
Re:That's just nutty... (Score:2, Interesting)
http://www.lambdacs.com/debugger/debugger.html [lambdacs.com] I'm sure a Hindsight sales person would (correctly) say this isn't a complete solution, but its the closest thing I've seen before this article.
Re:That's just nutty... (Score:3, Insightful)
Thus the only way to "back up" computation is to know the past of that machine, i.e. a state log of the execution of the program.
B
Re:That's just nutty... (Score:4, Interesting)
At first I wasn't sure that your statement was true, but after thinking about it for 30 seconds or so, I realized it definitely was. Every instruction produces a deterministic calculation and can be reversed, right? If we have "ADD EAX, EBX", and know the current values of EAX and EBX, going backwards is easy, right?
Well, one really difficult case is jumps. How do you know what the previous instruction executed was? On X86 this would be pretty difficult since the encodings are non-regular, but even on an ISA with regular encodings it would be non-trivial because it would be difficult to figure whether you got to the instruction via a jump (which could be anywhere in memory), or from the previous instruction.
Add things such as Self-Modifying Code, and you have a real headache. Yes, you definitely need to track state as you go, though I'm not sure you'd need to save anything more than just the Instruction Pointer (which X86 does have a mechanism for). If you know what instructions were executed, it should be pretty easy to backtrack in time. I think.
Parent
Re:That's just nutty... (Score:3, Insightful)
Re:That's just nutty... (Score:3, Interesting)
Try this UTM program:
Re:That's just nutty... (Score:3, Insightful)
Wrong.
Basically any code that moves any data is crunching some other data. Given that RISC and CISC processors are Load/Store based architectures, that makes for pretty much a majority of cases.Re:That's just nutty... (Score:3, Informative)
Re:That's just nutty... (Score:3, Informative)
Yes, in the museum.
The debugger that came with BS3 on the TR440 [vaxman.de] had an option that enabled you to step back a defined (small due to lack of space for saving) number of steps if you set the appropriate switch when compiling. Very cool feature - 30 years ago !
CC.
UI (Score:5, Interesting)
My question is how UI interactions are handled. If the execution between the checkpoint and current-1 instruction includes a UI interaction, it might be very confusing to the programmer to know what or how many UI interactions need to be carried out to accomplish the backstep.
Re:UI (Score:2)
Don't the video game emulators already do this?
Re:UI (Score:2)
Yeah. To create a movie they save the state and log the following input, so the game can be replayed exactly. ZSNES also has a rewind key, but I haven't messed with it.
Re:UI (Score:3, Interesting)
Those bugs might be catched if the environment would record instructions one-by-one, but as is you may find a bug in your execution, roll back to the checkpoint and find that the bug is gone in the replay. Hey, that would be funny if it happened on a TV football game...
Mirror (Score:5, Informative)
Never underestimate the Slashdot Effect!
Virtualization layer for checkpointing and steppin (Score:5, Informative)
checkpoint the hard disk too? (Score:4, Insightful)
Parent
"Last Technical Hurdles"? (Score:2, Interesting)
How in the world did they pull this off?
The trick... (Score:2, Funny)
Re:"Last Technical Hurdles"? (Score:2, Troll)
Assuming most slashdotters are lazy f*cks, a condensed explanation: it takes a snapshot every couple of seconds, then when you want to go backwards it moves all the way to the previous snapshot, then runs forwards ignoring sleep() to appear instant.
But what about external events (Score:5, Interesting)
Re:But what about external events (Score:5, Informative)
Parent
Re:But what about external events (Score:3, Interesting)
It's exactly an example of an external packet containing a wrong checksum.
If the system is in isolation, you would have to come up with the idea of sending a malformed packet yourself instead of just letting it run until it crashed. that doesn't seem a very likely thing to try.
Re:But what about external events (Score:4, Funny)
This product is a cleverly disguised time machine.
You can actually rollback and reverse to actually see the initial "First post!" remark, and undo the slashdot effect.
If you look closely, you can also see the cognative response from Hemos as he clicked Accept on this submission.
Parent
Too good to be true... (Score:5, Insightful)
Therefore, I can't see their approach being foolproof, and the over-obvious advertisement (this is what normal debugging toolbars look like, but they don't have a nifty step-one-back feature) seems too bright to be withot caveat. At $5,000 a seat I'd say buyer beware.
Re:Too good to be true... (Score:4, Informative)
It also says in TFA that it doesn't actually calculate the reverse steps, so it doesn't matter if it's mathematically impossible.
What it does do is take complete snapshots every (for example) 100 steps. In order to move "backwards" a step, it returns to the previous breakpoint (a known state) and goes forward 99 steps.
Then it returns to the same breakpoint and goes forward 98 steps. And so on. So from your perspective, you see the 99th step, 98th, 97th, and on down. It only LOOKS like it's running backwards.
This would even work for the game of life.
So the performance tradeoff would be this:
More frequent breakpoints causes forward execution to be slower because it's spending more time saving data at regular intervals for breakpoints, but "reverse" execution would be faster because it has to iterate fewer steps from the previous breakpoint.
Parent
Wow ! (Score:2, Funny)
I can hear it now, "Godlike!"
The Omniscient Debugger? (Score:3, Informative)
http://www.lambdacs.com/debugger/debugger.html/ [lambdacs.com]
Seems like this has been done before, at least for java apps...
BSOL? (Score:3, Funny)
That would be so cool...
Alan.
Problems with platform emulalators (Score:3, Insightful)
What would be far more useful, would be to write tools that took advantage of many of the onboard hardware debugging capabilities of some of the common embedded chip architectures.
Thats simple... (Score:3, Funny)
Not by a decade. (Score:5, Interesting)
I read this usenet post [google.ca] every now and then when I'm trying to fix something, and it makes me want to cry every time I do.
Mod parent up (Score:4, Informative)
This has real potential. Beta versions of programs should run with this installed, so the core dump can be stepped backwards to the trouble spot. This could make Linux software significantly more reliable.
Parent
Re:Not by a decade. (Score:3, Informative)
First, it was kind of silly to name the program the same as my user name, but I never found a better name for it than "my trace-and-replay debugger".
My original plan was to write this for Solaris and sell it, hence the insistence on tracing and replaying without modifying the target program or the operating system, and that's why the replay controller messes with gdb's mind, so that it can work with a stock gdb rather than needing gdb extensions.
I developed a Linux version first because
Reverse Execution of Code? Haha! Oh wait... (Score:2, Interesting)
We know the result, C. How do we know if A, B, or both was 1? We lost information (2 bits of info became 1), and cannot get it back. So at first I dismissed any ridiculous claims of reverse execution. But we aren't the 1st of April...
Re:Reverse Execution of Code? Haha! Oh wait... (Score:2, Interesting)
There is a way to do this, although it is a bit ugly. The reverse-runner forks the program into 3, one for each of the possibilities. It then continues this until values have been solved.
It would produce a decision tree, and the debugger could work backwards.
Of course, this is purely theoretical. If A and B were strings, the number of processes would be infinite, in which case heuristics would be required, and it wouldn't be perfect.
Re:Reverse Execution of Code? Haha! Oh wait... (Score:3, Informative)
Reversible Computing != Reversible Execution (Score:5, Informative)
Anyway, the headline is misleading.
Re:Reversible Computing != Reversible Execution (Score:2)
OCaml anyone? (Score:4, Interesting)
And what about GUI and other side effects? Debugging a program in which such side-effects are deeply interleaved with algorithmics can be tricky indeed, although smart timestamping from the debugger will reduce glitches. But if you don't know better than randomly mixing algo and front-end in the first place, then you'd better fix the programmer than the program...
Any relation to ReVirt? (Score:5, Interesting)
ReVirt [umich.edu]:
Elephants never forget (Score:5, Interesting)
In this paper, he proposes the Elephant language [stanford.edu] that can refer to the past in computer programs.
Pretty cool stuff!
Call Stack (Score:2)
Is This Really New? (Score:3, Interesting)
Being able to trace backwards ware extraordinarily useful, and it's one thing I miss in modern compilers. I always assumed that this capability was taken out with the advent of event-driven (GUI) programming. That's when a lot of this kind of functionality seemed to disappear.
Hmm... (Score:2, Funny)
Come from? (Score:4, Funny)
(See also the entry in the jargon file [catb.org].)
Where do they store the entropy? (Score:3, Interesting)
more seriously, that would mean that there is no crypto on these machines since all encoding would be reversible.
Re:reversible computing == low energy computing (Score:3, Informative)
I think you got it just the wrong way.
Traditional computers generate entropy because of the information destroyed. Entropy created is necessarily associated with heat. With reversible computing there is no entropy increase, which in theory means less heat produced and less energy consumption.
Re:!tsop tsrif (Score:3, Funny)
It's friday people, lighten up