Abstract
Many languages are beginning to integrate dynamic and static typing. Siek and Taha offered gradual typing as an approach to this integration that provides a coherent and full-span migration between the two disciplines. However, the literature lacks a general methodology for designing gradually typed languages. Our first contribution is to provide a methodology for deriving the gradual type system and the compilation to the cast calculus. Based on this methodology, we present the Gradualizer, an algorithm that generates a gradual type system from a well-formed type system and also generates a compiler to the cast calculus. Our algorithm handles a large class of type systems and generates systems that are correct with respect to the formal criteria of gradual typing. We also report on an implementation of the Gradualizer that takes a type system expressed in lambda-prolog and outputs its gradually typed version and a compiler to the cast calculus in lambda-prolog.
- ReferencesGoogle Scholar
- M. Abadi and L. Cardelli. A Theory of Objects. Springer-Verlag, 1996. Google Scholar
Digital Library
- A. Ahmed, R. B. Findler, J. Matthews, and P. Wadler. Blame for all. In Workshop on Script to Program Evolution (STOP), July 2009. Google Scholar
Digital Library
- A. Ahmed, R. B. Findler, J. G. Siek, and P. Wadler. Blame for All. In Symposium on Principles of Programming Languages, January 2011. Google Scholar
Digital Library
- E. Allende, O. Calla´u, J. Fabry, É. Tanter, and M. Denker. Gradual typing for Smalltalk. Science of Computer Programming, Aug. 2013. Available online. Google Scholar
Digital Library
- G. Bierman, E. Meijer, and M. Torgersen. Adding dynamic types to C#. In European Conference on Object-Oriented Programming, ECOOP’10. Springer-Verlag, 2010. Google Scholar
Digital Library
- G. Bierman, M. Abadi, and M. Torgersen. Understanding TypeScript. In R. Jones, editor, ECOOP 2014 – Object-Oriented Programming, volume 8586 of Lecture Notes in Computer Science, pages 257–281. Springer Berlin Heidelberg, 2014.Google Scholar
Digital Library
- S. K. Debray and D. S. Warren. Automatic mode inference for logic programs. J. Log. Program., 5(3):207–229, Sept. 1988. ISSN 0743- 1066.. Google Scholar
Digital Library
- T. Disney and C. Flanagan. Gradual information flow typing. In Workshop on Script to Program Evolution, 2011.Google Scholar
- R. Garcia. Calculating threesomes, with blame. In ICFP ’13: Proceedings of the International Conference on Functional Programming, 2013. Google Scholar
Digital Library
- R. Garcia and M. Cimini. Principal type schemes for gradual programs. In Symposium on Principles of Programming Languages, POPL, pages 303–315, 2015.. Google Scholar
Digital Library
- R. Garcia, A. M. Clark, and É. Tanter. Abstracting gradual typing. In Proceedings of the 43rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, St Petersburg, FL, USA, January 20-22. ACM Press, 2016. Google Scholar
Digital Library
- A. Hejlsberg. Introducing TypeScript. Microsoft Channel 9 Blog, 2012.Google Scholar
- D. Herman, A. Tomb, and C. Flanagan. Space-efficient gradual typing. In Trends in Functional Prog. (TFP), page XXVIII, April 2007.Google Scholar
- D. Herman, A. Tomb, and C. Flanagan. Space-efficient gradual typing. Higher Order Symbol. Comput., 23(2):167–189, June 2010. ISSN 1388-3690. Google Scholar
Digital Library
- L. Ina and A. Igarashi. Gradual typing for generics. In Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications, OOPSLA ’11, 2011. Google Scholar
Digital Library
- D. Jacobs. A pragmatic view of types for logic programs. In F. Pfenning, editor, Types in Logic Programming, Logic programming, pages 217–227. MIT Press, 1992.Google Scholar
- E. Meijer and P. Drayton. Static typing where possible, dynamic typing when needed: The end of the cold war between programming languages. In OOPSLA’04 Workshop on Revival of Dynamic Languages, 2004.Google Scholar
- D. Miller and G. Nadathur. Programming with Higher-Order Logic. Cambridge University Press, New York, NY, USA, 1st edition, 2012. ISBN 052187940X, 9780521879408. Google Scholar
Digital Library
- B. C. Pierce. Types and Programming Languages. MIT Press, 2002. Google Scholar
Digital Library
- U. S. Reddy. A typed foundation for directional logic programming. In E. Lamma and P. Mello, editors, Third International Workshop on Extensions of logic programming, pages 150–167, Bologna, Italy, 1993. Springer-Verlag LNAI 660. Google Scholar
Digital Library
- J. Siek, M. Vitousek, M. Cimini, and J. Boyland. Refined Criteria for Gradual Typing. In Proceedings of the Inaugural Summit oN Advances in Programming Languages (SNAPL 2015), May 2015. To appear.Google Scholar
- J. G. Siek and W. Taha. Gradual typing for functional languages. In Scheme and Functional Programming Workshop, pages 81–92, September 2006.Google Scholar
- J. G. Siek and W. Taha. Gradual typing for objects. In European Conference on Object-Oriented Programming, volume 4609 of LCNS, pages 2–27, August 2007. Google Scholar
Digital Library
- J. G. Siek and M. Vachharajani. Gradual typing and unification-based inference. In DLS, 2008. Google Scholar
Digital Library
- J. G. Siek and P. Wadler. Threesomes, with and without blame. In Symposium on Principles of Programming Languages, POPL, pages 365–376, January 2010. Google Scholar
Digital Library
- J. G. Siek, R. Garcia, and W. Taha. Exploring the design space of higher-order casts. In European Symposium on Programming, ESOP, pages 17–31, March 2009. Google Scholar
Digital Library
- J. G. Siek, M. Vitousek, M. Cimini, S. Tobin-Hochstadt, and R. Garcia. Monotonic references for efficient gradual typing. In European Symposium on Programming, ESOP, 2015. To appear. Google Scholar
Digital Library
- J. G. Siek, M. M. Vitousek, M. Cimini, and J. T. Boyland. Refined criteria for gradual typing. In SNAPL: Summit on Advances in Programming Languages, LIPIcs: Leibniz International Proceedings in Informatics, May 2015.Google Scholar
- R. F. Stark. The declarative semantics of the prolog selection rule. In SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, pages 252– 261. IEEE Computer Society Press, 1994.Google Scholar
- A. Takikawa, T. S. Strickland, C. Dimoulas, S. Tobin-Hochstadt, and M. Felleisen. Gradual typing for first-class classes. In Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’12, pages 793–810, 2012. Google Scholar
Digital Library
- A. Takikawa, D. Feltey, E. Dean, M. Flatt, R. B. Findler, S. Tobin-Hochstadt, and M. Felleisen. Towards practical gradual typing. In European Conference on Object-Oriented Programming, LIPICS. Dagstuhl Publishing, 2015.Google Scholar
- T. D. Team. Dart Programming Language Specification. Google, 1.2 edition, March 2014.Google Scholar
- P. Thiemann. Session types with gradual typing. In International Symposium on Trustworthy Global Computing, 2014.Google Scholar
Cross Ref
- S. Tobin-Hochstadt and M. Felleisen. The design and implementation of Typed Scheme. In Symposium on Principles of Programming Languages, January 2008. Google Scholar
Digital Library
- S. Tobin-Hochstadt and M. Felleisen. Logical types for untyped languages. In International Conference on Functional Programming, ICFP, pages 117–128. ACM, 2010. Google Scholar
Digital Library
- M. M. Vitousek, J. G. Siek, A. Kent, and J. Baker. Design and evaluation of gradual typing for Python. In Dynamic Languages Symposium, 2014. Google Scholar
Digital Library
- P. Wadler and R. B. Findler. Well-typed programs can’t be blamed. In European Symposium on Programming, ESOP, pages 1–16, March 2009. Google Scholar
Digital Library
- R. Wolff, R. Garcia, E. Tanter, and J. Aldrich. Gradual typestate. In European Conference on Object-Oriented Programming, ECOOP’11. Springer-Verlag, 2011. Google Scholar
Digital Library
Index Terms
The gradualizer: a methodology and algorithm for generating gradual type systems
Recommendations
Gradual typing: a new perspective
We define a new, more semantic interpretation of gradual types and use it to ``gradualize'' two forms of polymorphism: subtyping polymorphism and implicit parametric polymorphism. In particular, we use the new interpretation to define three gradual type ...
The gradualizer: a methodology and algorithm for generating gradual type systems
POPL '16: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesMany languages are beginning to integrate dynamic and static typing. Siek and Taha offered gradual typing as an approach to this integration that provides a coherent and full-span migration between the two disciplines. However, the literature lacks a ...
Big types in little runtime: open-world soundness and collaborative blame for gradual type systems
POPL '17Gradual typing combines static and dynamic typing in the same language, offering programmers the error detection and strong guarantees of static types and the rapid prototyping and flexible programming idioms of dynamic types. Many gradually typed ...






Comments