A categorical foundation for structured reversible flowchart languages: Soundness and adequacy

Structured reversible flowchart languages is a class of imperative reversible programming languages allowing for a simple diagrammatic representation of control flow built from a limited set of control flow structures. This class includes the reversible programming language Janus (without recursion), as well as more recently developed reversible programming languages such as R-CORE and R-WHILE. In the present paper, we develop a categorical foundation for this class of languages based on inverse categories with joins. We generalize the notion of extensivity of restriction categories to one that may be accommodated by inverse categories, and use the resulting decisions to give a reversible representation of predicates and assertions. This leads to a categorical semantics for structured reversible flowcharts, which we show to be computationally sound and adequate, as well as equationally fully abstract with respect to the operational semantics under certain conditions.

[1]  Peter Selinger,et al.  Dagger Compact Closed Categories and Completely Positive Maps: (Extended Abstract) , 2007, QPL.

[2]  Robert Glück,et al.  A Minimalist's Reversible While Language , 2017, IEICE Trans. Inf. Syst..

[3]  Glynn Winskel,et al.  The formal semantics of programming languages - an introduction , 1993, Foundation of computing series.

[4]  Robert Glück,et al.  What Do Reversible Programs Compute? , 2011, FoSSaCS.

[5]  Holger Bock Axelsen,et al.  Reversible arithmetic logic unit for quantum arithmetic , 2010 .

[6]  Bart Jacobs,et al.  New Directions in Categorical Logic, for Classical, Probabilistic and Quantum Logic , 2012, Log. Methods Comput. Sci..

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

[8]  Brett Gordon Giles An investigation of some theoretical aspects of reversible computing , 2014 .

[9]  Andrew M. Pitts,et al.  Foundations of Software Science and Computation Structures , 2015, Lecture Notes in Computer Science.

[10]  Robert Glück,et al.  Implementing Reversible Object-Oriented Language Features on Reversible Machines , 2017, RC.

[11]  Robert Glück,et al.  The universal resolving algorithm and its correctness: inverse computation in a functional language , 2002, Sci. Comput. Program..

[12]  Alley Stoughton,et al.  Fully abstract models of programming languages , 1986, Research Notes in Theoretical Computer Science.

[13]  S. Lack,et al.  Introduction to extensive and distributive categories , 1993 .

[14]  Robert Glück,et al.  A Reversible Processor Architecture and Its Reversible Logic Design , 2011, RC.

[15]  Gordon D. Plotkin,et al.  Full abstraction, totality and PCF , 1999, Mathematical Structures in Computer Science.

[16]  Robin Kaarsgaard,et al.  Join Inverse Categories as Models of Reversible Recursion , 2016, FoSSaCS.

[17]  Robert Glück,et al.  A Linear-Time Self-Interpreter of a Reversible Imperative Language , 2016 .

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

[19]  Robert Glück,et al.  The Universal Resolving Algorithm: Inverse Computation in a Functional Language , 2000, MPC.

[20]  Robert Glück,et al.  Reversible Machine Code and Its Abstract Processor Architecture , 2007, CSR.

[21]  Robert Glück,et al.  A Program Inverter for a Functional Language with Equality and Constructors , 2003, APLAS.

[22]  Robert Glück,et al.  Optimizing Reversible Simulation of Injective Functions , 2012, J. Multiple Valued Log. Soft Comput..

[23]  Charles H. Bennett,et al.  Logical reversibility of computation , 1973 .

[24]  Robert Glück,et al.  Fundamentals of reversible flowchart languages , 2016, Theor. Comput. Sci..

[25]  J. Robin B. Cockett,et al.  Restriction categories II: partial map classification , 2003, Theor. Comput. Sci..

[26]  Robert Glück,et al.  Join inverse categories and reversible recursion , 2017, J. Log. Algebraic Methods Program..

[27]  J. Robin B. Cockett,et al.  Restriction categories I: categories of partial maps , 2002, Theor. Comput. Sci..

[28]  J. Robin B. Cockett,et al.  Restriction categories III: colimits, partial limits and extensivity , 2007, Mathematical Structures in Computer Science.

[29]  Dominic R. Verity,et al.  Traced monoidal categories , 1996, Mathematical Proceedings of the Cambridge Philosophical Society.

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

[31]  Christopher D. Carothers,et al.  Efficient optimistic parallel simulations using reverse computation , 1999, Workshop on Parallel and Distributed Simulation.

[32]  Robert Glück,et al.  Reversible Flowchart Languages and the Structured Reversible Program Theorem , 2008, ICALP.

[33]  Robert Glück,et al.  A Method for Automatic Program Inversion Based on LR(0) Parsing , 2005, Fundam. Informaticae.

[34]  Robert Glück,et al.  A Categorical Foundation for Structured Reversible Flowchart Languages , 2018, MFPS.

[35]  P. Selinger A Survey of Graphical Languages for Monoidal Categories , 2009, 0908.3347.

[36]  Torben Æ. Mogensen Partial evaluation of the reversible language janus , 2011, PEPM '11.