Anmol Sahoo
October 30, 2025

Functional programs use I/O libraries that mask inconsistent environment behaviors from client expectations. However, complex filtering is often needed when library and environment implementations are opaque. This paper proposes automatically synthesizing behavioral filters by encoding the search as a higher-order logic program over traces of API interactions between the client and the environment. Our solution uses relations to specify constraints between client-library and library-environment behaviors. When found, these relations define filters that transform environment behaviors into client-expected ones. We implement these declarative filter semantics using algebraic effect handlers, which manipulate continuations to capture control state. This provides an end-to-end system for correct-by-construction behavioral filter synthesis in effect-based libraries.

About Anmol Sahoo

Anmol Sahoo is a PhD student advised by Prof. Suresh Jagannathan. He is interested in functional programming, algebraic effects and OCaml and is currently working on synthesis of effectful libraries.