Test-case reduction and deduplication almost for free with transformation-based compiler testing

Test-case reduction and deduplication almost for free with transformation-based compiler testing
复制标题

DOI:
10.1145/3453483.3454092
复制
发表时间:
2021-06
期刊:
Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation
影响因子:
--
通讯作者:
Alastair F. Donaldson;Paul Thomson;Vasyl Teliman;Stefano Milizia;André Perez Maselco;Antoni Karpiński
Alastair F. Donaldson;Paul Thomson;Vasyl Teliman;Stefano Milizia;André Perez Maselco;Antoni Karpiński
中科院分区:
其他
文献类型:
--
作者:
Alastair F. Donaldson;Paul Thomson;Vasyl Teliman;Stefano Milizia;André Perez Maselco;Antoni Karpiński

文献摘要

被引文献

相似文献

编译器测试的最新基于转换的方法查找对等效程序对结果之间的不匹配,其中一个程序是通过随机应用语义传播转换来衍生而来的。我们提出了基于转换的编译器测试的公式,几乎可以免费提供有效的测试案例降低:如果将转换设计为尽可能小且独立,则可以使用标准的Delta调试来缩小诱导错误的转换顺序到较小的子序列仍然触发该错误。然后,该错误可以报告为原始和最小转化程序之间的三角洲。最小化的转换序列也可以用于启发一组诱导错误的测试,建议对涉及不同类型转换类型的人进行手动研究,从而可能具有不同的根本原因。我们通过新工具SpirV-Fuzz演示了我们方法的有效性,SpirV-Fuzz是SPIR-V中间表示的第一个编译器测试工具,该工具是Vulkan GPU编程模型的基础。
Recent transformation-based approaches to compiler testing look for mismatches between the results of pairs of equivalent programs, where one program is derived from the other by randomly applying semantics-preserving transformations. We present a formulation of transformation-based compiler testing that provides effective test-case reduction almost for free: if transformations are designed to be as small and independent as possible, standard delta debugging can be used to shrink a bug-inducing transformation sequence to a smaller subsequence that still triggers the bug. The bug can then be reported as a delta between an original and minimally-transformed program. Minimized transformation sequences can also be used to heuristically deduplicate a set of bug-inducing tests, recommending manual investigation of those that involve disparate types of transformations and thus may have different root causes. We demonstrate the effectiveness of our approach via a new tool, spirv-fuzz, the first compiler-testing tool for the SPIR-V intermediate representation that underpins the Vulkan GPU programming model.