Skip to main content

Algeo: An Algebraic Approach to Reversibility

  • Conference paper
  • First Online:
Reversible Computation (RC 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13354))

Included in the following conference series:

  • 401 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Antoy, S., Hanus, M.: Functional logic programming. Commun. ACM 53(4), 74–85 (2010)

    Article  Google Scholar 

  2. 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

    Chapter  MATH  Google Scholar 

  3. Bauer, A., Taylor, P.: The Dedekind reals in abstract Stone duality. Math. Struct. Comput. Sci. 19(4), 757–838 (2009)

    Article  MathSciNet  Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. 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

    Chapter  MATH  Google Scholar 

  7. 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

    Chapter  MATH  Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. Heunen, C., Kaarsgaard, R.: Quantum information effects. Proc. ACM Program. Lang. 6(POPL) (2022)

    Google Scholar 

  11. 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

    Chapter  MATH  Google Scholar 

  12. 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

    Chapter  MATH  Google Scholar 

  13. James, R.P., Sabry, A.: Information effects. ACM SIGPLAN Not. 47(1), 73–84 (2012)

    Article  Google Scholar 

  14. 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

  15. 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)

    Google Scholar 

  16. 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

    Chapter  Google Scholar 

  17. 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

    Chapter  Google Scholar 

  18. 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

    Chapter  Google Scholar 

  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

    Chapter  Google Scholar 

  20. 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

    Chapter  MATH  Google Scholar 

  21. 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)

    Article  Google Scholar 

  22. Vaux, L.: The algebraic lambda calculus. Mathe. Struct. Comp. Sci. 19(5), 1029–1059 (2009). https://doi.org/10.1017/S0960129509990089

  23. 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

    Chapter  MATH  Google Scholar 

  24. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mikkel Kragh Mathiesen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics