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

编辑事务:实时编程中受控更新的动态范围变更集

Edit Transactions: Dynamically Scoped Change Sets for Controlled Updates in Live Programming

Toni Mattis, Patrick Rein, Robert Hirschfeld

摘要:

实时编程环境使程序员能够编辑正在运行的程序,并获得对每个单独更改的即时反馈。程序员重视活动质量,以帮助以小步骤工作,并不断添加或更正小功能,同时保持每个编辑及其运行时表现形式之间的直接联系。这种即时性可能与执行一组组合的中间步骤(例如重构)而不是在每个单独的编辑之后立即生效的期望相冲突。当一个不完整的小规模更改序列很容易破坏正在运行的程序时,这一点就变得很重要。最先进的解决方案侧重于追溯恢复机制,如调试或版本控制。相比之下,我们提出了一种主动的方法:在编辑事务中收集对程序的多个单独更改,如果认为完成,则可以使其生效。激活后,合并的步骤一起可见。编辑事务能够动态地确定范围,允许在将一组更改扩展到正在运行的应用程序之前对其进行隔离测试。这使得实时编程工作流能够完全控制更改粒度、测试的即时反馈、对正在运行的应用程序的延迟影响以及粗粒度撤销。我们在Squeak/Smalltalk中实现了编辑事务以及编辑事务感知工具。我们进行了一个案例研究,有和没有新的工具支持,比较编程活动,错误和弯路,在运行模拟实现新的功能,评估这种实现。我们的结论是,使用编辑事务的工作流有可能增加对更改的信心,减少运行时错误的可能性,并最终使实时编程更具可预测性和吸引力。

英文摘要:

Live programming environments enable programmers to edit a running program and obtain immediate feedback on each individual change. The liveness quality is valued by programmers to help work in small steps and continuously add or correct small functionality while maintaining the impression of a direct connection between each edit and its manifestation at run-time. Such immediacy may conflict with the desire to perform a combined set of intermediate steps, such as a refactoring, without immediately taking effect after each individual edit. This becomes important when an incomplete sequence of small-scale changes can easily break the running program. State-of-the-art solutions focus on retroactive recovery mechanisms, such as debugging or version control. In contrast, we propose a proactive approach: Multiple individual changes to the program are collected in an Edit Transaction, which can be made effective if deemed complete. Upon activation, the combined steps become visible together. Edit Transactions are capable of dynamic scoping, allowing a set of changes to be tested in isolation before being extended to the running application. This enables a live programming workflow with full control over change granularity, immediate feedback on tests, delayed effect on the running application, and coarse-grained undos. We present an implementation of Edit Transactions along with Edit-Transaction-aware tools in Squeak/Smalltalk. We asses this implementation by conducting a case study with and without the new tool support, comparing programming activities, errors, and detours for implementing new functionality in a running simulation. We conclude that workflows using Edit Transactions have the potential to increase confidence in a change, reduce potential for run-time errors, and eventually make live programming more predictable and engaging.

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

↑