arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1809.04209cs.PL
收藏

直接操作的双向评估

Bidirectional Evaluation with Direct Manipulation

Mikaël Mayer, Viktor Kunčak, Ravi Chugh

摘要:

我们提出了一个评估更新(或简单地说,更新)算法的功能齐全的功能性程序设计语言,合成程序的变化的基础上输出的变化。直观地,更新算法追溯原始评估的步骤,根据需要重写程序以协调原始和更新的输出值之间的差异。此外,我们的方法允许专家用户定义自定义镜头,通过更高级或特定领域的程序更新来增强更新算法。为了证明评估更新的实用性,我们实现了该算法在草图n草图,一种新的直接操作编程系统生成HTML文档。在Sketch-n-Sketch中,用户编写ML风格的函数程序来生成HTML输出。当用户使用图形用户界面直接操纵输出时,更新算法协调变化。我们通过创作10个示例来评估Sketch-n-Sketch中的双向评估,这些示例总共包含大约1400行代码。这些示例演示了如何在Sketch-n-Sketch中交互式地开发和编辑各种HTML文档和应用程序,从而减轻了传统编程环境中繁琐的编辑-运行-查看周期。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑