Skip to main content

Synthesizing quotient lenses

Author(s): Maina, Solomon; Miltner, Anders; Fisher, Kathleen; Pierce, Benjamin C; Walker, David; et al

Download
To refer to this page use: http://arks.princeton.edu/ark:/88435/pr11269
Full metadata record
DC FieldValueLanguage
dc.contributor.authorMaina, Solomon-
dc.contributor.authorMiltner, Anders-
dc.contributor.authorFisher, Kathleen-
dc.contributor.authorPierce, Benjamin C-
dc.contributor.authorWalker, David-
dc.contributor.authorZdancewic, Steve-
dc.date.accessioned2021-10-08T19:47:53Z-
dc.date.available2021-10-08T19:47:53Z-
dc.date.issued2018-07en_US
dc.identifier.citationMaina, Solomon, Anders Miltner, Kathleen Fisher, Benjamin C. Pierce, David Walker, and Steve Zdancewic. "Synthesizing quotient lenses." Proceedings of the ACM on Programming Languages 2, no. ICFP (2018): 80:1-80:29. doi:10.1145/3236775en_US
dc.identifier.urihttp://arks.princeton.edu/ark:/88435/pr11269-
dc.description.abstractQuotient 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.en_US
dc.format.extent80:1 - 80:29en_US
dc.language.isoen_USen_US
dc.relationdoi:10.1145/3235041en_US
dc.relation.ispartofProceedings of the ACM on Programming Languagesen_US
dc.rightsFinal published version. This is an open access article.en_US
dc.titleSynthesizing quotient lensesen_US
dc.typeJournal Articleen_US
dc.identifier.doi10.1145/3236775-
pu.type.symplectichttp://www.symplectic.co.uk/publications/atom-terms/1.0/conference-proceedingen_US

Files in This Item:
File Description SizeFormat 
SynthesizingQuotientLenses.pdf462.63 kBAdobe PDFView/Download


Items in OAR@Princeton are protected by copyright, with all rights reserved, unless otherwise indicated.