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

EcoScratch: 低成本多模态修复用于刮痕使用执行反馈

EcoScratch: Cost-Effective Multimodal Repair for Scratch Using Execution Feedback

University of Waterloo(滑铁卢大学);The Chinese University of Hong Kong(香港中文大学)

Yuan Si, Ming Wang, Daming Li, Hanyuan Shi, Jialu Zhang

AI总结:

EcoScratch通过轻量级运行时信号决定是否保持纯文本修复或升级到多模态提示,结合JSON补丁预算和验证努力,提升Scratch修复效率与效果。

摘要:

Scratch是初学者最流行的编程环境,全球已创建超过11.5亿个项目。与传统语言不同,Scratch的正确性由舞台上的可见行为定义,而非仅靠代码结构。因此,工作区中看似正确的程序可能在运行时因时间、事件顺序或跨精灵交互而失败。视觉执行证据如游戏视频对诊断和修复至关重要。然而,在自动修复循环中捕获和处理此类证据会引入显著开销。探测执行、记录舞台行为、重建可执行.sb3项目和验证候选修复消耗时间、金钱和资源,而非单个模型调用。我们提出了EcoScratch,一种修复管道,利用轻量级运行时信号决定下一步尝试是否保持纯文本或升级到多模态提示。控制器还设置JSON补丁预算和验证努力,使证据选择和修复预算在同一个决策中耦合。EcoScratch将候选修复重建为可执行.sb3项目并记录轨迹、货币成本和本地运行时能量。我们在四个控制器设置下评估了12个模型,共100个可执行Scratch修复项目,产生4800条修复轨迹。在该矩阵中,选择性多模态策略实现了最强的观察成功-成本-能量权衡。它在相同受限轨迹预算下达到最高生成成功率(30.3%),同时使用更少的平均成本和本地运行时能量,比两个非自适应多模态基线模型;纯文本仍是最低成本基础。在评估的矩阵中,多模态证据在受限制轨迹预算内控制升级时帮助最大,而非均匀应用。

英文摘要:

Scratch is the most popular programming environment for novices, with over 1.15 billion projects created worldwide. Unlike traditional languages, correctness in Scratch is defined by visible behavior on the stage rather than by code structure alone, so programs that appear correct in the workspace can still fail at runtime due to timing, event ordering, or cross-sprite interactions. Visual execution evidence such as gameplay videos can therefore be essential for diagnosis and repair. However, capturing and processing this evidence inside an automated repair loop introduces substantial overhead. Probing execution, recording stage behavior, rebuilding executable .sb3 projects, and verifying candidate fixes consume time, monetary cost, and resources across an entire repair trajectory rather than a single model call. We present EcoScratch, a repair pipeline that uses lightweight runtime signals to decide whether the next attempt stays text-only or escalates to multimodal prompting. The controller also sets the JSON Patch budget and verification effort, so evidence choice and repair budget are coupled inside the same decision. EcoScratch rebuilds candidate fixes into executable .sb3 projects and records per-trajectory traces, monetary cost, local-runtime energy. We evaluate 12 models on 100 executable Scratch repair projects under four controller settings, yielding 4800 repair trajectories. In this matrix, a selective multimodal policy gives the strongest observed success-cost-energy tradeoff. It reaches the highest generation success (30.3%) while using less average cost and local-runtime energy than the two non-adaptive multimodal baselines under the same bounded trajectory budget; text-only remains the lowest-cost floor. Across the evaluated matrix, multimodal evidence helps most when it is used to control escalation within a bounded trajectory budget rather than applied uniformly.

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

↑