Effectful composition in natural language semantics
Dylan Bumford (UCLA) & Simon Charlow (Rutgers)
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.
Day 1: Introducing functors (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 (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 (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 (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 (slides)
- Adjoint functors
- Decomposing the state monad and the state monad transformer
- Comonadic functors and the store comonad