Skip to main content

Quantitative Weak Linearisation

  • Conference paper
  • First Online:
Theoretical Aspects of Computing – ICTAC 2022 (ICTAC 2022)

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.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    A notion of reduction used in functional programming languages implementation, which does not evaluate inside values, i.e. under abstractions.

  2. 2.

    Both deterministic and non-deterministic strategies have the same normal forms.

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

    \(y \notin \texttt{fv}(t')\) and by BVC \(y \notin \texttt{fv}(u)\) thus \(y \notin \texttt{fv}(t'\{u/x\})\).

References

  1. Accattoli, B., Graham-Lengrand, S., Kesner, D.: Tight typings and split bounds, fully developed. J. Funct. Program. 30, e14 (2020)

    Article  MathSciNet  Google Scholar 

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

    Chapter  Google Scholar 

  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

    Chapter  Google Scholar 

  4. Alves, S.: Linearisation of the lambda calculus. Ph.D. thesis, University of Porto (2007)

    Google Scholar 

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

    Google Scholar 

  6. Alves, S., Florido, M.: Weak linearization of the lambda calculus. Theor. Comput. Sci. 342(1), 79–103 (2005)

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  8. Asperti, A., Laneve, C.: Paths, computations and labels in the \(\lambda \)-calculus. Theor. Comput. Sci. 142(2), 277–297 (1995)

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  10. Barendregt, H.P.: The Lambda Calculus: Its Syntax and Semantics. Studies in Logic and the Foundation of Mathematics, vol. 103. North-Holland (1984)

    Google Scholar 

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

    Google Scholar 

  12. Bucciarelli, A., Kesner, D., Ventura, D.: Non-idempotent intersection types for the lambda-calculus. Log. J. IGPL 25(4), 431–464 (2017)

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  15. Curry, H.B.: Functionality in combinatory logic. Proc. Natl. Acad. Sci. U.S.A. 20, 584–590 (1934)

    Article  Google Scholar 

  16. de Carvalho, D.: Sémantiques de la logique linéaire et temps de calcul. Ph.D. thesis, Université Aix-Marseille II (2007)

    Google Scholar 

  17. Florido, M., Damas, L.: Linearization of the lambda-calculus and its relation with intersection type systems. J. Funct. Program. 14(5), 519–546 (2004)

    Article  MathSciNet  Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  21. Girard, J.: Linear logic. Theor. Comput. Sci. 50, 1–102 (1987)

    Article  MathSciNet  Google Scholar 

  22. Hindley, J.R.: The principal type-scheme of an object in combinatory logic. Trans. Am. Math. Soc. 146, 29–60 (1969)

    MathSciNet  MATH  Google Scholar 

  23. Hindley, J.R.: Basic Simple Type Theory. Cambridge University Press, Cambridge (1997)

    Book  Google Scholar 

  24. Kesner, D., Ventura, D.: A resource aware semantics for a focused intuitionistic calculus. Math. Struct. Comput. Sci. 29(1), 93–126 (2019)

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  26. Kesner, D., Vial, P.: Non-idempotent types for classical calculi in natural deduction style. Log. Methods Comput. Sci. 16(1) (2020)

    Google Scholar 

  27. Kfoury, A.: A linearization of the lambda-calculus and consequences. J. Log. Comput. 10(3), 411–436 (2000)

    Article  MathSciNet  Google Scholar 

  28. Lafont, Y.: The linear abstract machine. Theor. Comput. Sci. 59, 157–180 (1988)

    Article  MathSciNet  Google Scholar 

  29. Lévy, J.-J.: Réductions correctes et optimales dans le lambda-calcul. Ph.D. thesis, Éditeur inconnu (1978)

    Google Scholar 

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

    Google Scholar 

  31. Mazza, D., Pellissier, L., Vial, P.: Polyadic approximations, fibrations and intersection types. Proc. ACM Program. Lang. 2(6), 1–28 (2018)

    Article  Google Scholar 

  32. van Raamsdonk, F., Severi, P., Sørensen, M.H., Xi, H.: Perpetual reductions in lambda-calculus. Inf. Comput. 149(2), 173–225 (1999)

    Article  Google Scholar 

  33. Walker, D.: Substructural type systems. In: Advanced Topics in Types and Programming Languages, chapter 1, pp. 3–43. MIT Press, Cambridge (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sandra Alves .

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

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)

Publish with us

Policies and ethics