A reversible programming language and its invertible self-interpreter

  • Authors:
  • Tetsuo Yokoyama;Robert Glück

  • Affiliations:
  • University of Copenhagen, Copenhagen Ø and The University of Tokyo, Tokyo, Japan;The University of Tokyo, Tokyo, Japan

  • Venue:
  • Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

A reversible programming language supports deterministic forward and backward computation. We formalize the programming language Janus and prove its reversibility. We provide a program inverter for the language and implement a self-interpreter that achieves deterministic forward and backward interpretation of Janus programs without using a computation history. As the self-interpreter is implemented in a reversible language, it is invertible using local program inversion. Many physical phenomena are reversible and we demonstrate the power of Janus by implementing a reversible program for discrete simulation of the Schrödinger wave equation that can be inverted as well as run forward and backward.