Polymorphic Type Qualifiers

dc.contributor.authorEdward, Lee
dc.date.accessioned2025-10-21T14:31:58Z
dc.date.available2025-10-21T14:31:58Z
dc.date.issued2025-10-21
dc.date.submitted2025-10-10
dc.description.abstractType 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 start by examining three well-known qualifier systems: systems for tracking immutability, function colour, and captured variables, and show that despite their differences that they share surprising common structure. We then give a design recipe, inspired by that structure, using the mathematical structure of free lattices for modelling polymorphism over type qualifiers, to give a framework for polymorphic type qualifiers. We then show that our design recipe precisely captures this structure by recasting those three existing systems in our framework for qualifier polymorphism by free lattices. Finally, we extend type qualifiers from ranging over lattices to type qualifiers ranging over Boolean algebras, which we then use to extend an existing effect system with effect exclusion to support subeffecting as well via subqualification and subtyping.en
dc.identifier.urihttps://hdl.handle.net/10012/22599
dc.language.isoen
dc.pendingfalse
dc.publisherUniversity of Waterlooen
dc.relation.urihttps://github.com/e45lee/phd-thesis-proofs
dc.subjectSystem F
dc.subjectprogramming languages
dc.subjecttype qualifiers
dc.titlePolymorphic Type Qualifiers
dc.typeDoctoral Thesis
uws-etd.degreeDoctor of Philosophy
uws-etd.degree.departmentDavid R. Cheriton School of Computer Science
uws-etd.degree.disciplineComputer Science
uws-etd.degree.grantorUniversity of Waterlooen
uws-etd.embargo.terms0
uws.contributor.advisorLhoták, Ondřej
uws.contributor.affiliation1Faculty of Mathematics
uws.peerReviewStatusUnrevieweden
uws.published.cityWaterlooen
uws.published.countryCanadaen
uws.published.provinceOntarioen
uws.scholarLevelGraduateen
uws.typeOfResourceTexten

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Lee_Edward.pdf
Size:
912.75 KB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
6.4 KB
Format:
Item-specific license agreed upon to submission
Description: