Synthesizing Bijective Lenses
Anders Miltner, Kathleen Fisher, Benjamin C. Pierce, David, Walker, Steve Zdancewic

TL;DR
This paper introduces Optician, a type-directed synthesis tool for creating bijective string transformers using regular expressions, improving efficiency and correctness in bidirectional data transformations.
Contribution
We present Optician, a novel synthesis system that efficiently generates well-typed bijective string transformers from regular expressions and examples, with proven correctness.
Findings
Optician significantly reduces synthesis complexity compared to prior methods.
The system successfully synthesizes transformations for diverse real-world data formats.
Empirical evaluation shows high efficiency and correctness across benchmark examples.
Abstract
Bidirectional transformations between different data representations occur frequently in modern software systems. They appear as serializers and deserializers, as database views and view updaters, and more. Manually building bidirectional transformations---by writing two separate functions that are intended to be inverses---is tedious and error prone. A better approach is to use a domain-specific language in which both directions can be written as a single expression. However, these domain-specific languages can be difficult to program in, requiring programmers to manage fiddly details while working in a complex type system. To solve this, we present Optician, a tool for type-directed synthesis of bijective string transformers. The inputs to Optician are two ordinary regular expressions representing two data formats and a few concrete examples for disambiguation. The output is a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
