Lukas Convent

Geeky Projects and Writings.

Enhancing a Modular Effectful Programming Language

Supervisor: Dr. Sam Lindley

Abstract

The focus of this thesis lies on several enhancements to Frank, a programming language that supports algebraic effects and effect handlers as core features. Effects serve as interfaces between command-requesting and command-handling components, thereby offering the programmer a modular and powerful means of abstraction.

We improve the expressiveness of commands by making them polymorphic. Together with an extension of ML-style references, we can demonstrate the gained potential by implementing two concurrency models (actors, promises) within Frank.

A prominent feature of Frank is the ambient ability which allows convenient composition of effect generators and effect handlers. We discuss different scenarios of composition and identify a problem with intermediate effects that are unintentionally exposed. We solve part of the problem and discuss how to solve the more general scenario.

Another prominent feature of Frank are multihandlers that allow handling of multiple effects simultaneously. A dynamic semantics of this setting has been given so far via a translation to a setting of unary handlers. We give an operational small-step semantics that is more direct and closer to the actual implementation. Furthermore, we prove type soundness of the enhanced Frank version.

Thesis

  • Thesis (submitted August 18, 2017)

Frank Compiler