Synthesizing quotient lenses

Author:

Maina Solomon1,Miltner Anders2,Fisher Kathleen3,Pierce Benjamin C.1,Walker David2,Zdancewic Steve1

Affiliation:

1. University of Pennsylvania, USA

2. Princeton University, USA

3. Tufts University, USA

Abstract

Quotient lenses are bidirectional transformations whose correctness laws are “loosened” by specified equivalence relations, allowing inessential details in concrete data formats to be suppressed. For example, a programmer could use a quotient lens to define a transformation that ignores the order of fields in XML data, so that two XML files with the same fields but in different orders would be considered the same, allowing a single, simple program to handle them both. Building on a recently published algorithm for synthesizing plain bijective lenses from high-level specifications, we show how to synthesize bijective quotient lenses in three steps. First, we introduce quotient regular expressions (QREs), annotated regular expressions that conveniently mark inessential aspects of string data formats; each QRE specifies, simulteneously, a regular language and an equivalence relation on it. Second, we introduce QRE lenses , i.e., lenses mapping between QREs. Our key technical result is a proof that every QRE lens can be transformed into a functionally equivalent lens that canonizes source and target data just at the “edges” and that uses a bijective lens to map between the respective canonical elements; no internal canonization occurs in a lens in this normal form. Third, we leverage this normalization theorem to synthesize QRE lenses from a pair of QREs and example input-output pairs, reusing earlier work on synthesizing plain bijective lenses. We have implemented QREs and QRE lens synthesis as an extension to the bidirectional programming language Boomerang. We evaluate the effectiveness of our approach by synthesizing QRE lenses between various real-world data formats in the Optician benchmark suite.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference27 articles.

1. Lennart Augustsson. 2004. {Haskell} Announcing Djinn version 2004-12-11 a coding wizard. Mailing List. http: //www.haskell.org/pipermail/haskell/2005-December/017055.html . Lennart Augustsson. 2004. {Haskell} Announcing Djinn version 2004-12-11 a coding wizard. Mailing List. http: //www.haskell.org/pipermail/haskell/2005-December/017055.html .

2. Boomerang

3. Dual syntax for XML languages

4. FLUX

5. The Essence of Form Abstraction

Cited by 7 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Synbit: synthesizing bidirectional programs using unidirectional sketches;Formal Methods in System Design;2024-01-29

2. Towards Automatic Synthesis of View Update Programs on Relations;Communications in Computer and Information Science;2022

3. Synbit: synthesizing bidirectional programs using unidirectional sketches;Proceedings of the ACM on Programming Languages;2021-10-20

4. Analogy-making as a Core primitive in the software engineering toolbox;Proceedings of the 2020 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software;2020-11-17

5. The Geometry of Syntax and Semantics for Directed File Transformations;2020 IEEE Security and Privacy Workshops (SPW);2020-05

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3