Synthesizing Symmetric Lenses
Anders Miltner, Solomon Maina, Kathleen Fisher, Benjamin C. Pierce,, David Walker, Steve Zdancewic

TL;DR
This paper extends existing lens synthesis techniques to a broader class called simple symmetric lenses, enabling more flexible bidirectional data transformations, with an efficient implementation capable of handling diverse real-world examples.
Contribution
It introduces a new synthesis algorithm for simple symmetric lenses, including asymmetric and some symmetric lenses, using information theory and stochastic regular expressions for guidance.
Findings
Synthesizes lenses in under 30 seconds for 48 benchmarks.
Supports a broader class of lenses including asymmetric and symmetric types.
Uses information theory to guide the synthesis process effectively.
Abstract
Lenses are programs that can be run both "front to back" and "back to front," allowing updates to either their source or their target data to be transferred in both directions. Lenses have been extensively studied, extended, and applied. Recent work has demonstrated how techniques from type-directed program synthesis can be used to efficiently synthesize a simple class of lenses---bijective lenses over string data---given a pair of types (regular expressions) and examples. We extend this synthesis algorithm to a broader class of lenses, called simple symmetric lenses, including all bijective lenses, all of the popular category of "asymmetric" lenses, and a subset of the "symmetric lenses" proposed by Hofmann et al. Intuitively, simple symmetric lenses allow some information to be present on one side but not the other and vice versa. They are of independent theoretical interest, being…
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.
