Abstract
We introduce a general theory of quantitative and metric rewriting systems, namely systems with a rewriting relation enriched over quantales modelling abstract quantities. We develop theories of abstract and term-based systems, refining cornerstone results of rewriting theory (such as Newman’s Lemma, Church-Rosser Theorem, and critical pair-like lemmas) to a metric and quantitative setting. To avoid distance trivialisation and lack of confluence issues, we introduce non-expansive, linear term rewriting systems, and then generalise the latter to the novel class of graded term rewriting systems. These systems make quantitative rewriting modal and context-sensitive, this way endowing rewriting with coeffectful behaviours.
- Martín Abadi, Anindya Banerjee, Nevin Heintze, and Jon G. Riecke. 1999. A Core Calculus of Dependency. In POPL ’99, Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, TX, USA, January 20-22, 1999. 147–160.
Google Scholar
- Andreas Abel and Jean-Philippe Bernardy. 2020. A unified view of modalities in type systems. Proc. ACM Program. Lang., 4, ICFP (2020), 90:1–90:28.
Google Scholar
Digital Library
- Samson Abramsky. 2002. Predicative Copying and Polynomial Time. Clifford Lectures, Tulane.
Google Scholar
- Samson Abramsky, Esfandiar Haghverdi, and Philip Scott. 2002. Geometry of interaction and linear combinatory algebras. Mathematical Structures in Computer Science, 12, 5 (2002), 625–665.
Google Scholar
Digital Library
- Peter Aczel. 1978. A general Church-Rosser theorem. Draft, Manchester.
Google Scholar
- A. Arnold and M. Nivat. 1980. Metric Interpretations of Infinite Trees and Semantics of non Deterministic Recursive Programs. Theor. Comput. Sci., 11 (1980), 181–205.
Google Scholar
Cross Ref
- Andrea Asperti and Stefano Guerrini. 1998. The optimal implementation of functional programming languages (Cambridge tracts in theoretical computer science, Vol. 45). Cambridge University Press.
Google Scholar
- Robert Atkey. 2018. Syntax and Semantics of Quantitative Type Theory. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018. 56–65.
Google Scholar
Digital Library
- Martin Avanzini, Ugo Dal Lago, and Akihisa Yamada. 2020. On probabilistic term rewriting. Sci. Comput. Program., 185 (2020).
Google Scholar
- Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon Plotkin. 2020. Foundations of Probabilistic Programming. Cambridge University Press, 333–360. https://doi.org/10.1017/9781108770750.011
Google Scholar
Cross Ref
- Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2018. An Algebraic Theory of Markov Processes. In Proc. of LICS 2018, Anuj Dawar and Erich Grädel (Eds.). ACM, 679–688. https://doi.org/10.1145/3209108.3209177
Google Scholar
Digital Library
- Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2021. Tensor of Quantitative Equational Theories. In 9th Conference on Algebra and Coalgebra in Computer Science, CALCO 2021, August 31 to September 3, 2021, Salzburg, Austria, Fabio Gadducci and Alexandra Silva (Eds.) (LIPIcs, Vol. 211). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 7:1–7:17. https://doi.org/10.4230/LIPIcs.CALCO.2021.7
Google Scholar
Cross Ref
- Roland Carl Backhouse. 2000. Galois Connections and Fixed Point Calculus. In Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, International Summer School and Workshop, Oxford, UK, April 10-14, 2000, Revised Lectures, Roland Carl Backhouse, Roy L. Crole, and Jeremy Gibbons (Eds.) (Lecture Notes in Computer Science, Vol. 2297). Springer, 89–148. https://doi.org/10.1007/3-540-47797-7_4
Google Scholar
Cross Ref
- Paolo Baldan, Filippo Bonchi, Henning Kerstan, and Barbara König. 2014. Behavioral Metrics via Functor Lifting. In Proc. of FSTTCS. 403–415.
Google Scholar
- Paolo Baldan, Filippo Bonchi, Henning Kerstan, and Barbara König. 2015. Towards Trace Metrics via Functor Lifting. In Proc. of CALCO 2015. 35–49.
Google Scholar
- H.P. Barendregt. 1984. The lambda calculus: its syntax and semantics. North-Holland.
Google Scholar
- R. Belohlávek. 2002. Fuzzy Relational Systems: Foundations and Principles. Springer US.
Google Scholar
- Radim Belohlávek, Tomas Kuhr, and Vilém Vychodil. 2009. Confluence and related properties of fuzzy relations. In FUZZ-IEEE 2009, IEEE International Conference on Fuzzy Systems, Jeju Island, Korea, 20-24 August 2009, Proceedings. IEEE, 569–574. https://doi.org/10.1109/FUZZY.2009.5277248
Google Scholar
Cross Ref
- Radim Belohlávek, Tomas Kuhr, and Vilém Vychodil. 2010. Confluence and termination of fuzzy relations. Inf. Sci., 180, 17 (2010), 3288–3303. https://doi.org/10.1016/j.ins.2010.04.007
Google Scholar
Digital Library
- Radim Belohlávek and Vilém Vychodil. 2005. Fuzzy Equational Logic (Studies in Fuzziness and Soft Computing, Vol. 186). Springer. https://doi.org/10.1007/b105121
Google Scholar
Cross Ref
- Jean-Philippe Bernardy, Mathieu Boespflug, Ryan R. Newton, Simon Peyton Jones, and Arnaud Spiwack. 2018. Linear Haskell: practical linearity in a higher-order polymorphic language. PACMPL, 2, POPL (2018), 5:1–5:29.
Google Scholar
- M. Bezem, J.W. Klop, E. Barendsen, R. de Vrijer, and Terese. 2003. Term Rewriting Systems. Cambridge University Press.
Google Scholar
- Richard S. Bird and Oege de Moor. 1997. Algebra of programming. Prentice Hall.
Google Scholar
- M.M. Bonsangue, F. Van Breugel, and J.J.M.M. Rutten. 1998. Generalized Metric Spaces: Completion, Topology, and Powerdomains via the Yoneda Embedding. Theor. Comput. Sci., 193, 1-2 (1998), 1–51.
Google Scholar
Digital Library
- R.V. Book and F. Otto. 1993. String-rewriting Systems. Springer-Verlag.
Google Scholar
- Aloïs Brunel, Marco Gaboardi, Damiano Mazza, and Steve Zdancewic. 2014. A Core Quantitative Coeffect Calculus. In Proc. of ESOP 2014. 351–370.
Google Scholar
Digital Library
- Pritam Choudhury, Harley Eades III, Richard A. Eisenberg, and Stephanie Weirich. 2021. A Graded Dependent Type System with a Usage-Aware Semantics. Proc. ACM Program. Lang., 5, POPL (2021), Article 50, jan, 32 pages. https://doi.org/10.1145/3434331
Google Scholar
Digital Library
- Alonzo Church and J. B. Rosser. 1936. Some Properties of Conversion. Trans. Amer. Math. Soc., 39, 3 (1936), 472–482.
Google Scholar
Cross Ref
- R. Crubillé and U. Dal Lago. 2014. On Probabilistic Applicative Bisimulation and Call-by-Value lambda-Calculi. In Proc. of ESOP 2014. 209–228.
Google Scholar
- R. Crubillé and U. Dal Lago. 2015. Metric Reasoning about lambda-Terms: The Affine Case. In Proc. of LICS 2015. 633–644.
Google Scholar
- R. Crubillé and U. Dal Lago. 2017. Metric Reasoning About lambda-Terms: The General Case. In Proc. of ESOP 2017. 341–367.
Google Scholar
- H.B. Curry and R. Feys. 1958. Combinatory Logic (Combinatory Logic). North-Holland Publishing Company.
Google Scholar
- H.B. Curry and R. Feys. 1958. Combinatory Logic (Combinatory Logic). North-Holland Publishing Company.
Google Scholar
- Francesco Dagnino and Fabio Pasquali. 2022. Logical Foundations of Quantitative Equality. In Proceedings of the 37th ACM/IEEE Symposium on Logic in Computer Science, LICS 2022. ACM. https://doi.org/10.1145/3531130.3533337 to appear
Google Scholar
Digital Library
- Fredrik Dahlqvist and Renato Neves. 2022. An Internal Language for Categories Enriched over Generalised Metric Spaces. In Proc. of CSL 2022, Florin Manea and Alex Simpson (Eds.) (LIPIcs, Vol. 216). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 16:1–16:18. https://doi.org/10.4230/LIPIcs.CSL.2022.16
Google Scholar
Cross Ref
- Ugo Dal Lago and Francesco Gavazzo. 2019. Effectful Normal Form Bisimulation. In Proc. of ESOP 2019. 263–292.
Google Scholar
- Ugo Dal Lago and Francesco Gavazzo. 2020. Differential Logical Relations Part II: Increments and Derivatives. In Proc. of ICTCS 2020. 101–114.
Google Scholar
- Ugo Dal Lago and Francesco Gavazzo. 2021. Differential logical relations, part II increments and derivatives. Theoretical Computer Science, issn:0304-3975 https://doi.org/10.1016/j.tcs.2021.09.027
Google Scholar
Digital Library
- Ugo Dal Lago and Francesco Gavazzo. 2021. Modal Reasoning = Metric Reasoning, via Lawvere. CoRR, abs/2103.03871 (2021), arXiv:2103.03871. arxiv:2103.03871
Google Scholar
- Ugo Dal Lago and Francesco Gavazzo. 2022. Effectful Program Distancing. Proc. ACM Program. Lang., 6, POPL (2022), https://doi.org/10.1145/3498680
Google Scholar
Digital Library
- Ugo Dal Lago and Francesco Gavazzo. 2022. A relational theory of effects and coeffects. Proc. ACM Program. Lang., 6, POPL (2022), 1–28. https://doi.org/10.1145/3498692
Google Scholar
Digital Library
- Ugo Dal Lago, Francesco Gavazzo, and Akira Yoshimizu. 2019. Differential Logical Relations, Part I: The Simply-Typed Case. In Proc. of ICALP 2019. 111:1–111:14. https://doi.org/10.4230/LIPIcs.ICALP.2019.111
Google Scholar
Cross Ref
- A.A. de Amorim, M. Gaboardi, J. Hsu, S. Katsumata, and I. Cherigui. 2017. A semantic account of metric preservation. In Proc. of POPL 2017. 545–556.
Google Scholar
- J.W. de Bakker and J.I. Zucker. 1982. Denotational Semantics of Concurrency. In STOC. 153–158.
Google Scholar
- M.M. Deza and E. Deza. 2009. Encyclopedia of Distances. Springer Berlin Heidelberg.
Google Scholar
- Henk Doornbos, Roland Carl Backhouse, and Jaap van der Woude. 1997. A Calculational Approach to Mathematical Induction. Theor. Comput. Sci., 179, 1-2 (1997), 103–135. https://doi.org/10.1016/S0304-3975(96)00154-5
Google Scholar
Digital Library
- W. Du, Y. Deng, and D. Gebler. 2016. Behavioural Pseudometrics for Nondeterministic Probabilistic Systems. In Proc. of SETTA 2016. 67–84.
Google Scholar
- M.H. Escardo. 1999. A metric model of PCF. In Workshop on Realizability Semantics and Applications.
Google Scholar
- N. Ferns, P Panangaden, and D. Precup. 2004. Metrics for Finite Markov Decision Processes. In Prof. of UAI 2004. 162–169.
Google Scholar
- N. Ferns, P Panangaden, and D. Precup. 2005. Metrics for Markov Decision Processes with Infinite State Spaces. In Prof. of UAI 2005. 201–208.
Google Scholar
- Robert C Flagg. 1992. Completeness in continuity spaces. In AMS Conference proceedings. 13, 183–199.
Google Scholar
- Peter J. Freyd and Andre Scedrov. 1990. Categories, allegories (North-Holland mathematical library, Vol. 39). North-Holland.
Google Scholar
- Marco Gaboardi, Shin-ya Katsumata, Dominic A. Orchard, Flavien Breuvart, and Tarmo Uustalu. 2016. Combining effects and coeffects via grading. In Proc. of ICFP 2016. 476–489.
Google Scholar
Digital Library
- Francesco Gavazzo. 2018. Quantitative Behavioural Reasoning for Higher-order Effectful Programs: Applicative Distances. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018. 452–461.
Google Scholar
Digital Library
- Francesco Gavazzo. 2019. Coinductive Equivalences and Metrics for Higher-order Languages with Algebraic Effects. Ph. D. Dissertation. University of Bologna, Italy. http://amsdottorato.unibo.it/9075/
Google Scholar
- Francesco Gavazzo and Cecilia Di Florio. 2022. Quantitative and Metric Rewriting: Abstract, Non-Expansive, and Graded Systems. CoRR, abs/2206.13610 (2022), https://doi.org/10.48550/arXiv.2206.13610
Google Scholar
- D. Gebler, Larsen. K.G., and S. Tini. 2016. Compositional bisimulation metric reasoning with Probabilistic Process Calculi. Logical Methods in Computer Science, 12, 4 (2016).
Google Scholar
- Dan R. Ghica and Alex I. Smith. 2014. Bounded Linear Types in a Resource Semiring. In Programming Languages and Systems - 23rd European Symposium on Programming, ESOP 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014, Proceedings. 331–350.
Google Scholar
- D. Gusfield. 1997. Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology. Cambridge University Press.
Google Scholar
Digital Library
- P. Hájek. 1998. Metamathematics of Fuzzy Logic. Springer Netherlands.
Google Scholar
- J.R. Hindley. 1964. The Church-Rosser Property and a Result in Combinatory Logic. Ph. D. Dissertation. University of Newcastle-upon-Tyne.
Google Scholar
- J.R. Hindley. 2008. Basic Simple Type Theory. Cambridge University Press.
Google Scholar
Digital Library
- J.R. Hindley and J.P. Seldin. 2008. Lambda-Calculus and Combinators: An Introduction. Cambridge University Press.
Google Scholar
- 2014. Monoidal Topology. A Categorical Approach to Order, Metric, and Topology, D. Hofmann, G.J. Seal, and W. Tholen (Eds.) (Encyclopedia of Mathematics and its Applications). Cambridge University Press.
Google Scholar
- Gérard P. Huet. 1980. Confluent Reductions: Abstract Properties and Applications to Term Rewriting Systems: Abstract Properties and Applications to Term Rewriting Systems. J. ACM, 27, 4 (1980), 797–821. https://doi.org/10.1145/322217.322230
Google Scholar
Digital Library
- Simon L. Peyton Jones. 1987. The Implementation of Functional Programming Languages. Prentice-Hall.
Google Scholar
Digital Library
- F.W. Lawvere. 1973. Metric spaces, generalized logic, and closed categories. Rend. Sem. Mat. Fis. Milano, 43 (1973), 135–166.
Google Scholar
Cross Ref
- Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2016. Quantitative Algebraic Reasoning. In Proc. of LICS 2016, Martin Grohe, Eric Koskinen, and Natarajan Shankar (Eds.). ACM, 700–709. https://doi.org/10.1145/2933575.2934518
Google Scholar
Digital Library
- Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2017. On the axiomatizability of quantitative algebras. In Proc. of LICS 2017. IEEE Computer Society, 1–12. https://doi.org/10.1109/LICS.2017.8005102
Google Scholar
Cross Ref
- Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2018. Free complete Wasserstein algebras. Log. Methods Comput. Sci., 14, 3 (2018), https://doi.org/10.23638/LMCS-14(3:19)2018
Google Scholar
Cross Ref
- Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2021. Fixed-Points for Quantitative Equational Logics. In Proc. of LICS 2021. IEEE, 1–13. https://doi.org/10.1109/LICS52264.2021.9470662
Google Scholar
Digital Library
- Daniel Marshall, Michael Vollmer, and Dominic Orchard. 2022. Linearity and Uniqueness: An Entente Cordiale. In Programming Languages and Systems, Ilya Sergey (Ed.). Springer International Publishing, Cham. 346–375.
Google Scholar
- Stephan Meier-Oeser. 2011. Medieval Semiotics. In The Stanford Encyclopedia of Philosophy (Summer 2011 ed.), Edward N. Zalta (Ed.). Metaphysics Research Lab, Stanford University.
Google Scholar
- Matteo Mio, Ralph Sarkis, and Valeria Vignudelli. 2021. Combining Nondeterminism, Probability, and Termination: Equational and Metric Reasoning. In Proc. of LICS 2021. IEEE, 1–14. https://doi.org/10.1109/LICS52264.2021.9470717
Google Scholar
Digital Library
- Matteo Mio, Ralph Sarkis, and Valeria Vignudelli. 2022. Beyond Nonexpansive Operations in Quantitative Algebraic Reasoning. CoRR, abs/2201.09087 (2022), arxiv:2201.09087
Google Scholar
- Georg Moser and Manuel Schneckenreither. 2020. Automated amortised resource analysis for term rewrite systems. Sci. Comput. Program., 185 (2020), https://doi.org/10.1016/j.scico.2019.102306
Google Scholar
Digital Library
- J.R. Munkres. 2000. Topology. Prentice Hall, Incorporated.
Google Scholar
- Matthias Naaf, Florian Frohn, Marc Brockschmidt, Carsten Fuhs, and Jürgen Giesl. 2017. Complexity Analysis for Term Rewriting by Integer Transition Systems. In Proc. of FroCoS 2017, Clare Dixon and Marcelo Finger (Eds.) (Lecture Notes in Computer Science, Vol. 10483). Springer, 132–150. https://doi.org/10.1007/978-3-319-66167-4_8
Google Scholar
Cross Ref
- M. H. A. Newman. 1942. On Theories with a Combinatorial Definition of "Equivalence". Annals of Mathematics, 43, 2 (1942), 223–243.
Google Scholar
Cross Ref
- Dominic Orchard, Vilem-Benjamin Liepelt, and Harley Eades III. 2019. Quantitative Program Reasoning with Graded Modal Types. Proc. ACM Program. Lang., 3, ICFP (2019), Article 110, 110:1–110:30 pages.
Google Scholar
Digital Library
- Tomas Petricek, Dominic A. Orchard, and Alan Mycroft. 2014. Coeffects: a calculus of context-dependent computation. In Proc. of ICFP 2014. 123–135.
Google Scholar
Digital Library
- J. Reed and B.C. Pierce. 2010. Distance makes the types grow stronger: a calculus for differential privacy. In Proc. of ICFP 2010. 157–168.
Google Scholar
- Emily Riehl and Dominic Verity. 2022. Elements of ∞ -Category Theory. Cambridge University Press. https://doi.org/10.1017/9781108936880
Google Scholar
Cross Ref
- Barry K. Rosen. 1970. Tree-Manipulating Systems and Church-Rosser Theorems. In Proceedings of the 2nd Annual ACM Symposium on Theory of Computing, May 4-6, 1970, Northampton, Massachusetts, USA. ACM, 117–127. https://doi.org/10.1145/800161.805157
Google Scholar
Digital Library
- K.I. Rosenthal. 1990. Quantales and their applications. Longman Scientific & Technical.
Google Scholar
- Richard Routley and Robert K. Meyer. 1972. The semantics of entailment - II. J. Philos. Log., 1, 1 (1972), 53–73.
Google Scholar
Cross Ref
- Richard Routley and Robert K. Meyer. 1972. The semantics of entailment - III. J. Philos. Log., 1, 2 (1972), 192–208.
Google Scholar
Cross Ref
- Richard Routley and Robert K. Meyer. 1973. The Semantics of Entailment. In Truth, Syntax and Modality, Hugues Leblanc (Ed.) (Studies in Logic and the Foundations of Mathematics, Vol. 68). Elsevier, 199 – 243.
Google Scholar
- D. Sands. 1998. Improvement Theory and Its Applications. In Higher Order Operational Techniques in Semantics, A. D. Gordon and A. M. Pitts (Eds.). Cambridge University Press, 275–306.
Google Scholar
Digital Library
- Gunther Schmidt. 2011. Relational Mathematics (Encyclopedia of Mathematics and its Applications, Vol. 132). Cambridge University Press.
Google Scholar
- Mícheál Ó Searcóid. 2006. Metric Spaces. Springer London.
Google Scholar
- L.A. Steen and J.A. Seebach. 1995. Counterexamples in Topology. Dover Publications.
Google Scholar
- M. H. Stone. 1949. Postulates for the barycentric calculus. Ann. Mat. Pura Appl. (4), 29, 1 (1949), 25–30. https://doi.org/10.1007/BF02413910
Google Scholar
Cross Ref
- Isar Stubbe. 2014. An introduction to quantaloid-enriched categories. Fuzzy Sets Syst., 256 (2014), 95–116. https://doi.org/10.1016/j.fss.2013.08.009
Google Scholar
Digital Library
- Alfred Tarski. 1941. On the Calculus of Relations. J. Symb. Log., 6, 3 (1941), 73–89. https://doi.org/10.2307/2268577
Google Scholar
Cross Ref
- A. Thue. 1914. Probleme über Veränderungen von Zeichenreihen nach gegebenen Regeln. J. Dybwad.
Google Scholar
- Alasdair Urquhart. 1972. Semantics for Relevant Logics. J. Symb. Log., 37, 1 (1972), 159–169.
Google Scholar
Cross Ref
- Vincent van Oostrom and Yoshihito Toyama. 2016. Normalisation by Random Descent. In Proc. of FSCD 2016, Delia Kesner and Brigitte Pientka (Eds.) (LIPIcs, Vol. 52). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 32:1–32:18. https://doi.org/10.4230/LIPIcs.FSCD.2016.32
Google Scholar
Cross Ref
- C. Villani. 2008. Optimal Transport: Old and New. Springer Berlin Heidelberg.
Google Scholar
Index Terms
Elements of Quantitative Rewriting
Recommendations
Transformation techniques for context-sensitive rewrite systems
Context-sensitive rewriting is a computational restriction of term rewriting used to model non-strict (lazy) evaluation in functional programming. The goal of this paper is the study and development of techniques to analyze the termination behavior of ...
Abstract Relations Between Restricted Termination And Confluence Properties Of Rewrite Systems
We investigate restricted termination and confluence properties of term rewriting systems, in particular weak termination, weak innermost termination, (strong) innermost termination, (strong) termination, and their interrelations. New criteria are ...






Comments