Please use this identifier to cite or link to this item:
http://arks.princeton.edu/ark:/88435/dsp013j333531v
Full metadata record
DC Field | Value | Language |
---|---|---|
dc.contributor.advisor | Walker, David | |
dc.contributor.author | Miltner, Anders | |
dc.contributor.other | Computer Science Department | |
dc.date.accessioned | 2020-11-20T05:59:05Z | - |
dc.date.available | 2020-11-20T05:59:05Z | - |
dc.date.issued | 2020 | |
dc.identifier.uri | http://arks.princeton.edu/ark:/88435/dsp013j333531v | - |
dc.description.abstract | Lenses are bidirectional functions that satisfy a set of "round-tripping laws." Lenses arise in a number of domains, and can implement serializer/deserializer pairs, parser/pretty printer pairs, and incremental data structure transformers. Domain-specific languages like Boomerang, Augeas, GRoundTram, BiFluX, BiYacc, Brul, BiGUL, and HOBiT allow programmers to write both transformations with a single program, and guarantee the transformations satisfy the round-tripping laws. However, writing in domain-specific lens languages can be hard, requiring the user to reason about fiddly details of the transformations, often within the context of a complex type system. In this work we introduce Optician, which provides an alternative method of developing lenses -- synthesis. We develop a synthesis engine for Boomerang, a lens language for string transformations. Pairs of regular expressions serve as types for Boomerang lenses, which transform strings between the languages of those regular expressions. Instead of manually writing Boomerang lenses, programmers merely need to provide the type of the desired lens and a set of input/output examples describing the lens's behavior. Optician will then synthesize a lens between the provided types that exhibits the demonstrated behavior. We demonstrate how to synthesize three classes of lenses: bijective lenses, quotient lenses, and symmetric lenses. Bijective lenses encode bijections, quotient lenses encode bijections modulo an equivalence relation, and symmetric lenses encode bidirectional transformations that may discard information when going from one format to another. We define a synthesizer that involves two cooperating procedures. One procedure proposes a candidate space of lenses, the second procedure searches through that space. To synthesize quotient lenses, regular expressions are augmented with equivalence information, and the synthesizer generates lenses that translate between the representative elements of the equivalence classes. To synthesize symmetric lenses, regular expressions are augmented with probability distributions, and the synthesis algorithm aims to avoid information loss. We evaluate Optician from a variety of benchmarks taken from the lens and synthesis literature, and find that we are able to synthesize all the lenses in our benchmark suite. We have integrated Optician into the Boomerang codebase, enabling users to either synthesize their lenses or write them by hand. | |
dc.language.iso | en | |
dc.publisher | Princeton, NJ : Princeton University | |
dc.relation.isformatof | The Mudd Manuscript Library retains one bound copy of each dissertation. Search for these copies in the library's main catalog: <a href=http://catalog.princeton.edu> catalog.princeton.edu </a> | |
dc.subject | Bidirectional Programming | |
dc.subject | Program Synthesis | |
dc.subject.classification | Computer science | |
dc.title | Synthesizing Lenses | |
dc.type | Academic dissertations (Ph.D.) | |
Appears in Collections: | Computer Science |
Files in This Item:
File | Description | Size | Format | |
---|---|---|---|---|
Miltner_princeton_0181D_13467.pdf | 5.27 MB | Adobe PDF | View/Download |
Items in Dataspace are protected by copyright, with all rights reserved, unless otherwise indicated.