按年被提到
20172020 · 1 次2026
编程语言与编译器›类型系统与函数式语言·arXiv:1710.03248 · cs.PL

Synthesizing Bijective Lenses

Anders Miltner, Kathleen Fisher, Benjamin C. Pierce, David Walker, Steve Zdancewic · 2017
开始阅读 ↗PDFalphaXiv 讨论
被提及 · 2 人首次 2020-10-06 · 最近 2025-01-26
2不同的人
2活跃月份
2讨论串
30被引(OpenAlex)
arXiv 摘要(候选层不写导读)

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 well-typed program in Boomerang (a bidirectional language based on the theory of lenses). The main technical challenge involves navigating the vast program search space efficiently enough. Unlike most prior work on type-directed synthesis, our system operates in the context of a language with a rich equivalence relation on types (the theory of regular expressions). We synthesize terms of a equivalent language and convert those generated terms into our lens language. We prove the correctness of our synthesis algorithm. We also demonstrate empirically that our new language changes the synthesis problem from one that admits intractable solutions to one that admits highly efficient solutions. We evaluate Optician on a benchmark suite of 39 examples including both microbenchmarks and realistic examples derived from other data management systems including Flash Fill, a tool for synthesizing string transformations in spreadsheets, and Augeas, a tool for bidirectional processing of Linux system configuration files.

候选层:至少 2 个不同的人、在 2 个不同月份提到过,还没到主书架的 3 人 3 个月。没有做立场标注,所以只写“被提及”。

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
评论random3 · 2020-10

“Without being too knowledgeable on the topic, but with a little math background - you'd need a bijective function to that. On a quick search for bijective lenses https://arxiv.org/abs/1710.03248”

Project Cambria: Translate your data with lenses原评论 ↗
评论sitkack · 2025-01

“Mission accomplished! If you haven't check out Synthesizing Bijective Lenses https://arxiv.org/abs/1710.03248 Synthesizing Symmetric Lenses https://arxiv.org/abs/1810.11527 Synthesizing Quotient Lenses https://www.cs.sfu.ca/~miltner/papers/qptician.pdf https://github.com/Optician-Tool/Optician-Tool Boomerang https://www.seas.upenn.edu/~harmony/ htt…”

Yek: Serialize your code repo (or part of it) to feed into any LLM原评论 ↗