Modular Normalization with Types
Doctoral thesis, 2023
Viewed through the lens of current methods, normalization lacks the ability to be broken into sub-problems and solved independently, i.e., lacks modularity. To make matters worse, such methods rely excessively on the syntax of the language, making the resulting normalization algorithms brittle and sensitive to changes in the syntax. When the syntax of the language evolves due to modification or extension, as it almost always does in practice, the normalization algorithm may need to be revisited entirely. To circumvent these problems, normalization is currently either abandoned entirely or concrete instances of normalization are achieved using ad hoc means specific to a particular language. Continuing this trend in programming language research poses the risk of building on a weak foundation where languages either lack fundamental properties that follow from normalization or several concrete instances end up repeated in an ad hoc manner that lacks reusability.
This thesis advocates for the use of type-directed Normalization by Evaluation (NbE) to develop normalization algorithms. NbE is a technique that provides an opportunity for a modular implementation of normalization algorithms by allowing us to disentangle the syntax of a language from its semantics. Types further this opportunity by allowing us to dissect a language into isolated fragments, such as functions and products, with an individual specification of syntax and semantics. To illustrate type-directed NbE in context, we develop NbE algorithms and show their applicability for typed programming language calculi in three different domains (modal types, static information-flow control and categorical combinators) and for a family of embedded-domain specific languages in Haskell.
Chalmers, Computer Science and Engineering (Chalmers), Information Security
Normalization for Fitch-Style Modal Calculi
Proceedings of the ACM on Programming Languages,; Vol. 6(2022)
Practical normalization by evaluation for EDSLs
Haskell 2021 - Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell, co-located with ICFP 2021,; (2021)p. 56-70
Paper in proceeding
Simple Noninterference by Normalization
PLAS'19: Proceedings of the 14th ACM SIGSAC Workshop on Programming Languages and Analysis for Security,; (2019)p. 61-72
Paper in proceeding
Exponential Elimination for Bicartesian Closed Categorical Combinators
Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages 2019,; (2019)p. 1-13
Paper in proceeding
With the increasing use of software in today’s digital world, software is becoming more and more complex and the cost of developing and maintaining software has skyrocketed. It has become pressing to develop software using effective tools that reduce this cost. Programming language research aims to develop such tools using mathematically rigorous foundations. This thesis is about a recurring concept in programming languages known as normalization.
Normalization is the process of transforming a complex expression, such as 2 + 2(x − 1), to a canonical form, such as 2x, while preserving its meaning. Programs are essentially large expressions and normalizing programs allows us to, for instance, optimize their execution or check if two programs are equivalent. Despite the benefits, the problem with normalization is that it is very difficult to achieve. Implementing a correct normalization algorithm requires a considerable amount of effort since it demands a careful analysis of the language and a tedious amount of manual calculations. Furthermore, when a language evolves due to modification or extension, the normalization algorithm may need to be revisited entirely. Viewed through the lens of current methods, normalization appears monolithic and lacks the ability to be broken into sub-problems and solved independently, i.e., normalization lacks modularity.
This thesis presents a solution to modular normalization by adopting a technique known as Normalization by Evaluation (NbE) in combination with the types of a language. NbE allows us to disentangle the syntax of a language from its semantics and types allow us to decompose a language into several isolated components for a modular treatment. This thesis develops NbE algorithms for several functional programming languages, and shows their applicability in addressing certain problems that are themselves independent of normalization.
Octopi: Säker Programering för Sakernas Internet
Swedish Foundation for Strategic Research (SSF) (RIT17-0023), 2018-03-01 -- 2023-02-28.
Areas of Advance
Information and Communication Technology
Doktorsavhandlingar vid Chalmers tekniska högskola. Ny serie: 5316
EDIT Room EF
Opponent: Prof. Tarmo Uustalu