Bidirectional Evaluation with Direct Manipulation
Mika\"el Mayer, Viktor Kun\v{c}ak, Ravi Chugh

TL;DR
This paper introduces a bidirectional evaluation algorithm for functional programming that allows output-driven program updates, demonstrated through an interactive HTML generation system called Sketch-n-Sketch.
Contribution
The paper presents a novel evaluation update algorithm that enables output-based program editing and supports custom domain-specific lenses in a functional language.
Findings
Effective program updates based on output changes in Sketch-n-Sketch
Interactive HTML editing reduces the edit-run-view cycle
Demonstrated utility with 10 examples totaling 1400 lines of code
Abstract
We present an evaluation update (or simply, update) algorithm for a full-featured functional programming language, which synthesizes program changes based on output changes. Intuitively, the update algorithm retraces the steps of the original evaluation, rewriting the program as needed to reconcile differences between the original and updated output values. Our approach, furthermore, allows expert users to define custom lenses that augment the update algorithm with more advanced or domain-specific program updates. To demonstrate the utility of evaluation update, we implement the algorithm in Sketch-n-Sketch, a novel direct manipulation programming system for generating HTML documents. In Sketch-n-Sketch, the user writes an ML-style functional program to generate HTML output. When the user directly manipulates the output using a graphical user interface, the update algorithm reconciles…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
