S<sub>YNTH</sub>BX: An Example-guided Synthesizer for Bidirectional Programs on Relations
Journal of Information Processing
Online ISSN : 1882-6652
ISSN-L : 1882-6652
 
SYNTHBX: An Example-guided Synthesizer for Bidirectional Programs on Relations
Bach Nguyen TrongKanae TsushimaZhenjiang Hu
Author information
JOURNAL FREE ACCESS

2024 Volume 32 Pages 471-486

Details
Abstract

Bidirectional transformations between different representations of related information appear frequently in many different areas like databases, software engineering, and programming languages. A bidirectional program expressing a bidirectional transformation includes a pair of programs - a get that defines a view over a source and a put that translates view updates to source updates - and provides strong guarantees about the well-behavedness of the get and the put. It is known to be challenging to develop bidirectional programs that are both well-behaved and practically useful. In this paper, we propose an approach to synthesizing well-behaved and practical bidirectional programs on relations from user-provided examples and data schemas. We start by synthesizing a get and decomposing it into a set of simple and atomic geta whose corresponding puta exists and thus reduce the synthesis of (get, put) into sub-synthesis of (geta, puta). Then, we solve each sub-synthesis task with a set of well-designed templates and combine all results to form the final bidirectional program. We have implemented our approach in a framework called SYNTHBX and evaluated it on a benchmark suite of 56 tasks from three sources. SYNTHBX successfully synthesizes well-behaved bidirectional programs for 52 tasks, with an average synthesis time of 19 seconds per task and within 3 seconds each for 37 of them, which shows practical usefulness of our approach.

Content from these authors
© 2024 by the Information Processing Society of Japan
Previous article Next article
feedback
Top