A Light Modality for Recursion

  • Paula Severi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10203)


We investigate a modality for controlling the behaviour of recursive functional programs on infinite structures which is completely silent in the syntax. The latter means that programs do not contain “marks” showing the application of the introduction and elimination rules for the modality. This shifts the burden of controlling recursion from the programmer to the compiler.

To do this, we introduce a typed lambda calculus à la Curry with a silent modality and guarded recursive types. The typing discipline guarantees normalisation and can be transformed into an algorithm which infers the type of a program.


  1. 1.
    Atkey, R., McBride, C.: Productive coprogramming with guarded recursion. In: Morrisett, G., Uustalu, T. (eds.) Proceedings of ICFP 2013, pp. 197–208. ACM (2013)Google Scholar
  2. 2.
    Birkedal, L., Møgelberg, R.E., Schwinghammer, J., Støvring, K.: First steps in synthetic guarded domain theory: step-indexing in the topos of trees. Log. Methods Comput. Sci. 8(4), 1–45 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Bizjak, A., Grathwohl, H.B., Clouston, R., Møgelberg, R.E., Birkedal, L.: Guarded dependent type theory with coinductive types. In: Jacobs, B., Löding, C. (eds.) FoSSaCS 2016. LNCS, vol. 9634, pp. 20–35. Springer, Heidelberg (2016). doi: 10.1007/978-3-662-49630-5_2 CrossRefGoogle Scholar
  4. 4.
    Cardone, F., Coppo, M.: Type inference with recursive types: Syntax and semantics. Inf. Comput. 92(1), 48–80 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Cardone, F., Coppo, M.: Recursive types. In: Barendregt, H., Dekkers, W., Statman, R. (eds.) Lambda Calculus with Types, Perspectives in Logic, pp. 377–576. Cambridge (2013)Google Scholar
  6. 6.
    Cave, A., Ferreira, F., Panangaden, P., Pientka, B.: Fair reactive programming. In: Jagannathan, S., Sewell, P. (eds.) Proceedings of POPL 2014, pp. 361–372. ACM Press (2014)Google Scholar
  7. 7.
    Clouston, R., Bizjak, A., Grathwohl, H.B., Birkedal, L.: Programming and reasoning with guarded recursion for coinductive types. In: Pitts, A. (ed.) FoSSaCS 2015. LNCS, vol. 9034, pp. 407–421. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-46678-0_26 CrossRefGoogle Scholar
  8. 8.
    Coquand, T.: Infinite objects in type theory. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, pp. 62–78. Springer, Heidelberg (1994). doi: 10.1007/3-540-58085-9_72 CrossRefGoogle Scholar
  9. 9.
    Courcelle, B.: Fundamental properties of infinite trees. Theoret. Comput. Sci. 25, 95–169 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Gapeyev, V., Levin, M.Y., Pierce, B.C.: Recursive subtyping revealed. J. Funct. Program. 12(6), 511–548 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Giménez, E., Casterán, P.: A tutorial on [co-]inductive types in coq. Technical report, Inria (1998)Google Scholar
  12. 12.
    Hughes, J.: Why functional programming matters. Comput. J. 32(2), 98–107 (1989)CrossRefGoogle Scholar
  13. 13.
    Hughes, J., Pareto, L., Sabry, A.: Proving the correctness of reactive systems using sized types. In: Proceedings of POPL 1996, pp. 410–423 (1996)Google Scholar
  14. 14.
    Jones, C. (ed.): Programming Languages and Their Definition - Hans Bekic (1936–1982). LNCS, vol. 177. Springer, Heidelberg (1984)Google Scholar
  15. 15.
    Krishnaswami, N.R., Benton, N.: Ultrametric semantics of reactive programs. In: Grohe, M. (ed.) Proceedings of LICS 2011, pp. 257–266. IEEE (2011)Google Scholar
  16. 16.
    Krishnaswami, N.R., Benton, N., Hoffmann, J.: Higher-order functional reactive programming in bounded space. In: Proceedings of POPL 2012, pp. 45–58. ACM Press (2012)Google Scholar
  17. 17.
    Nakano, H.: A modality for recursion. In: Abadi M. (ed.) Proceedings of LICS 2000, pp. 255–266. IEEE (2000)Google Scholar
  18. 18.
    Papadimitriou, C.H., Steiglitz, K.: Combinatorial Optimization: Algorithms and Complexity. Dover Publications, Mineola (1998)zbMATHGoogle Scholar
  19. 19.
    Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)zbMATHGoogle Scholar
  20. 20.
    Pottier, F., Rémy, D.: The essence of ML type inference. In: Pierce, B.C. (ed.) Advanced Topics in Types and Programming Languages, pp. 389–489. MIT Press (2005)Google Scholar
  21. 21.
    Rowe, R.N.S.: Semantic Types for Class-based Objects. Ph.D. thesis, Imperial College London (2012)Google Scholar
  22. 22.
    Sacchini, J.L.: Type-based productivity of stream definitions in the calculus of constructions. In: Procedings of LICS 2013, pp. 233–242 (2013)Google Scholar
  23. 23.
    Severi, P., de Vries, F.-J.: Pure type systems with corecursion on streams: from finite to infinitary normalisation. In: Thiemann, P., Findler, R.B. (eds.) Proceedings of ICFP 2012, pp. 141–152. ACM Press (2012)Google Scholar
  24. 24.
    Severi, P., Padovani, L., Tuosto, E., Dezani-Ciancaglini, M.: On sessions and infinite data. In: Lluch Lafuente, A., Proença, J. (eds.) COORDINATION 2016. LNCS, vol. 9686, pp. 245–261. Springer, Cham (2016). doi: 10.1007/978-3-319-39519-7_15 Google Scholar
  25. 25.
    Severi, P., Padovani, L., Tuosto, E., Dezani-Ciancaglini, M.: On sessions and infinite data. CoRR, abs/1610.06362 (2016)Google Scholar
  26. 26.
    Svendsen, K., Birkedal, L.: Impredicative concurrent abstract predicates. In: Shao, Z. (ed.) ESOP 2014. LNCS, vol. 8410, pp. 149–168. Springer, Heidelberg (2014). doi: 10.1007/978-3-642-54833-8_9 CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  • Paula Severi
    • 1
  1. 1.Department of InformaticsUniversity of LeicesterLeicesterUK

Personalised recommendations