A Language Server Protocol Extension for Effects and Handlers

Static type systems help to avoid programming errors by indicating to the programmer at compile time that a value potentially has a wrong type. This way, unsupported operations (such as dividing two strings or calling a method on a number) are ruled out before the program is executed.

Effect systems extend these guarantees and indicate to the programmer that a computation has potentially unexpected (side) effects, such as writing to the terminal, reading from a database, or throwing an exception. This way, unexpected side effects (such as uncaught exceptions) are ruled out before the program is executed. Additionally, programmers obtain new modes of reasoning about their programs. For instance, knowing that two computations are free of side-effects, we can safely run them in parallel without risking data races or deadlocks.

Languages with static type systems often leverage the types to offer tool support, for instance as part of an IDE. Knowing the type of an expression, it is possible to improve autocompletion, jump-to-definition, and many more features.

The Microsoft Language Server Protocol (LSP) provides a common interface with the goal to avoid having to reimplement every feature (such as jump-to-definition) for every language and every possible editor.

Your Task

The tooling support for effect systems is still largely unexplored. A few research and industrial languages with effect systems exist, but each language develops their own IDE support (if at all). As part of this thesis, you will design an extension to the LSP with the goal to support multiple languages with effect systems. It is your task to analyze a given set of programming languages for their commonalities and differences:

To understand the languages, you will write programs in these languages, read research papers, and talk to the language implementors.

Requirements

  • Interest in improving programmer productivity and tooling
  • Experience in functional programming and controlling side-effects
  • Ideally: background in programming languages (such as Programming Languages 1 and Programming Languages 2, as taught by Prof. Ostermann)

Benefits

  • You will learn many interesting, cutting edge programming languages
  • You will get to know the authors of these programming languages
  • Your work can have an actual impact on the future of effectful (functional) programming

Contact

Jonathan Brachthäuser