What is reversible computing?
At it's core, reversible computing is exactly as it sounds: computations that can be reversed. Think of a simple program that adds a
to b
. A reversible system would allow this transaction to be 'undone' and have a
and b
revert to their initial states. You may be thinking "Well that's already possible, it's called the undo button!".
Well.. Not really. Any reverse operations that modern computers perform are not actually being reversed. Instead of reversing a = a + b
, "undoing" this operation means performing another operation-- Namely, a = a - b
.
But it gets deeper than that. The most simple example of a + b
may lead you to think that reversible computation is simply a way of undoing calculations with less effort, but it is actually much more substantial. A truly reversible system would allow all calculations to be reversed, and all of the outputs of the calculations as well.
While being almost completely theoretical at this point, there are practical purposes for this. Being a cyber-focused blog, take a look at a cyber-related example (which I will be presenting at the AFCEA conference this summer):
A cyber scenario
Imagine you have a server that is being used as a high-importance, high-secrecy computational and storage unit for whatever organization. This box is employing the latest and best firewalls and anti-malware programs, and is widely thought to be 100% secure. You wake up one morning and find out that the machine has been encrypted, some files deleted, and you have no idea how. Well without reversible computation you're pretty much just screwed. Unless you have a backup, you have just lost all the important data stored on the machine.
However... If your machine was a truly reversible system, then you are fine. You can literally rewind the machine to a previous state. Undoing all the encryption, deletion, and other malicious activity. But that's not all. Being able to reverse the machine's state incrementally would allow you to examine the state reverse-chronologically and see exactly where and how the attacker gained access, and what the attacker did. Even if they perfectly covered their tracks.
Not everyone may appreciate the importance of this from my cyber example, so here's an example that may appeal more to developers:
A computer science scenario
Debugging code is often tedious and vague on what went wrong and how. Modern day debuggers allow you to go step-by-step, pausing the code along the way and monitoring states. If an error occurs, the program will crash and you'll be shown a cryptic error message. In the world of reversible computing, debugging code will be trivial task. Debuggers will be able to rewind the code after an error allowing you to monitor the state in a reverse chronological order, seeing every step along the way and how the system is evolving.
Needless to say, reversible computation has lots of benefits. Unfortunately, it is still far from being actualized. Despite having some ridiculously smart people researching it, there is still some discourse in the community. We are still unsure as to what exactly reversible computation means, and how to implement it. I'm currently working with a professor at my university to implement a formal language to describe reversible computations which I will likely make a blog post about in the future, so look out for that.