Janus: A Time-Reversible Language
By C. Lutz and H. Derby circa 1982. Header:
This is class report but also a great design exercise in reversible programming language constructs. For example, I love how they make if conditions reversible:
if num # 1 then i += 1 ; Put last prime away, if not done fact[i] : num ; and zero num else num -= 1 fi fact[i] # fact[i-1]
Note that # means not equals; colon is used for swap (!!). The "fi" condition must match the truth value of the "if" condition so the condition can be played backwards. Loop constructs are similarly organized so they can play backwards, the language has procedures but all variables are global :).
Sadly, although there are a few follow on papers (e.g. by Yokoyama et al.) and some esoteric reversible languages like Kayak, there doesn't seem to be any other good examples of high-level serious reversible programming languages.
Active forum topics
New forum topics