Hindsight: Reversible Computing
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.
From reading about this earlier, it is a very exciting technology for embedded systems. It does seem a bit expensive though:
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.
I'm a big tall mofo.
With Simics Hindsight it is now possible to step back just before the error and then run forward again, providing another opportunity to reproduce the error and look more closely at what occurs in detail, without having to re-launch the program. Simics Hindsight can even unboot an operating system, running the code backwards until it reaches the initial hardware launch instruction after a hardware reset.
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?
Very nice for debugging but i am curious how it works in practicality
string sig = llGetSig("dimentox"); llSay(0,sig);
At least they admit the Democrats are behind this obvious power grab.... what... oh demonstration.. never mind.
..you could get a freeware disassembler for the 8088 which put labels in for you to make it easier to work out what was going on?
They say the way they accomplish this is running the program in some sort of sandbox and taking checkpoints every so often and then when you step back, it actually runs forward from the closest checkpoint and stops one instruction short.
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.
I've had enough abrasive sigs. Kittens are cute and fuzzy.
From their website, you can get a free academic version of the software as well. At least, that's what the site says (I didn't register to download it, so I can't confirm).
- Despite popular opinion, I am not perfect.
Never underestimate the Slashdot Effect!
Get a free iPod Nano 4GB!
This seems to create a virtualization layer where checkpoints are saved periodically, then instructions are single stepped through. So to step back, it goes to the first checkpoint before the instruction you want to step back to, then it single steps up to that point. This would aid in kernel-level debugging where data structures might be overwritten from almost anywhere in the computer that can access the kernel space -- no need to set a watchpoint then reboot and wait for the next error to occur.
Yeah, I can see some technical hurdles here ... like storing all old variable/register contents, jump addresses, etc.
How in the world did they pull this off?
Do you like Japanese imports?
It's all very well to be able to run code backwards/forwards/slo-mo/etc, but how to handle non deterministic external events coming in from the network? Does this tool presume that all applications to which it will be applied live in isolation?
Rich people are eccentric. Poor people are strange. Me, I'd be happy with odd.
20/20 ...
*ducks a tomato*
i'll be here all week
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.
Now when I'm playing online, when I die I can rewind.
I can hear it now, "Godlike!"
"Sweet llamas of the Bahamas !"
http://www.lambdacs.com/debugger/debugger.html/
Seems like this has been done before, at least for java apps...
So, would reversible computing let me have a Blue Screen Of Life?
That would be so cool...
Alan.
Hindsight is a service within their platform emulator. While it sounds nifty, and I'm all for it... emulators never behaive the same as the real platform... especially in embedded environments. The timing of peripherals is never the same on the emulator as the platform. The result is that lots of time is spent debugging the emulator environment that bares little fruit for the platform environment.
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.
Someone you trust is one of us.
If you read the article carefully, it does actually say. Basically they've optimised the printf() and scanf() functions, from the standard C libraries, to a very high degree. Using these optimised functions allows them to literally run the processor backwards, with a little help from Euler Integration to approximate the execution path. Its very clever indeed.
Shitram Brown, PhD
Professor of Mathematics
just invert the micro clock signal so everything runs backwards :)
I read this usenet post every now and then when I'm trying to fix something, and it makes me want to cry every time I do.
Mike Hoye
Coupled with fix and continue, you have not only a more productive development environment, but an environment where you can press a prototype into limited production use long before it's ready. Everyone in their right mind thinks that's a retarded idea; even so, it becomes necessary once in awhile. Getting that prototype into production as soon as possible can be the difference between the company surviving or failing. I know because I've been there. These two features saved a company I used to work for. Thank you, Microsoft!
Hindsight seems to work based on a checkpoint mode when running backwards, it goes back to a checkpoint then runs forwards to the expected point. However how does it work with hardware?
Anybody tried this out for real?
Misleading titles? Inflammatory blurbs? Keep in mind that Slashdot is a tabloid.
Reversible computing is a way of computing without (permenantly) consuming energy. Look it up if you're not familiar, because it's pretty interesting.
Anyway, the headline is misleading.
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...
I can see from the screenshots that they provide the debugger as an eclipse plugin.
Does that include a C programming environment for eclipse or do they use the CPE project? I didn't know that was at a usable state yet.
I use eclipse for java and it is excellent.
Seriously, if this really works, the $5K/seat could well be worth it. Now, if they could convince Intel/AMD/IBM to somehow provide advanced support in the hardware...
-k
Generally, bash is superior to python in those environments where python is not installed.
I know this won't be popular, but the lowly Visual Basic has had this feature forever. Of course, this will be very useful for real (compiled) languages and has to be better than the piece of crap "Edit and Continue".
ReVirt:
Belief is the currency of delusion.
In this paper, he proposes the Elephant language that can refer to the past in computer programs.
Pretty cool stuff!
I can back up easily enough with a call stack. I can see some situations where this approach might be better than a simple stack, but those instances would seem to be few and far between.
I remember that several of the older compilers like Borland's Turbo Pascal, Turbo C and Microsoft C and MASM could run reverse execution through the debugger. They also had the "animate" feature that let you step through the code automatically, but slowly so you could watch each line of code as it was executed. I remember setting my PC up with two video cards: a monochrome Hercules card and an EGA card. A lot of the compilers from those days supported mutiple graphics card output - the code would appear on the monochrome monitor and the running executable would appear on the color monitor.
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.
Oh, come on! +1 Funny at least.
Yes it does. It works with any program, including operating systems.
A while ago there was a jwz post about being able to run a debugger backwards (for some reason I thought this needed kernel patches). If the checkpointing happened at "machine" level this would be possible regardless of the language...
(Actually someone has already posted the links jwz was talking about)
Interesting, but will it work on a dead badger running GNU/Linux? Cause thats where do all my development work.
http://www.accelerateglobalwarming.com
that I'm currently (in theory) working on is about inverting Turing machines...now this comes out. Creepy. Time to change the tinfoil.
It seems there are people out there trying to make our jobs easier & easier to do, removing all of the mystery that surrounds us. With all of these fancy IDE's, debugging tools, etc. we are making ourselves less and less valuable. Before you know it, your grandmother will be an application developer and you'll be making minimum wage!
This way to the egress...
That was exactly the same thought I had, I just used the rest of my mod points 4 mins ago.
Univac, EXEC 8 and TSO terminal, debugger that was able to do this and more - so the time goes..
"Univac 1108, 36-bit SMP.
Good, easy-to-use interactive mainframe OS.
DMA-speed terminals, with local command history.
``Master Catalogue'' on drum.
``Roll-in/Roll-out'' reduced disk-space requirements.
Files ``automatically'' copied from tape to disk on open.
Files automatically copied to tape when space needed, based on file usage.
Most OS code reentrant, shared between CPUs.
Single kernel data structure, work queues."
I didn't follow the link, but I imagine new constructs such as do over and go back - closely related to the just kidding clause.
And what about memory leaks? Programs that can't remember their past are doomed to loop forever!
This issue is a bit more complicated than you think.
Some classes of errors are pretty hard to solve, in particular timing, synchronization, and some clases of hardware related failures can appear to be sporadic and very difficult to reproduce and analyze. When I'm up against one of those problems, I'll take all the help I can get. Particularly for timing dependent stuff, where instrumentation chan change the timing characteristics.
....particularly on my Longhorn system.
....running on my C64.
The term "reversible computing" has also been used for a type of circuit that does not consume energy, other than entropy, for computation. The trick is run a computation in parallel that goes in the opposite direction. Theoretically, this would mean really long-lived laptops and space probes, but I haven't heard of anyone testing this on more than a few gates.
more seriously, that would mean that there is no crypto on these machines since all encoding would be reversible.
Some drink at the fountain of knowledge. Others just gargle.
the state of a computer is not the state of the memory. it includes the hard disk as well. to give one tiny example: the vvirtual memory. to give a better example, if a program overwrites a file you have to check point back over that too. to give an even better example, if you were debuggin a disk defragmenting program every bit on the disk could move.
Some drink at the fountain of knowledge. Others just gargle.
Although the summary cleared things up.
At first glance, I thought I'd eventually take an "upgrade" path to a VIC-20 via "Reversible Computing"
C'mon, this is funny!
:)
It's friday people, lighten up
If it's not one thing, it's Steve's Mother
I was getting excited since I thought they had actually created a practical reversible computing hardware system. The idea behind true reversible computing is that information flow in computation is linked to the energy lost as heat during computing. Von Neumann showed that there was a hard limit on the amount of energy needed everytime a bit of information is lost dependent on Boltzmann's constant and temperature of the system. The ultimate goal is to have a computer that looks a lot like particle physics where the rules are completely time-symmetric. I.e. if I reverse the flow of time, the laws of physics will still run properly and allow me to reconstruct all the previous states from the present one. While the principle of quantum reversibility (sometimes called the "conservation of information law") you can't do the same with most binary operations since all the common ones except NOT take in 2 bits and output 1 bit. Thus, it is impossible to run the system in reverse and reconstruct those two bits from that one bit. This has the adverse effect of wasting energy as heat into the environment.
It's and interesting field that's going to take off as Moore's Law slows down due to wasted heat. A good starting page with links for the interested is here.
--
Free iPod? Try a free Mac Mini
Or a free Nintendo DS, GC, PS2, Xbox
Wired article as proof
I seem to remember being able to step backwards in Borland's Turbo Debugger. I don't remember details but I do remember trying it out a few times.
TD was a great debugger for its time. They got the UI just right.
Last Post
Reverse execution? Are we finally going to see an implementation of the COME FROM statement?
(See also the entry in the jargon file.)
-- Alastair
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
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.
This is especially significant when you consider 50% of a software engineer's time is spent debugging software.
They assume that programmers... DEBUG! Hah!
.: 2+2 = PI SQRT(1+N)
Since this appears to be a sandbox tool, what's the problem? The only real problem I can see, and that people bring up (since everything else is deterministic in a closed environment) would be random or psuedo random number generation. Could it not (or does it) simply save the results of system clock queries? Since the system clock is used to seed most random number generators, saving the return values and feeding them back could eliminate the problem. Clearly in encryption intensive programs this would act like some kind of memory bomb, but it would solve probably 99.9% of applications. As a safeguard, it could simply be alloted a certain area of memory that, once filled, would return to a 'closest fit' senario.
That would be redicoulas.
That would be redickulos.
That would be ridikyulus.
That would be funny!
They seem to log execution and allow backstepping in individual threads:
http://www.omnicore.com/debugger.htm
in hindsight it will all become clear to them
This *has* been done for Life, in Life32 (great program, and I am not affiliated). It works very well. It was in fact the first thing I thought of when I read this.
Seems to me it at least deserves an attempt at revial. I may email the developer tonight if I have time and see if he'd be interested in participating (in an advisory capacity at least).
I don't have time to do it all myself, but I can at least try to start the ball rolling...
DNA just wants to be free...
I didn't register to download it
Well, whoever does, share the wealth.
gewg_
If only it could work...
My current problem involves 4 cpus, 70 threads, 2GB RAM, a C/Just In time compiler/some assembler and a pointer being blatted in one of our data structures, once every eight hours.
Would be interesting to see how often the actual error would occur under a simulator. Alas, the tool isn't for the machine I'm working on.
sob.
--Biggles.
And on top of that, most IDEs have a "set next statement" function, that combined with some quick on-the-fly restoration of variables that changed between then and now gives you the same effect. In fact, in that document it admits that all its really doing is having that second part (the restoration of variables) occur automatically instead of having the programmer do it manually.
I'm glad that they did it, but not glad that they decided it was so groundbreaking (give me a break, we've been doing the same thing [admittedly manually, but still] for years) that they would charge such outlandish costs for it.
-Vendal Thornheart
It is possible to replay the execution of programs that communicate with the outside world, rather than just in an isolated virtual machine: you have to log nondeterministic events. See http://www.erights.org/elang/concurrency/determini sm/overview.html.
a ge.
The first language I know of that supported replay is the Abundance database language, back in 1986. Also see http://c2.com/cgi/wiki?ReversibleProgrammingLangu
now on a side note does anyone know where i can get the c/c++ equivelent of php's print_r function?
Functions such as print_r are available only in systems that allow for polymorphism. If all your classes and containers inherit interface from some Printable class, then you can implement print_r for each object, and then have containers call print_r on their contents.