An Alternative to Pattern Matching, Inspired by Verse

April 30, 2024
1:30pm
Cummings 402
Speaker: Roger Burtonpatel - Senior Thesis
Host: Norman Ramsey, Milod Kazerounian

Abstract

Senior thesis:

Pattern matching appeals to functional programmers for its expressiveness and good cost model via compilation to a decision tree, but certain computations can only be expressed verbosely using pattern matching primitives. The problem can be solved by extensions, but these are not standardized, and no single popular programming language contains all the extensions to pattern matching. By contrast, equations in Verse are both expressive and succinct, with no obvious need for extensions; however, Verse’s cost model is a challenge. To resolve these problems, I propose a new language, 𝑉 βˆ’, which uses Verse’s equations with some restrictions. I show that 𝑉 – subsumes 𝑃+, a core language with three popular extensions to pattern matching. I also show that 𝑉 βˆ’ can be compiled to a decision tree.

Research areas: Programming Languages, compilers, language implementation.