Type systems evolve too slowly to keep up with the quick evolution of libraries—especially those that introduce new abstractions. Type tailoring offers a lightweight solution: equip the core language with an API for modifying the elaboration of surface code into the internal language of the typechecker. Tailoring rules can improve both the precision and the expressiveness of type analysis by fine-tuning the elaboration step. Furthermore, these rules cooperate with the host type system by expanding to typechecked code. In the context of a hygienic metaprogramming system, tailoring rules can even compose with one another to create a seamless interface for downstream clients.
Type tailoring has emerged as a theme across several languages and metaprogramming systems, but never with direct support and rarely in the same shape twice. Both OCaml and Racket enable forms of tailoring, for example, but in different ways. This paper identifies key dimensions of type tailoring systems and illustrates the tradeoffs along each dimension. It demonstrates the usefulness of tailoring with examples that cover sized vectors, database queries, and optional types. Finally, it outlines a vision for future research in type metaprogramming.
Tue 17 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
15:30 - 17:00 | |||
15:30 15mTalk | InferType: A Compiler Toolkit for Implementing Efficient Constraint-Based Type Inference Technical Papers Senxi Li The University of Tokyo, Tetsuro Yamazaki University of Tokyo, Shigeru Chiba University of Tokyo | ||
15:45 15mTalk | A Sound Type System for Secure Currency Flow Technical Papers Luca Aceto Reykjavik University, Daniele Gorla Department of Computer Science, Sapienza University of Rome, Stian Lybech Reykjavik University | ||
16:00 15mTalk | Type Tailoring Technical Papers Ashton Wiersdorf University of Utah, Stephen Chang University of Massachusetts Boston, Matthias Felleisen Northeastern University, Ben Greenman University of Utah | ||
16:15 15mTalk | Learning Gradual Typing Performance Technical Papers Mohammad Wahiduzzaman Khan UL Lafayette, Sheng Chen University of Louisiana at Lafayette, Yi He Old Dominion University | ||
16:30 15mTalk | Generalizing Shape Analysis with Gradual Types Technical Papers Zeina Migeed University of California, Los Angeles, James Reed Fireworks AI, Jason Ansel Meta, Jens Palsberg University of California, Los Angeles (UCLA) |