Abstract
Weak linearisation was defined years ago through a static characterization of the intuitive notion of virtual redex, based on (legal) paths computed from the (syntactical) term tree. Weak-linear terms impose a linearity condition only on functions that are applied (consumed by reduction) and functions that are not applied (therefore persist in the term along any reduction) can be non-linear. This class of terms was shown to be strongly normalising with deciding typability in polynomial time. We revisit this notion through non-idempotent intersection types (also called quantitative types). By using an effective characterisation of minimal typings, based on the notion of tightness, we are able to distinguish between “consumed” and “persistent” term constructors, which allows us to define an expansion relation, between general \(\lambda \)-terms and weak-linear \(\lambda \)-terms, whilst preserving normal forms by reduction.
First author supported by National Funds through the Portuguese funding agency, FCT - Fundação para a Ciência e a Tecnologia, within project LA/P/0063/2020. Second author partially supported by CNPq Universal 430667/2016-7 grant.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
A notion of reduction used in functional programming languages implementation, which does not evaluate inside values, i.e. under abstractions.
- 2.
Both deterministic and non-deterministic strategies have the same normal forms.
- 3.
Note that \((A ; \{y : [y_1:\sigma _1,\dots ,y_m:\sigma _m]\})+ A_1 + \dots + A_n = A + A_1 + \dots + A_n; \{y : [y_1:\sigma _1,\dots ,y_m:\sigma _m]\}\) since by BVC \(y \notin \texttt{fv}(u)\) thus \(y \notin \texttt{dom}(A_i)\) for each \(1\le i\le n\).
- 4.
\(y \notin \texttt{fv}(t')\) and by BVC \(y \notin \texttt{fv}(u)\) thus \(y \notin \texttt{fv}(t'\{u/x\})\).
References
Accattoli, B., Graham-Lengrand, S., Kesner, D.: Tight typings and split bounds, fully developed. J. Funct. Program. 30, e14 (2020)
Accattoli, B., Guerrieri, G.: Types of fireballs. In: Ryu, S. (ed.) APLAS 2018. LNCS, vol. 11275, pp. 45–66. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-02768-1_3
Accattoli, B., Guerrieri, G., Leberle, M.: Types by need. In: Caires, L. (ed.) ESOP 2019. LNCS, vol. 11423, pp. 410–439. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17184-1_15
Alves, S.: Linearisation of the lambda calculus. Ph.D. thesis, University of Porto (2007)
Alves, S., Fernández, M., Florido, M., Mackie, I.: Linearity and recursion in a typed lambda-calculus. In: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practices of Declarative Programming, pp. 173–182. ACM (2011)
Alves, S., Florido, M.: Weak linearization of the lambda calculus. Theor. Comput. Sci. 342(1), 79–103 (2005)
Alves, S., Kesner, D., Ventura, D.: A quantitative understanding of pattern matching. In: 25th International Conference on Types for Proofs and Programs. LIPIcs, vol. 175, pp. 3:1–3:36. Schloss Dagstuhl (2019)
Asperti, A., Laneve, C.: Paths, computations and labels in the \(\lambda \)-calculus. Theor. Comput. Sci. 142(2), 277–297 (1995)
Balabonski, T., Barenbaum, P., Bonelli, E., Kesner, D.: Foundations of strong call by need. Proc. ACM Program. Lang. 1(ICFP), 20:1–20:29 (2017)
Barendregt, H.P.: The Lambda Calculus: Its Syntax and Semantics. Studies in Logic and the Foundation of Mathematics, vol. 103. North-Holland (1984)
Barendregt, H.P., Bergstra, J., Klop, J.W., Volken, H.: Degrees, reductions and representability in the lambda calculus. Technical Report Preprint no.22, University of Utrecht, Department of Mathematics (1976)
Bucciarelli, A., Kesner, D., Ventura, D.: Non-idempotent intersection types for the lambda-calculus. Log. J. IGPL 25(4), 431–464 (2017)
Bucciarelli, A., Lorenzis, S.D., Piperno, A., Salvo, I.: Some computational properties of intersection types. In: 14th Annual IEEE Symposium on Logic in Computer Science, Trento, Italy, 2–5 July 1999, pp. 109–118 (1999)
Coppo, M., Dezani-Ciancaglini, M.: An extension of the basic functionality theory for the \(\lambda \)-calculus. Notre Dame J. Form. Log. 21(4), 685–693 (1980)
Curry, H.B.: Functionality in combinatory logic. Proc. Natl. Acad. Sci. U.S.A. 20, 584–590 (1934)
de Carvalho, D.: Sémantiques de la logique linéaire et temps de calcul. Ph.D. thesis, Université Aix-Marseille II (2007)
Florido, M., Damas, L.: Linearization of the lambda-calculus and its relation with intersection type systems. J. Funct. Program. 14(5), 519–546 (2004)
Gardner, P.: Discovering needed reductions using type theory. In: Hagiya, M., Mitchell, J.C. (eds.) TACS 1994. LNCS, vol. 789, pp. 555–574. Springer, Heidelberg (1994). https://doi.org/10.1007/3-540-57887-0_115
Ghica, D.R.: Geometry of synthesis: a structured approach to VLSI design. In: Proceedings of the 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 363–375. ACM (2007)
Ghica, D.R., Smith, A.: Geometry of synthesis III: resource management through type inference. In: Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 345–356. ACM (2011)
Girard, J.: Linear logic. Theor. Comput. Sci. 50, 1–102 (1987)
Hindley, J.R.: The principal type-scheme of an object in combinatory logic. Trans. Am. Math. Soc. 146, 29–60 (1969)
Hindley, J.R.: Basic Simple Type Theory. Cambridge University Press, Cambridge (1997)
Kesner, D., Ventura, D.: A resource aware semantics for a focused intuitionistic calculus. Math. Struct. Comput. Sci. 29(1), 93–126 (2019)
Kesner, D., Vial, P.: Consuming and persistent types for classical logic. In: Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science, pp. 619–632. ACM (2020)
Kesner, D., Vial, P.: Non-idempotent types for classical calculi in natural deduction style. Log. Methods Comput. Sci. 16(1) (2020)
Kfoury, A.: A linearization of the lambda-calculus and consequences. J. Log. Comput. 10(3), 411–436 (2000)
Lafont, Y.: The linear abstract machine. Theor. Comput. Sci. 59, 157–180 (1988)
Lévy, J.-J.: Réductions correctes et optimales dans le lambda-calcul. Ph.D. thesis, Éditeur inconnu (1978)
Mackie, I.: The geometry of interaction machine. In: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1995, pp. 198–208. ACM Press (1995)
Mazza, D., Pellissier, L., Vial, P.: Polyadic approximations, fibrations and intersection types. Proc. ACM Program. Lang. 2(6), 1–28 (2018)
van Raamsdonk, F., Severi, P., Sørensen, M.H., Xi, H.: Perpetual reductions in lambda-calculus. Inf. Comput. 149(2), 173–225 (1999)
Walker, D.: Substructural type systems. In: Advanced Topics in Types and Programming Languages, chapter 1, pp. 3–43. MIT Press, Cambridge (2005)
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
Alves, S., Ventura, D. (2022). Quantitative Weak Linearisation. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds) Theoretical Aspects of Computing – ICTAC 2022. ICTAC 2022. Lecture Notes in Computer Science, vol 13572. Springer, Cham. https://doi.org/10.1007/978-3-031-17715-6_7
Download citation
DOI: https://doi.org/10.1007/978-3-031-17715-6_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-17714-9
Online ISBN: 978-3-031-17715-6
eBook Packages: Computer ScienceComputer Science (R0)