一句话:提出依赖敏感的变更传播算法,在不完全重放历史的情况下实现正确的选择性撤销/重做。
选择性撤销/重做允许禁用或重新启用某历史操作,同时尽量保留无关后续工作,对交互密集与协同编辑很重要。但操作受依赖约束时,切换后是否合法取决于复杂语义条件,每次切换都重放后续历史又过于昂贵。本文提出依赖敏感的变更传播算法:编辑器状态被分解为带 reducer 语义的细粒度槽位,基于前缀状态判定操作合法性,仅将切换影响传播到后续操作与状态变化的受影响邻域,并保持重放式正确性。作者在基于修改版 Godot Engine 的自研游戏 IDE 场景编辑器中实现,用两个精确重放基线做差分测试,并进行 45 次运行、450,000 条动作的有效性感知 fuzzing。结果显示与参考语义一致,显著降低切换延迟与语义工作量,前置条件求值约减少 194 倍。
Selective undo and redo let users disable or re-enable a specific historical operation while attempting to preserve unrelated later work. This is particularly valuable in interaction-heavy and collaborative editing environments, where mistakes may be discovered only after substantial later work has accumulated and where discarded edits are costly to reconstruct manually. Achieving this is significantly harder when operations are dependency-constrained: whether they remain valid after a toggle may depend on complex semantic conditions, and naively replaying long history suffixes after every toggle is too expensive for interactive use. To this end, we present a dependency-sensitive change-propagation algorithm that preserves a replay-style correctness target without full replay after every toggle. Our approach decomposes editor state into fine-grained slots with reducer-backed semantics, evaluates operation legality against prefix state, and propagates the effect of a toggle only through the affected neighborhood of later operations and state changes. We implement the mechanism in the scene editor of an in-house game IDE built on a heavily modified version of the Godot Engine. Across differential testing against two exact replay baselines and a validity-aware fuzzing campaign comprising 45 runs and 450,000 recorded actions, our change-propagation pipeline matched the reference semantics on all evaluated workloads. It substantially reduced toggle latency and semantic work relative to both baselines, including a reduction of about 194× in prerequisite evaluations. These results show that replay-style selective undo/redo can be made practical for operations with hard dependency constraints.
@inproceedings{paperbot12463,
title = {A Selective Undo/Redo Algorithm for Dependency-Constrained Operation Histories Based on Change Propagation},
author = {Xiaoxiong Fan and Hou Tam and Hanxi Zhu and Song-Hai Zhang},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837482}
}