{"id":18014650,"url":"https://github.com/dhil/phd-dissertation","last_synced_at":"2026-02-01T22:02:41.680Z","repository":{"id":76216548,"uuid":"139345791","full_name":"dhil/phd-dissertation","owner":"dhil","description":"A summary of my activities during the past four years","archived":false,"fork":false,"pushed_at":"2024-10-11T13:45:38.000Z","size":6306,"stargazers_count":29,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-23T12:43:32.116Z","etag":null,"topics":["abstract-machines","algebraic-effects","computational-effects","continuation-passing-style","continuations","control-effects","effect-handler-oriented-programming","effect-handlers","expressiveness","expressivity","functional-programming","phd-dissertation","phd-thesis","research","unix"],"latest_commit_sha":null,"homepage":"https://dhil.net","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-01T16:49:08.000Z","updated_at":"2025-06-21T16:51:08.000Z","dependencies_parsed_at":"2024-02-26T09:50:54.712Z","dependency_job_id":"e781b2b8-a219-4b89-8072-8f35665448c6","html_url":"https://github.com/dhil/phd-dissertation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dhil/phd-dissertation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhil%2Fphd-dissertation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhil%2Fphd-dissertation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhil%2Fphd-dissertation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhil%2Fphd-dissertation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhil","download_url":"https://codeload.github.com/dhil/phd-dissertation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhil%2Fphd-dissertation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28992652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abstract-machines","algebraic-effects","computational-effects","continuation-passing-style","continuations","control-effects","effect-handler-oriented-programming","effect-handlers","expressiveness","expressivity","functional-programming","phd-dissertation","phd-thesis","research","unix"],"created_at":"2024-10-30T04:10:33.935Z","updated_at":"2026-02-01T22:02:41.659Z","avatar_url":"https://github.com/dhil.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foundations for programming and implementing effect handlers\n\nA copy of my dissertation can be [downloaded via my\nwebsite](https://dhil.net/research/papers/thesis.pdf).\n\n----\n\nSubmitted on May 30, 2021. Examined on August 13, 2021.\n\nThe board of examiners were\n\n* [Andrew Kennedy](https://github.com/andrewjkennedy) (Facebook London)\n* [Edwin Brady](https://www.type-driven.org.uk/edwinb/) (University of St Andrews)\n* [Ohad Kammar](http://denotational.co.uk/) (The University of Edinburgh)\n* [Stephen Gilmore](https://homepages.inf.ed.ac.uk/stg/) (The University of Edinburgh)\n\n## Thesis structure\n\nThe dissertation is structured as follows.\n\n### Introduction\n\n * Chapter 1 puts forth an argument for why effect handlers\n   matter. Following this argument it provides a basic introduction to\n   several different approaches to effectful programming through the\n   lens of the state effect. In addition, it also declares the scope\n   and contributions of the dissertation, and discusses some related\n   work.\n\n### Programming\n\n * Chapter 2 illustrates effect handler oriented programming by\n   example by implementing a small operating system dubbed Tiny UNIX,\n   which captures some essential traits of Ritchie and Thompson's\n   UNIX. The implementation starts with a basic notion of file i/o,\n   and then, it evolves into a feature-rich operating system with full\n   file i/o, multiple user environments, multi-tasking, and more, by\n   composing ever more effect handlers.\n\n * Chapter 3 introduces a polymorphic fine-grain call-by-value core\n   calculus, λ\u003csub\u003eb\u003c/sub\u003e, which makes key use of Rémy-style row\n   polymorphism to implement polymorphic variants, structural records,\n   and a structural effect system. The calculus distils the essence of\n   the core of the Links programming language. The chapter also\n   presents three extensions of λ\u003csub\u003eb\u003c/sub\u003e, which are λ\u003csub\u003eh\u003c/sub\u003e\n   that adds deep handlers, λ\u003csup\u003e†\u003c/sup\u003e that adds shallow handlers,\n   and λ\u003csup\u003e‡\u003c/sup\u003e that adds parameterised handlers.\n\n### Implementation\n\n * Chapter 4 develops a higher-order continuation passing style\n   translation for effect handlers through a series of step-wise\n   refinements of an initial standard continuation passing style\n   translation for λ\u003csub\u003eb\u003c/sub\u003e. Each refinement slightly modifies\n   the notion of continuation employed by the translation. The\n   development ultimately leads to the key invention of generalised\n   continuation, which is used to give a continuation passing style\n   semantics to deep, shallow, and parameterised handlers.\n\n * Chapter 5 demonstrates an application of generalised continuations\n   to abstract machine as we plug generalised continuations into\n   Felleisen and Friedman's CEK machine to obtain an adequate abstract\n   runtime with simultaneous support for deep, shallow, and\n   parameterised handlers.\n\n### Expressiveness\n\n * Chapter 6 shows that deep, shallow, and parameterised notions of\n   handlers can simulate one another up to specific notions of\n   administrative reduction.\n\n * Chapter 7 studies the fundamental efficiency of effect handlers. In\n   this chapter, we show that effect handlers enable an asymptotic\n   improvement in runtime complexity for a certain class of\n   functions. Specifically, we consider the *generic count* problem\n   using a pure PCF-like base language λ\u003csub\u003eb\u003c/sub\u003e\u003csup\u003e→\u003c/sup\u003e (a\n   simply typed variation of λ\u003csub\u003eb\u003c/sub\u003e) and its extension with\n   effect handlers λ\u003csub\u003eh\u003c/sub\u003e\u003csup\u003e→\u003c/sup\u003e.  We show that\n   λ\u003csub\u003eh\u003c/sub\u003e\u003csup\u003e→\u003c/sup\u003e admits an asymptotically more efficient\n   implementation of generic count than any λ\u003csub\u003eb\u003c/sub\u003e\u003csup\u003e→\u003c/sup\u003e\n   implementation.\n\n### Conclusions\n  * Chapter 8 concludes and discusses future work.\n\n### Appendices\n\n * Appendix A contains a literature survey of continuations and\n   first-class control. I classify continuations according to their\n   operational behaviour and provide an overview of the various\n   first-class sequential control operators that appear in the\n   literature. The application spectrum of continuations is discussed\n   as well as implementation strategies for first-class control.\n * Appendix B contains a proof that shows the `Get-get` equation for\n   state is redundant.\n * Appendix C contains the proof details and gadgetry for the\n   complexity of the effectful generic count program.\n * Appendix D provides a sample implementation of the Berger count\n   program and discusses it in more detail.\n\n## Building\n\nTo build the dissertation you need the [Informatics thesis LaTeX\nclass](https://github.com/dhil/inf-thesis-latex-cls) with the\nUniversity of Edinburgh crests. Invoking `make` on the command line\nought to produce a PDF copy of the dissertation named `thesis.pdf`,\ne.g.\n\n```shell\n$ make\n```\n\n## Timeline\n\nI submitted my thesis on May 30, 2021. It was examined on August 13,\n2021, where I received pass with minor corrections. The revised thesis\nwas submitted on December 22, 2021. It was approved on March\n14, 2022. The final revision was submitted on March 23, 2022. I\nreceived my PhD award letter on March 24, 2022. My graduation \nceremony took place in McEwan Hall on July 11, 2022.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhil%2Fphd-dissertation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhil%2Fphd-dissertation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhil%2Fphd-dissertation/lists"}