skip to main content
research-article
Open Access

Principality and approximation under dimensional bound

Published:02 January 2019Publication History
Skip Abstract Section

Abstract

We develop an algebraic and algorithmic theory of principality for the recently introduced framework of intersection type calculi with dimensional bound. The theory enables inference of principal type information under dimensional bound, it provides an algebraic and algorithmic theory of approximation of classical principal types in terms of computable bases of abstract vector spaces (more precisely, semimodules), and it shows a systematic connection of dimensional calculi to the theory of approximants. Finite, computable bases are shown to span standard principal typings of a given term for sufficiently high dimension, thereby providing an approximation to standard principality by type inference, and capturing it precisely for sufficiently large dimensional parameter. Subsidiary results include decidability of principal inhabitation for intersection types (given a type does there exist a normal form for which the type is principal?). Remarkably, combining bounded type inference with principal inhabitation allows us to compute approximate normal forms of arbitrary terms without using beta-reduction.

Skip Supplemental Material Section

Supplemental Material

a8-dudenhefner.webm

webm

77.1 MB

References

  1. João Alpuim, Bruno C. d. S. Oliveira, and Zhiyuan Shi. 2017. Disjoint Polymorphism. In Programming Languages and Systems -26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings. 1–28.Google ScholarGoogle Scholar
  2. Michael Artin. 2011. Algebra (2nd edition). Pearson Education.Google ScholarGoogle Scholar
  3. Henk P. Barendregt. 1984. The Lambda Calculus. Its Syntax and Semantics. Studies in Logic and the Foundations of Mathematics, 2nd Edition. Elsevier Science Publishers.Google ScholarGoogle Scholar
  4. Henk P. Barendregt, Mario Coppo, and Mariangiola Dezani-Ciancaglini. 1983. A Filter Lambda Model and the Completeness of Type Assignment. Journal of Symbolic Logic 48, 4 (1983), 931–940.Google ScholarGoogle ScholarCross RefCross Ref
  5. Henk P. Barendregt, Wil Dekkers, and Richard Statman. 2013. Lambda Calculus with Types. Perspectives in Logic, Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Gérard Boudol. 2008. On strong normalization and type inference in the intersection type discipline. Theor. Comput. Sci. 398, 1-3 (2008), 63–81. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Sébastien Carlier and Joe B. Wells. 2005. Expansion: the Crucial Mechanism for Type Inference with Intersection Types: A Survey and Explanation. Electr. Notes Theor. Comput. Sci. 136 (2005), 173–202. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Sébastien Carlier and Joe B. Wells. 2012. The Algebra of Expansion. Fundam. Inform. 121, 1-4 (2012), 43–82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Mario Coppo and Mariangiola Dezani-Ciancaglini. 1980. An Extension of Basic Functionality Theory for Lambda-Calculus. Notre Dame Journal of Formal Logic 21 (1980), 685–693.Google ScholarGoogle ScholarCross RefCross Ref
  10. Mario Coppo, Mariangiola Dezani-Ciancaglini, and Patrick Sallé. 1979. Functional characterization of some semantic equalities inside λ-calculus. In ICALP International Colloquium on Automata, Languages, and Programming. Springer LNCS 71. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Mario Coppo, Mariangiola Dezani-Ciancaglini, and Betti Venneri. 1980. Principal Type Schemes and λ-Calculus Semantics. In R. Hindley and J. Seldin (Eds.), To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism. Accademic Press, London, 480–490.Google ScholarGoogle Scholar
  12. Mario Coppo, Mariangiola Dezani-Ciancaglini, and Betti Venneri. 1981. Functional Characters of Solvable Terms. Zeitschrift für mathematische Logik und Grundlagen der Mathematik (1981), 45–58.Google ScholarGoogle Scholar
  13. Mario Coppo and Paola Giannini. 1995. Principal Types and Unification for a Simple Intersection Type System. Inf. Comput. 122, 1 (1995), 70–96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Boris Düdder, Moritz Martens, and Jakob Rehof. 2013. Intersection Type Matching with Subtyping. In Typed Lambda Calculi and Applications, 11th International Conference, TLCA 2013, Eindhoven, The Netherlands, June 26-28, 2013. Proceedings. 125–139.Google ScholarGoogle Scholar
  15. Andrej Dudenhefner and Jakob Rehof. 2017a. The Complexity of Principal Inhabitation. In 2nd International Conference on Formal Structures for Computation and Deduction, FSCD 2017, September 3-9, 2017, Oxford, UK. 15:1–15:14.Google ScholarGoogle Scholar
  16. Andrej Dudenhefner and Jakob Rehof. 2017b. Intersection type calculi of bounded dimension. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017. 653–665. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Andrej Dudenhefner and Jakob Rehof. 2017c. Typability in bounded dimension. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017. 1–12.Google ScholarGoogle ScholarCross RefCross Ref
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. Jonathan S. Golan. 1999. Semirings and their Applications. Springer.Google ScholarGoogle Scholar
  20. Hans Hüttel, Ivan Lanese, Vasco T. Vasconcelos, Luís Caires, Marco Carbone, Pierre-Malo Deniélou, Dimitris Mostrous, Luca Padovani, António Ravara, Emilio Tuosto, Hugo Torres Vieira, and Gianluigi Zavattaro. 2016. Foundations of Session Types and Behavioural Contracts. Comput. Surveys 49, 1, Article 3 (April 2016), 36 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Assaf J. Kfoury, Harry G. Mairson, Franklyn A. Turbak, and J. B. Wells. 1999. Relating Typability and Expressiveness in Finite-Rank Intersection Type Systems (Extended Abstract). In Proceedings of the fourth ACM SIGPLAN International Conference on Functional Programming (ICFP ’99), Paris, France, September 27-29, 1999., Didier Rémi and Peter Lee (Eds.). ACM, 90–101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Assaf J. Kfoury and Joe B. Wells. 1999. Principality and Decidable Type Inference for Finite-Rank Intersection Types. In POPL 1999, Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, TX, USA, January 20-22, 1999. 161–174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Assaf J. Kfoury and Joe B. Wells. 2004. Principality and type inference for intersection types using expansion variables. Theor. Comput. Sci. 311, 1-3 (2004), 1–70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Toshihiko Kurata and Masako Takahashi. 1995. Decidable properties of intersection type systems. In TLCA 1995, Proceedings of Typed Lambda Calculus and Applications (LNCS), Vol. 902. Springer, 297–311. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Daniel Leivant. 1983. Polymorphic Type Inference. In POPL 1983, Proceedings of the 10th ACM Symposium on Principles of Programming Languages. 88–98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Luigi Liquori and Claude Stolze. 2018. The Delta-calculus: syntax and types. CoRR abs/1803.09660 (2018). arXiv: 1803.09660 http://arxiv.org/abs/1803.09660Google ScholarGoogle Scholar
  27. Conor McBride. 2016. I Got Plenty o’ Nuttin’. In A List of Successes That Can Change the World - Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday. 207–233.Google ScholarGoogle Scholar
  28. Grigory E. Mints. 1981. Closed categories and the theory of proofs. Journal of Soviet Mathematics 15, 1 (1981), 45–62.Google ScholarGoogle ScholarCross RefCross Ref
  29. Peter Møller Neergaard and Harry G. Mairson. 2004. Types, potency, and idempotency: why nonlinearity and amnesia make a type system work. In Proceedings of the Ninth ACM SIGPLAN International Conference on Functional Programming, ICFP 2004, Snow Bird, UT, USA, September 19-21, 2004. 138–149. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Garrel Pottinger. 1980. A Type Assignment for the Strongly Normalizable Lambda-Terms. In To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, J. Hindley and J. Seldin (Eds.). Academic Press, 561–577.Google ScholarGoogle Scholar
  31. Jakob Rehof and Paweł Urzyczyn. 2012. The Complexity of Inhabitation with Explicit Intersection. In Logic and Program Semantics - Essays Dedicated to Dexter Kozen on the Occasion of His 60th Birthday (LNCS), Robert L. Constable and Alexandra Silva (Eds.), Vol. 7230. Springer, 256–270. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. John C. Reynolds. 1996. Design of the Programming Language Forsythe. Technical Report CMU-CS-96-146. CMU.Google ScholarGoogle Scholar
  33. Simona Ronchi Della Rocca. 1988. Principal Type Scheme and Unification for Intersection Type Discipline. Theor. Comput. Sci. 59 (1988), 181–209. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Simona Ronchi Della Rocca and Betti Venneri. 1984. Principal Type Schemes for an Extended Type Theory. Theor. Comput. Sci. 28 (1984), 151–169.Google ScholarGoogle ScholarCross RefCross Ref
  35. Takeshi Tsukada and C.-H. Luke Ong. 2016. Plays as Resource Terms via Non-idempotent Intersection Types. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’16, New York, NY, USA, July 5-8, 2016. 237–246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Paweł Urzyczyn. 1999. The Emptiness Problem for Intersection Types. Journal of Symbolic Logic 64, 3 (1999), 1195–1215.Google ScholarGoogle ScholarCross RefCross Ref
  37. Steffen van Bakel. 1993. Principal Type Schemes for the Strict Type Assignment System. J. Log. Comput. 3, 6 (1993), 643–670.Google ScholarGoogle ScholarCross RefCross Ref
  38. Steffen van Bakel. 2011. Strict Intersection Types for the Lambda Calculus. Comput. Surveys 43, 3 (2011). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Principality and approximation under dimensional bound

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Article Metrics

      • Downloads (Last 12 months)54
      • Downloads (Last 6 weeks)7

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader