skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Reusable

Decidable subtyping for path dependent types

Published:20 December 2019Publication History
Skip Abstract Section

Abstract

Path dependent types have long served as an expressive component of the Scala programming language. They allow for the modelling of both bounded polymorphism and a degree of nominal subtyping. Nominality in turn provides the ability to capture first class modules. Thus a single language feature gives rise to a rich array of expressiveness. Recent work has proven path dependent types sound in the presence of both intersection and recursive types, but unfortunately typing remains undecidable, posing problems for programmers who rely on the results of type checkers. The Wyvern programming language is an object oriented language with path dependent types, recursive types and first class modules. In this paper we define two variants of Wyvern that feature decidable typing, along with machine checked proofs of decidability. Despite the restrictions, our approaches retain the ability to encode the parameteric polymorphism of Java generics along with many idioms of the Scala module system.

Skip Supplemental Material Section

Supplemental Material

a66-mackay.webm

References

  1. Nada Amin. 2016. Dependent Object Types. Ph.D. Dissertation. Lausanne.Google ScholarGoogle Scholar
  2. Nada Amin, Karl Samuel Grütter, Martin Odersky, Tiark Rompf, and Sandro Stucki. 2016. The Essence of Dependent Object Types. A List of Successes That Can Change the World: Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday (2016), 249–272.Google ScholarGoogle Scholar
  3. Nada Amin, Adriaan Moors, and Martin Odersky. 2012. Dependent object types. In 19th International Workshop on Foundations of Object-Oriented Languages.Google ScholarGoogle Scholar
  4. Nada Amin, Tiark Rompf, and Martin Odersky. 2014. Foundations of Path-dependent Types. In OOPSLA ’14.Google ScholarGoogle Scholar
  5. Edoardo Biagioni, Robert Harper, and Peter Lee. 2001. A Network Protocol Stack in Standard ML. Higher-Order and Symbolic Computation (2001).Google ScholarGoogle Scholar
  6. Luca Cardelli and Peter Wegner. 1985. On Understanding Types, Data Abstraction, and Polymorphism. ACM Comput. Surv. 17, 4 (1985), 471–523.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Giuseppe Castagna and Benjamin C. Pierce. 1994. Decidable Bounded Quantification. In POPL ’94.Google ScholarGoogle Scholar
  8. William R. Cook. 2009. On Understanding Data Abstraction, Revisited. In OOPSLA ’09.Google ScholarGoogle Scholar
  9. Erik Ernst. 2001. Family Polymorphism. In Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP ’01).Google ScholarGoogle Scholar
  10. Ben Greenman, Fabian Muehlboeck, and Ross Tate. 2014. Getting F-bounded Polymorphism into Shape. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14).Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Radu Grigore. 2017. Java Generics Are Turing Complete. In POPL 2017.Google ScholarGoogle Scholar
  12. Robert Harper. 2012. Practical Foundations for Programming Languages. Cambridge University Press, New York, NY, USA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jason Hu and Ondřej Lhoták. 2020. Undecidability of D < : and its Decidable Fragments. In POPL 2020.Google ScholarGoogle Scholar
  14. Atsushi Igarashi and Benjamin C. Pierce. 2002. Foundations for Virtual Types. Information and Computation 175, 1 (2002), 34 – 49.Google ScholarGoogle ScholarCross RefCross Ref
  15. Bent Kristensen, Ole Madsen, Birger Møller-Pedersen, and Kristen Nygaard. 1987. The BETA Programming Language. DAIMI Report Series 16, 229 (1987).Google ScholarGoogle Scholar
  16. O. L. Madsen and B. Moller-Pedersen. 1989. Virtual Classes: A Powerful Mechanism in Object-oriented Programming. In OOPSLA ’89.Google ScholarGoogle Scholar
  17. Darya Melicher, Yangqingwei Shi, Alex Potanin, and Jonathan Aldrich. 2017. A Capability-Based Module System for Authority Control. In 31st European Conference on Object-Oriented Programming (ECOOP 2017).Google ScholarGoogle Scholar
  18. Robin Milner, Robert Harper, David MacQueen, and Mads Tofte. 1997. The Definition of Standard ML, Revised Edition. MIT Press.Google ScholarGoogle Scholar
  19. Fabian Muehlboeck and Ross Tate. 2018. Empowering Union and Intersection Types with Integrated Subtyping. In OOPSLA 2018.Google ScholarGoogle Scholar
  20. Abel Nieto. 2017. Towards Algorithmic Typing for DOT (Short Paper). In Proc. SCALA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Ligia Nistor, Darya Kurilova, Stephanie Balzer, Benjamin Chung, Alex Potanin, and Jonathan Aldrich. 2013. Wyvern: A simple, typed, and pure object-oriented language. In Proceedings of the 5th Workshop on MechAnisms for SPEcialization, Generalization and inHerItance. ACM, 9–16.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Martin Odersky, Philippe Altherr, Vincent Cremet, Burak Emir, Stphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, and Matthias Zenger. 2004. The Scala language specification.Google ScholarGoogle Scholar
  23. Martin Odersky and Matthias Zenger. 2005. Scalable Component Abstractions. In OOPSLA ’05.Google ScholarGoogle Scholar
  24. Cyrus Omar, Darya Kurilova, Ligia Nistor, Benjamin Chung, Alex Potanin, and Jonathan Aldrich. 2014. Safely Composable Type-Specific Languages. In ECOOP ’14.Google ScholarGoogle Scholar
  25. Benjamin C. Pierce. 1992. Bounded Quantification is Undecidable. In POPL ’92.Google ScholarGoogle Scholar
  26. Benjamin C. Pierce. 2002. Types and Programming Languages (1st ed.). The MIT Press.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Marianna Rapoport, Ifaz Kabir, Paul He, and Ondřej Lhoták. 2017. A Simple Soundness Proof for Dependent Object Types. In OOPSLA 2017.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. John C. Reynolds. 1974. Towards a Theory of Type Structure. In Programming Symposium, Proceedings Colloque Sur La Programmation.Google ScholarGoogle ScholarCross RefCross Ref
  29. Tiark Rompf and Nada Amin. 2016. Type Soundness for Dependent Object Types (DOT). In OOPSLA 2016.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Kresten Krab Thorup. 1997. Genericity in java with virtual types. In ECOOP’97 — Object-Oriented Programming, Mehmet Akşit and Satoshi Matsuoka (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 444–471.Google ScholarGoogle Scholar
  31. Mads Torgersen. 1998. Virtual types are statically safe. In 5th Workshop on Foundations of Object-Oriented Languages, Vol. 544. Citeseer, 1–9.Google ScholarGoogle Scholar
  32. Yu Xiang Zhu. 2019. Nominal Wyvern: Employing Semantic Separation for Usability. Master’s thesis. Carnegie Mellon University.Google ScholarGoogle Scholar

Index Terms

  1. Decidable subtyping for path dependent types

      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

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!