Live programming provides feedback on run-time behavior by visualizing concrete values of expressions close to the source code. When using such a local perspective on run-time behavior, programmers have to mentally reconstruct the control flow if they want to understand the relation between observed values. As this requires complete and correct knowledge of all relevant code, this reconstruction is impractical for larger programs as well as in the case of unexpected program behavior. In turn, cross-cutting perspectives on run-time behavior can visualize the actual control flow directly. At the same time, cross-cutting perspectives are often difficult to navigate due to the large number of run-time events. We propose to integrate cross-cutting perspectives into live programming environments based on local perspectives so that the two complement each other: the cross-cutting perspective provides an overview of the run-time behavior; the local perspective provides detailed feedback as well as points of interest to navigate the cross-cutting perspective. We present a cross-cutting perspective prototype in the form of a call tree browser integrated into the Babylonian/S live programming environment. In an exploratory user study, we observed that programmers found the tool useful for debugging, code comprehension, and navigation. Finally, we discuss how our prototype illustrates how the features of live programming environments may serve as the basis for other powerful dynamic development tools.
翻译:实时编程通过可视化表达式在源代码附近的具体值来提供运行时行为的反馈。当使用这种局部视角观察运行时行为时,编程者若想理解所观测值之间的关系,必须在大脑中重构控制流。由于这需要完整且正确地掌握所有相关代码,对于较大型程序以及出现意外程序行为的情况,这种重构是不切实际的。反之,运行时行为的横切视角可以直接可视化实际的控制流。然而,由于运行时事件数量庞大,横切视角往往难以导航。我们提出将基于局部视角的横切视角集成到实时编程环境中,使两者相互补充:横切视角提供运行时行为的概览,局部视角则提供详细的反馈以及导航横切视角的关注点。我们以集成到Babylonian/S实时编程环境中的调用树浏览器为原型,展示了横切视角的实现。在一项探索性用户研究中,我们观察到编程者认为该工具对调试、代码理解和导航均有用。最后,我们讨论本原型如何说明实时编程环境的特性可作为其他强大动态开发工具的基础。