Abstract
We present Algeo, a functional logic programming language based on the theory of infinite dimensional modules. Algeo is reversible in the sense that every function has a generalised inverse, an adjoint, which can be thought of as an inverse execution of the forward function. In particular, when the given function is invertible, the adjoint is guaranteed to coincide with the inverse.
Algeo generalises “ordinary” forward-backward deterministic reversible programming by permitting relational and probabilistic features. This allows functions to be defined in a multitude of ways, which we summarise by the motto that “all definitions are extensional characterisations; all extensional characterisations are definitions.”
We describe the syntax, type system, and the axiomatic semantics of Algeo, and showcase novel features of the language through examples.
R. Kaarsgaard—Supported by DFF–International Postdoctoral Grant 0131-00025B.
M. K. Mathiesen—Supported by DFF Research Grant 8022-00415B.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Antoy, S., Hanus, M.: Functional logic programming. Commun. ACM 53(4), 74–85 (2010)
Arrighi, P., Dowek, G.: Linear-algebraic \(\lambda \)-calculus: higher-order, encodings, and confluence. In: Voronkov, A. (ed.) RTA 2008. LNCS, vol. 5117, pp. 17–31. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-70590-1_2
Bauer, A., Taylor, P.: The Dedekind reals in abstract Stone duality. Math. Struct. Comput. Sci. 19(4), 757–838 (2009)
Elsman, M., Henglein, F., Kaarsgaard, R., Mathiesen, M.K., Schenck, R.: Combinatory adjoints and differentiation. Accepted for Ninth Workshop on Mathematically Structured Functional Programming (MSFP 2022) (2022, to appear)
Gogioso, S., Genovese, F.: Infinite-dimensional categorical quantum mechanics. In: Duncan, R., Heunen, C. (eds.) Proceedings 13th International Conference on Quantum Physics and Logic (QPL 2016). Electronic Proceedings in Theoretical Computer Science, vol. 236. OSA (2016)
Hanus, M.: Functional logic programming: from theory to curry. In: Voronkov, A., Weidenbach, C. (eds.) Programming Logics. LNCS, vol. 7797, pp. 123–168. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37651-1_6
Hay-Schmidt, L., Glück, R., Cservenka, M.H., Haulund, T.: Towards a unified language architecture for reversible object-oriented programming. In: Yamashita, S., Yokoyama, T. (eds.) RC 2021. LNCS, vol. 12805, pp. 96–106. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-79837-6_6
Henglein, F., Kaarsgaard, R., Mathiesen, M.K.: The programming of algebra. Accepted for Ninth Workshop on Mathematically Structured Functional Programming (MSFP 2022) (2022, to appear)
Heunen, C., Kaarsgaard, R.: Bennett and Stinespring, together at last. In: Proceedings 18th International Conference on Quantum Physics and Logic (QPL 2021). Electronic Proceedings in Theoretical Computer Science, vol. 343, pp. 102–118. OPA (2021)
Heunen, C., Kaarsgaard, R.: Quantum information effects. Proc. ACM Program. Lang. 6(POPL) (2022)
Hoey, J., Ulidowski, I.: Reversible imperative parallel programs and debugging. In: Thomsen, M.K., Soeken, M. (eds.) RC 2019. LNCS, vol. 11497, pp. 108–127. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-21500-2_7
Jacobsen, P.A.H., Kaarsgaard, R., Thomsen, M.K.: \(\sf CoreFun\): a typed functional reversible core language. In: Kari, J., Ulidowski, I. (eds.) RC 2018. LNCS, vol. 11106, pp. 304–321. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-99498-7_21
James, R.P., Sabry, A.: Information effects. ACM SIGPLAN Not. 47(1), 73–84 (2012)
James, R.P., Sabry, A.: Theseus: a high level language for reversible computing (2014). https://www.cs.indiana.edu/~sabry/papers/theseus.pdf. Work-in-progress report
Kaarsgaard, R.: Condition/decision duality and the internal logic of extensive restriction categories. In: Proceedings of the Thirty-Fifth Conference on the Mathematical Foundations of Programming Semantics (MFPS XXXV). Electronic Notes in Theoretical Computer Science, vol. 347, pp. 179–202. Elsevier (2019)
Lanese, I., Nishida, N., Palacios, A., Vidal, G.: CauDEr: a causal-consistent reversible debugger for erlang. In: Gallagher, J.P., Sulzmann, M. (eds.) FLOPS 2018. LNCS, vol. 10818, pp. 247–263. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-90686-7_16
Nishida, N., Palacios, A., Vidal, G.: A reversible semantics for erlang. In: Hermenegildo, M.V., Lopez-Garcia, P. (eds.) LOPSTR 2016. LNCS, vol. 10184, pp. 259–274. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63139-4_15
Sabry, A., Valiron, B., Vizzotto, J.K.: From symmetric pattern-matching to quantum control. In: Baier, C., Dal Lago, U. (eds.) FoSSaCS 2018. LNCS, vol. 10803, pp. 348–364. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89366-2_19
Schordan, M., Jefferson, D., Barnes, P., Oppelstrup, T., Quinlan, D.: Reverse code generation for parallel discrete event simulation. In: Krivine, J., Stefani, J.-B. (eds.) RC 2015. LNCS, vol. 9138, pp. 95–110. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-20860-2_6
Schultz, U.P., Laursen, J.S., Ellekilde, L.-P., Axelsen, H.B.: Towards a domain-specific language for reversible assembly sequences. In: Krivine, J., Stefani, J.-B. (eds.) RC 2015. LNCS, vol. 9138, pp. 111–126. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-20860-2_7
Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury, an efficient purely declarative logic programming language. J. Log. Program. 29(1), 17–64 (1996)
Vaux, L.: The algebraic lambda calculus. Mathe. Struct. Comp. Sci. 19(5), 1029–1059 (2009). https://doi.org/10.1017/S0960129509990089
Yokoyama, T., Axelsen, H.B., Glück, R.: Towards a reversible functional language. In: De Vos, A., Wille, R. (eds.) RC 2011. LNCS, vol. 7165, pp. 14–29. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-29517-1_2
Yokoyama, T., Glück, R.: A reversible programming language and its invertible self-interpreter. In: Partial Evaluation and Program Manipulation. Proceedings, pp. 144–153. ACM (2007)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Henglein, F., Kaarsgaard, R., Mathiesen, M.K. (2022). Algeo: An Algebraic Approach to Reversibility. In: Mezzina, C.A., Podlaski, K. (eds) Reversible Computation. RC 2022. Lecture Notes in Computer Science, vol 13354. Springer, Cham. https://doi.org/10.1007/978-3-031-09005-9_9
Download citation
DOI: https://doi.org/10.1007/978-3-031-09005-9_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-09004-2
Online ISBN: 978-3-031-09005-9
eBook Packages: Computer ScienceComputer Science (R0)