Abstract
AbstractWe propose a technique for synthesizing bidirectional programs from the corresponding unidirectional code plus input/output examples. The core ideas are: (1) constructing a sketch using the given unidirectional program as a specification, and (2) filling the sketch in a modular fashion by exploiting the properties of bidirectional programs. These ideas are enabled by our choice of programming language, HOBiT, which is specifically designed to maintain the unidirectional program structure in bidirectional programming, and keep the parts that control bidirectional behavior modular. To evaluate our approach, we implemented it in a tool called Synbit and used it to generate bidirectional programs for intricate microbenchmarks, as well as for a few larger, more realistic problems. We also compared Synbit to a state-of-the-art unidirectional synthesis tool on the task of synthesizing backward computations. This is an extended version of the paper “Synbit: Synthesizing Bidirectional Programs using Unidirectional Sketches”, published at OOPSLA 2021. In addition to the OOPSLA’21 paper, this journal will contain additional formalization and detailed examples.
Funder
Royal Society
EPSRC
JSPS KAKENHI
JSPS Bilateral Program
Kayamori Foundation of Informational Science Advancement
Publisher
Springer Science and Business Media LLC
Reference65 articles.
1. Bancilhon F, Spyratos N (1981) Update semantics of relational views. ACM Trans Database Syst 6(4):557–575. https://doi.org/10.1145/319628.319634
2. Hegner SJ (1990) Foundations of canonical update support for closed database views. In: ICDT, pp 422–436. https://doi.org/10.1007/3-540-53507-1_93
3. Stevens P In: Lämmel R, Visser J, Saraiva J (eds) (2008) A landscape of bidirectional model transformations. Springer, Berlin, Heidelberg, pp 408–424. https://doi.org/10.1007/978-3-540-88643-3_10
4. Foster JN, Greenwald MB, Moore JT, Pierce BC, Schmitt A (2007) Combinators for bidirectional tree transformations: a linguistic approach to the view-update problem. ACM Trans Program Lang Syst 10(1145/1232420):1232424
5. Matsuda K, Hu Z, Nakano K, Hamana M, Takeichi M (2007) Bidirectionalization transformation based on automatic derivation of view complement functions. In: Proceedings of the 12th ACM SIGPLAN international conference on functional programming, ICFP 2007, Freiburg, Germany, October 1–3, 2007, pp 47–58. https://doi.org/10.1145/1291151.1291162