Please note: This PhD defence will take place in DC 2314.
Edward Lee, PhD candidate
David R. Cheriton School of Computer Science
Supervisor: Professor Ondřej Lhoták
Type qualifiers offer a simple yet effective mechanism for extending existing type systems to deal with additional constraints or safety requirements. For example, the const qualifier is a popular mechanism for annotating existing types to signify that the value in question is read-only in addition. A variable of type const int is both an integer and also cannot be written to.
While type qualifiers themselves are well-studied, polymorphism over type qualifiers remains an area less well examined. This has led to a number of ill-desired outcomes. For one, many practical systems implementing type qualifiers in their type systems simply ignore their interaction with generic types. Other systems implement polymorphism with seemingly unique and ad-hoc rules for dealing with qualifiers. In this thesis, we show that this does not need to be the case. We give a design recipe, using the mathematical structure of free lattices for modelling polymorphism over type qualifiers, and show that our design recipe can be easily used to model the interaction between polymorphism and three existing qualifier systems — for tracking immutability, colour, and captured variables. We also show that many existing ad-hoc systems can be simply recast and presented using combinations of rules derived from our free-lattice based framework for polymorphic type qualifiers.