不会失效的预言机:锚定与随故障移动的期望
Oracles That Cannot Fail: Anchoring and the Expectation That Moves With the Fault
浏览论文内容
中文总结 AI 辅助
该研究提出预言机锚定概念,以空中交通管制模拟器为对象,测量锚定对突变体检测的影响,发现重新锚定可恢复部分突变体,调整比较大小对恢复突变体作用显著。
中文摘要 AI 辅助
从被评判系统获取期望值的测试预言机不会失效。若故障使测量值与期望一同移动,二者的比较会完全抵消,生成的输入无法揭示该故障,缺陷存在于预言机而非输入空间,我们将此现象称为预言机锚定。当期望由突变代码之外的固定值构成时,称为规格锚定;当期望直接或间接源自该代码时,称为状态锚定。测试异味文献中虽提及期望-值形式,但我们检索的所有研究均未对其进行测量。我们命名了此类值得出结论的另外三个通道,将谓词限定为源自突变目标的值,并对其进行测量。研究对象是已部署的空中交通管制模拟器,包含12个无模型属性套件。在4个模块和366个突变体上,这些套件相比手写测试多检测出3个突变体,且每个测试的效率是手写测试的6至33倍。随后我们进行三次干预,先预测每个结果:将一个持有预言机重新锚定到已发布的流程,不修改任何生产代码,恢复了46个突变体中的8个;将一个健康的去抖动预言机进行状态锚定,损失了19个中的4个;将参考模型应用于该总体,恰好杀死了规格锚定所杀死的突变体,表明风险在于锚定而非无模型性。在消融的6个实例中,调整比较大小的两个实例恢复了12个突变体中的11个。已发布的异味规则会否定我们的修复。根据分析编写的缺失预言机随后暴露了部署未发现的两个缺陷。所有测量均来自一位作者的单个系统。
英文摘要
A test oracle that obtains its expected value from the system it is judging cannot fail. If a fault moves measurement and expectation together the comparison cancels exactly, and no generated input will reveal it. The defect is in the oracle and not in the input space. We call this oracle anchoring. An expectation is specification-anchored when composed from values fixed outside the code under mutation, and state-anchored when it flows, directly or transitively, from that code. The expected-value form is named in the test-smell literature but not measured in any study we retrieved. We name three further channels by which such a value reaches a verdict, restrict the predicate to values flowing from the mutate target, and measure it. The subject is a deployed air traffic control simulator with 12 model-free property suites. Across 4 modules and 366 mutants these add 3 mutants of detection over the hand-written tests, while remaining 6 to 33 times as efficient per test. We then intervene three times, predicting each outcome first. Re-anchoring one holding oracle on published procedure, changing no production code, recovers 8 of 46; state-anchoring a healthy debounce oracle costs 4 of 19; and a reference model on that population kills exactly what specification anchoring kills, placing the risk in anchoring and not in model-freedom. Of 6 instances ablated, the two sizing their comparison carry 11 of the 12 recovered mutants. The published smell rule would revert our repair. Writing the oracle this analysis said was missing then exposed two defects deployment had not surfaced. All measurements come from one system by one author.