Partial evaluation of the reversible language janus

  • Authors:
  • Torben Ægidius Mogensen

  • Affiliations:
  • University of Copenhagen, Copenhagen, Denmark

  • Venue:
  • Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

A reversible programming language is a programming language in which you can only write reversible programs, i.e., programs that can be run both forwards (computing outputs from inputs) and backwards (computing inputs from outputs). It is interesting to study reversible programs and languages because computations on reversible computers (computers that only allow reversible programs) in theory can be done using less energy than computations on traditional irreversible computers. Janus is a reversible, structured imperative programming language. We present a partial evaluator for the full Janus language with the exception of procedure calls. The partial evaluator converts Janus programs into reversible flowcharts, specialises these using polyvariant specialisation and converts the result back to structured form. Reversibility adds some complications, which we address in the paper. We demonstrate the results by some small examples. We believe this to be the first partial evaluator for a deterministic reversible programming language.