🤖 AI Summary
This work proposes the SpaceTime programming model to address the longstanding disconnect between static code and dynamic execution in conventional programming environments, which hinders simultaneous exploration of code modifications and runtime behavior. SpaceTime unifies, for the first time, three major paradigms—exploratory programming, live programming, and omniscient debugging—by capturing fine-grained traces that jointly record code variants and execution states. This enables bidirectional, traceable linkage across both spatial (code) and temporal (execution) dimensions. Implemented as a Python library, SpaceTimePy, the approach is validated through five real-world projects, successfully supporting an omniscient debugger and a Pygame-based game development tool. Empirical evaluation shows a performance overhead of 35%–150% across test suites, demonstrating its practical feasibility.
📝 Abstract
Programming environments typically separate the world of static code from the dynamic execution of programs. Developers must switch between writing code and observing its execution, often with limited tools to understand the relationship between code changes and runtime behavior. Several paradigms and approaches exist to bridge this gap, including exploratory programming for comparing code variants, live programming for immediate feedback, and omniscient debugging for exploring execution history. However, existing solutions tend to focus on specific aspects and one specific paradigm rather than providing a fully integrated environment with multiple capabilities. This paper introduces \spacetime Programming, a novel approach that unifies these paradigms to create a programming model for exploring both code modifications and execution flow. At the core of our approach is a trace mechanism that captures not only execution state but also the corresponding code changes, enabling developers to explore programs in both space (code variants) and time (execution flow). As a proof of concept, we implemented a Python library supporting SpaceTime Programming and applied it in two contexts: a live omniscient debugger and a Pygame game development tool, showcased through a Flappy Bird-like game. We further evaluated SpaceTimePy on five real-world Python projects, finding performance overhead ranging from 35% to 150% on test suites.