Effectful composition in natural language semantics
Dylan Bumford (UCLA) & Simon Charlow (Yale)
Abstract: Computer programs are often factored into pure components—simple, total functions from inputs to outputs—and components that may have side effects—errors, changes to memory, parallel threads, abortion of the current command, etc. In this course, we make the case that human languages are similarly organized around the give and pull of pure and effectful processes, and we’ll aim to show how denotational techniques from computer science can be leveraged to support elegant and illuminating semantic analyses of natural language phenomena.
A short book based on this material is in press with Cambridge University Press, and can be accessed here. (Let us know of any errata!)
The slides below are being updated with NASSLLI 2025 versions ('NEW'). You can get a preview of where we're going by looking at the ESSLLI 2022 versions ('OLD').
Day 1: Introducing functors (NEW slides)
- The syntax-semantics interface, type-driven interpretation
- Various functors, and their linguistic motivations
- A simple functorial compositional interface
Day 2: Multiple functors, automating composition (NEW slides)
- Composition of functors by hand
- Case study: variable-free semantics, interaction of multiple effects
- Implementing/automating type-driven functorial interpretation in Haskell
Day 3: From functors to applicative functors (NEW slides, code)
- Defining and motivating applicative functors
- Composition of applicatives, extending the Haskell interpreter
- Applicatives for variables, alternatives, and their interaction
Day 4: From applicatives to monads (NEW slides)
- Monads motivated, defined, and added to the interpreter
- Case study: the nondeterministic state monad for dynamic semantics
- Monadic sequencing via continuations
Day 5: Monads decomposed (NEW slides)
- Adjoint functors
- Decomposing the state monad and the state monad transformer
- Comonadic functors and the store comonad