Bidirectional Evaluation with Direct Manipulation

09/12/2018
by   Mikaël Mayer, et al.
0

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 the changes. We evaluate bidirectional evaluation in Sketch-n-Sketch by authoring ten examples comprising approximately 1400 lines of code in total. These examples demonstrate how a variety of HTML documents and applications can be developed and edited interactively in Sketch-n-Sketch, mitigating the tedious edit-run-view cycle in traditional programming environments.

READ FULL TEXT
research
07/24/2019

Sketch-n-Sketch: Output-Directed Programming for SVG

For creative tasks, programmers face a choice: Use a GUI and sacrifice f...
research
11/01/2019

Program Sketching with Live Bidirectional Evaluation

We present Sketch-n-Myth, a technique for completing program sketches wh...
research
08/09/2016

Semi-Automated SVG Programming via Direct Manipulation

Direct manipulation interfaces provide intuitive and interactive feature...
research
12/29/2019

Synthesizing Queries via Interactive Sketching

We propose a novel approach to program synthesis, focusing on synthesizi...
research
11/01/2019

Program Synthesis with Live Bidirectional Evaluation

We present an algorithm for completing program sketches (partial program...
research
05/16/2019

Direct Interpretation of Functional Programs for Debugging

We make another assault on the longstanding problem of debugging. After ...
research
05/23/2022

HyperLogLogLog: Cardinality Estimation With One Log More

We present HyperLogLogLog, a practical compression of the HyperLogLog sk...

Please sign up or login with your details

Forgot password? Click here to reset