Write a Blog >>
ICFP 2018
Sun 23 - Sat 29 September 2018 St. Louis, Missouri, United States
Tue 25 Sep 2018 15:45 - 16:07 at Stifel Theatre - Bidirectional Programming Chair(s): Wouter Swierstra

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 only once at the “edges” then uses a bijective lens to map between the respective canonical elements; no internal canonization occurs for 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.

Tue 25 Sep
Times are displayed in time zone: (GMT-05:00) Guadalajara, Mexico City, Monterrey change

15:00 - 16:30: Research Papers - Bidirectional Programming at Stifel Theatre
Chair(s): Wouter SwierstraUtrecht University, Netherlands
icfp-2018-papers15:00 - 15:22
Guillaume BoisseauUniversity of Oxford, Jeremy GibbonsDepartment of Computer Science, University of Oxford
icfp-2018-papers15:22 - 15:45
Rudi HornUniversity of Edinburgh, Roly PereraUniversity of Glasgow, James CheneyUniversity of Edinburgh, UK
icfp-2018-papers15:45 - 16:07
Solomon MainaUniversity of Pennsylvania, Anders MiltnerPrinceton University, Kathleen FisherTufts University, USA, Benjamin C. PierceUniversity of Pennsylvania, Dave WalkerPrinceton University, Steve ZdancewicUniversity of Pennsylvania
icfp-2018-papers16:07 - 16:30
Csongor KissImperial College London, Matthew PickeringUniversity of Bristol, Nicolas WuUniversity of Bristol, UK