Abstract
Ad-hoc polymorphism is a type of polymorphism where different function definitions can be given the same name. Programming languages utilize constructs like Type classes and Object classes to provide a mechanism for implementing ad-hoc polymorphism. System O, by Odersky, Wadler, and Wehr is a language which defines a dynamic semantics that supports ad-hoc polymorphism. It also describes static type checking for its programs and a transformation to the Hindley/Milner system. In this study, we present extensions to System O by defining constructs that make the language more practical to use. We utilize the dynamic semantics to define the ability to express type classes. We define additional optimizations on the transform that aim to reduce redundant function calls at run-time and simplify the generated code. Finally, we implement an interpreter for this programming language in Clojure, and provide several examples of programs utilizing ad-hoc polymorphism with the constructs we have defined.
Library of Congress Subject Headings
Programming languages (Electronic computers); Functional programming (Computer science)
Publication Date
8-2022
Document Type
Thesis
Student Type
Graduate
Degree Name
Computer Science (MS)
Department, Program, or Center
Computer Science (GCCIS)
Advisor
Arthur Nunes-Harwitt
Advisor/Committee Member
Matthew Fluet
Advisor/Committee Member
James Heliotis
Recommended Citation
Khare, Apurav, "Revisiting Ad-hoc Polymorphism" (2022). Thesis. Rochester Institute of Technology. Accessed from
https://repository.rit.edu/theses/11290
Campus
RIT – Main Campus
Plan Codes
COMPSCI-MS