一句话:提出面向 C 程序的修复框架,用语法解析生成补丁条件并生成代码符号替代预处理指令,解决测试无关修复与预处理指令处理难题。
自动程序修复旨在减少人工修复缺陷的工作量,过去 15 年涌现了大量新技术。然而,这些技术依赖若干在实际软件开发中难以满足的假设,例如要求测试用例在补丁生成前已写好,或假设特定语言特性可被忽略或已处理,从而严重阻碍了修复技术的落地。本文提出一个 C 程序修复框架,重点应对两个挑战:测试无关修复与预处理指令处理。针对前者,通过解析 C 程序的语法结构自动构造补丁条件;针对后者,生成代码符号来替代预处理指令。作者计划借助程序分析技术实现这些方案。本文目标是向开发者展示可自动执行 C 程序修复的实用解决方案。
Automated program repair is to reduce the manual work for bug fixing by human developers. In recent 15 years, the research community of program repair has created many novel techniques. However, these techniques share several assumptions that cannot always be satisfied in daily software development. This badly hurts the application of program repair in practice. For example, many repair techniques assume that test cases are well written before patch generation; many techniques assume that specific language features can be ignored (or already-processed). In this paper, we propose a framework of C program repair, which mainly addresses two challenges: test-independent repair and preprocessor directive processing. Our solution to test-independent repair is to automatically construct patch conditions for C programs via parsing the syntax structures; our solution to preprocessor directive processing is to generate code symbols to replace preprocessor directives. We plan to implement these potential solutions with program analysis techniques. The goal of this paper is to present practical solutions for developers to automate C program repair.