Research indexPreprint
Derivative-based Bidirectional Programming
Guo, Wang, Zhang and 3 others
1 Jan 2026
NobleIDark:/48914/w1/20261104/2A2C039CDOI10.2139/ssrn.7590176
Derivative-based Bidirectional Programming
Guo, Wang, Zhang and 3 others · 2026 · Subscription
NobleIDark:/48914/w1/20261104/2A2C039CDOI10.2139/ssrn.7590176
The full text is at the publisher
You can read the abstract here, or open it at the publisher.
Abstract
The get-based and put-based approaches are two popular functional approaches to developing bidirectional transformations (BXs). They suffer from ambiguity and the difficulty of specifying the backward transformation, respectively. In this paper, we propose a novel derivative-based framework for bidirectional programming. In our framework, BXs are specified through get', i.e., the derivative of get, which describes how source updates correspond to view updates. We show how well-behaved BXs can be systematically derived from get', and prove completeness of the framework. We apply the framework to relational databases by designing a DSL, namely, dBX, and implementing a prototype. We evaluate the prototype on 42 representative examples to demonstrate the practical feasibility of our approach, showing its expressiveness and efficiency. We further demonstrate the generality of the framework by applying it to unordered trees and implementing classical tree combinators.