SchedCheck: 事件驱动块程序的调度鲁棒性分析
SchedCheck: Schedule-Robustness Analysis for Event-Driven Block Programs
AI总结:
针对Scratch等块语言中并发程序的调度敏感行为,提出基于偏序探索的调度鲁棒性分析方法SchedCheck,在真实学生项目中发现至少21%的并发程序存在调度敏感问题。
摘要:
基于块的编程语言(如Scratch)让初学者通过精灵和脚本组装交互式程序。这些程序实际上是并发的:绿旗脚本、广播和克隆作为协作调度的线程在共享的精灵和舞台状态上运行,而它们的作者从未编写线程。我们表明,此类程序包含调度敏感行为,其可观察结果取决于语言未指定的执行顺序。编辑、保存或混编项目可能会产生具有相同块但不同图层顺序的副本,从而改变虚拟机启动脚本的顺序。我们将Scratch虚拟机可实现调度空间形式化为初始可执行目标顺序的排列,并针对固定视界上的观察透镜格定义了调度鲁棒性。偏序探索在每个依赖等价类中运行一个调度,在足够小以枚举的项目上,独立预言机确认它恢复了每个可实现的结果。在较大项目中,代表调度在验证的依赖模型下替代阶乘。SchedCheck在生产Scratch虚拟机上实现了这一点。在224个真实学生项目中,至少21%的并发项目在评分透镜下是调度敏感的,公共项目的均匀随机样本以17.6%的比率复现了该结果,其中两个真实混编项目以不同方式排列其字母。在手工构建的故障对和跨四个类别的32个规范定义故障的生成基准上,该工具检测并定位了每个调度故障,逻辑故障控制报告为干净。预言机暴露了依赖模型中的四个不完备性缺口,均已修复。该方法在执行模型上是参数化的,可在第二个协作事件循环上不变地实例化。
英文摘要:
Block-based languages such as Scratch let beginners assemble interactive programs from sprites and scripts. These programs are concurrent in practice: green-flag scripts, broadcasts, and clones run as cooperatively scheduled threads over shared sprite and stage state, and their authors never write a thread. We show that such programs contain schedule-sensitive behaviors whose observable result depends on an execution order the language leaves open. Editing, saving, or remixing a project can produce a copy with the same blocks but a different layer order, changing the order the virtual machine starts scripts. We formalize the schedule space a Scratch virtual machine can realize as the permutations of the initial executable-target order, and define schedule-robustness against a lattice of observation lenses over a fixed horizon. A partial-order exploration runs one schedule per dependence-equivalence class, and on projects small enough to enumerate, an independent oracle confirms it recovers every realizable outcome. On larger projects, representatives stand in for the factorial under the validated dependence model. SchedCheck implements this on the production Scratch VM. Across 224 real student projects, at least 21% of the concurrent ones are schedule-sensitive at the grading lens, and a uniform random sample of public projects replicates the rate at 17.6%, with two real remixes of a deployed animation arranging its letters differently. On hand-built fault pairs and a generated benchmark of 32 spec-defined faults across four classes, the tool detects and localizes every schedule fault, with a logic-fault control reporting clean. The oracle exposed four unsoundness gaps in the dependence model, all repaired. The method is parametric in the execution model, instantiating unchanged on a second cooperative event loop.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。