Theseus : A High Level Language for Reversible Computing

Programming in a reversible language remains “different” than programming in conventional irreversible languages, requiring specialized abstractions and unique modes of thinking. We present a high level language for reversible programming, called Theseus, that meshes naturally with conventional programming language abstractions. Theseus has the look and feel of a conventional functional language while maintaining a close correspondence with the low-level family of languages Π based on type isomorphisms [9]. In contrast to the point-free combinators of Π , Theseus has variables and binding forms, algebraic data types, function definitions by pattern matching, and is Turing complete. The language is strongly typed and all well-typed programs are reversible. We explain the semantics of Theseus via a collection of progressively expressive examples and outline its correspondence to Π .

[1]  Samson Abramsky,et al.  A categorical semantics of quantum protocols , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[2]  Amr Sabry,et al.  Information effects , 2012, POPL '12.

[3]  Philip Wadler,et al.  Views: a way for pattern matching to cohabit with data abstraction , 1987, POPL '87.

[4]  Shin-Cheng Mu,et al.  An Injective Language for Reversible Computation , 2004, MPC.

[5]  Robert Glück,et al.  Towards a Reversible Functional Language , 2011, RC.

[6]  Roshan P. James The computational content of isomorphisms , 2013 .

[7]  Michael P. Frank,et al.  Reversibility for efficient computing , 1999 .

[8]  Amr Sabry,et al.  Isomorphic Interpreters from Logically Reversible Abstract Machines , 2012, RC.

[9]  Armando B. Matos Linear programs in a simple reversible language , 2003, Theor. Comput. Sci..

[10]  Quipper: a scalable quantum programming language , 2013, PLDI.

[11]  Amr Sabry,et al.  Superstructural Reversible Logic , 2013 .

[12]  Kenichi Morita,et al.  A Simple Universal Logic Element and Cellular Automata for Reversible Computing , 2001, MCU.

[13]  Paolo Zuliani Logical reversibility , 2001, IBM J. Res. Dev..

[14]  David Gries,et al.  The Science of Programming , 1981, Text and Monographs in Computer Science.

[15]  Robert Glück,et al.  Revisiting an automatic program inverter for Lisp , 2005, SIGP.

[16]  Robert Glück,et al.  A reversible programming language and its invertible self-interpreter , 2007, PEPM '07.

[17]  Tommaso Toffoli,et al.  Reversible Computing , 1980, ICALP.

[18]  T. Toffoli,et al.  Conservative logic , 2002, Collision-Based Computing.