Typed Clojure in Theory and Practice

dc.contributor.advisorTobin-Hochstadt, Sam
dc.contributor.authorBonnaire-Sergeant, Ambrose
dc.date.accessioned2019-06-27T14:46:33Z
dc.date.available2019-06-27T14:46:33Z
dc.date.issued2019-06
dc.descriptionThesis (Ph.D.) - Indiana University, Informatics, Computing, and Engineering/University Graduate School, 2019en
dc.description.abstractTyped Clojure is an optional type system for the Clojure programming language that aims to type check idiomatic Clojure code. This dissertation presents the design of Typed Clojure, formalizes Typed Clojure’s underlying theory, studies its effectiveness in real-world code bases, and proposes several extensions to help address its shortcomings. I develop a formal model of Typed Clojure that includes key features like hash-maps, multimethods, Java interoperability, and occurrence typing, and prove the model type sound. Then, I demonstrate that Typed Clojure’s design is useful and corresponds to actual usage patterns with an empirical study of real-world Typed Clojure usage in over 19,000 lines of code. This experience also revealed several usability shortcomings in Typed Clojure. First, the top-level annotation burden needed to port untyped code is prohibitively high. We present an automatic annotator for Typed Clojure to ease this burden, using runtime observations to synthesize heterogeneous, recursive type annotations. We evaluate our experience using the annotator by porting several open-source projects. Second, pre-expanding macros before type checking makes type checking brittle. We describe and implement a new analyzer for Clojure code that can provide the foundation of an alternative approach where the user provides custom type rules for macros. Third, too many local functions require annotations. We present a hybrid approach of symbolic execution and type checking that helps check some common higher-order Clojure idioms.en
dc.identifier.urihttps://hdl.handle.net/2022/23207
dc.language.isoenen
dc.publisher[Bloomington, Ind.] : Indiana Universityen
dc.subjectAutomatic annotationsen
dc.subjectClojureen
dc.subjectOptional type systemsen
dc.subjectSymbolic executionen
dc.titleTyped Clojure in Theory and Practiceen
dc.typeDoctoral Dissertationen

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Bonnaire-Sergeant_dissertation_2019.pdf
Size:
1.05 MB
Format:
Adobe Portable Document Format
Description:
If you need an accessible version of this item, please email your request to iusw@iu.edu so that they may create one and provide it to you.