Janus (time-reversible computing programming language)

Janus
Paradigmimperative (procedural), reversible
Designed byChristopher Lutz, Howard Derby, Tetsuo Yokoyama, and Robert Glück
First appeared1982, 2007
Websitetetsuo.jp/ref/janus.html
Major implementations
Janus Playground

Janus is a time-reversible programming language written at Caltech in 1982.[1] The operational semantics of the language were formally specified, together with a program inverter and an invertible self-interpreter, in 2007 by Tetsuo Yokoyama and Robert Glück.[2][3] A Janus inverter and interpreter is made freely available by the TOPPS research group at DIKU.[4] Another Janus interpreter was implemented in Prolog in 2009.[5] An optimizing compiler has been developed in the RC3 research group.[6][7] The below summarises the language presented in the 2007 paper.[2]

Janus is a structured imperative programming language that operates on a global store without heap allocation and does not support dynamic data structures. As a reversible programming language, Janus performs deterministic computations in both forward and backward directions. An extension of Janus features procedure parameters and local variable declarations (local-delocal).[3] Additionally, other variants of Janus support dynamic data structures such as lists.[8][9]

  1. ^ Christopher Lutz (1986). "Janus: a time-reversible language".
  2. ^ a b Tetsuo Yokoyama; Robert Glück (2007). "A reversible programming language and its invertible self-interpreter". Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation. New York, NY, USA: ACM. pp. 144–153. doi:10.1145/1244381.1244404. ISBN 978-1-59593-620-2.
  3. ^ a b Yokoyama, Tetsuo; Axelsen, Holger Bock; Glück, Robert (5 May 2008). "Principles of a reversible programming language". Proceedings of the 5th conference on Computing frontiers. pp. 43–54. doi:10.1145/1366230.1366239. ISBN 978-1-60558-077-7. S2CID 14228334.
  4. ^ "Janus Playground".
  5. ^ "A reversible interpreter".
  6. ^ "RC3: Reversible Computing Compiler Collection".
  7. ^ Deworetzki, Niklas; Kutrib, Martin; Meyer, Uwe; Ritzke, Pia-Doreen (2022). "Optimizing Reversible Programs". Reversible Computation. Lecture Notes in Computer Science. Vol. 13354. pp. 224–238. doi:10.1007/978-3-031-09005-9_16. ISBN 978-3-031-09004-2.
  8. ^ Glück, Robert; Yokoyama, Tetsuo (2016). "A Linear-Time Self-Interpreter of a Reversible Imperative Language". Computer Software. 33 (3): 3_108–3_128. doi:10.11309/jssst.33.3_108.
  9. ^ Glück, Robert; Yokoyama, Tetsuo (2023). "Reversible computing from a programming language perspective". Theoretical Computer Science. 953: 113429. doi:10.1016/j.tcs.2022.06.010.