西安电子科技大学学报 ›› 2020, Vol. 47 ›› Issue (4): 117-123.doi: 10.19665/j.issn1001-2400.2020.04.016

• • 上一篇    下一篇

一种基于规则的自动程序修复方法

黄昱铭1(),马建峰1,2,刘志全1(),冯丙文1,3,4,5,魏凯敏1   

  1. 1.暨南大学 信息科学技术学院,广东 广州 510632
    2.西安电子科技大学 网络与信息安全学院,陕西 西安 710071
    3.中国科学院信息工程研究所 信息安全国家重点实验室,北京 100093
    4.广东省信息安全技术重点实验室,广东 广州 520006
    5.广东省智能信息处理重点实验室/深圳市媒体信息内容安全重点实验室,广东 深圳 518060
  • 收稿日期:2019-12-08 出版日期:2020-08-20 发布日期:2020-08-14
  • 通讯作者: 刘志全
  • 作者简介:黄昱铭(1995—),男,暨南大学硕士研究生,E-mail:406744068@qq.com.
  • 基金资助:
    国家自然科学基金(61802146);国家自然科学基金(61972178);国家自然科学基金(61802145);广东省重点领域研发计划(2019B010136003);广东省数据安全与隐私保护重点实验室(2017B03031004);广东省基础与应用基础研究基金(2019A1515011017);广东省自然科学基金(2019B010137005);广东省自然科学基金(2018A030313813);广东省自然科学基金(2018A03031387);广东省自然科学基金(2017A030313390);广东省自然科学基金(2017A030313334);广州市科技计划(201804010428);广州市科技计划(201802010061);中央高校基本科研业务费专项资金(11618332);中央高校基本科研业务费专项资金(11617343);信息安全国家重点实验室开放课题;广东省信息安全技术重点实验室开放基金(2017B030314131);广东省智能信息处理重点实验室/深圳市媒体信息内容安全重点实验室开放基金

Rule-based automatic program repair method

HUANG Yuming1(),MA Jianfeng1,2,LIU Zhiquan1(),FENG Bingwen1,3,4,5,WEI Kaimin1   

  1. 1. College of Information Science and Technology, Jinan Univ., Guangzhou 510632, China
    2. School of Cyber Engineering, Xidian Univ., Xi’an 710071, China
    3. State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences, Beijing 100093, China
    4. Guangdong Provincial Key Laboratory of Information Security Technology, Guangzhou 520006, China
    5. Guangdong Key Laboratory of Intelligent Information Processing and Shenzhen Key Laboratory of Media Security, Shenzhen 518060, China
  • Received:2019-12-08 Online:2020-08-20 Published:2020-08-14
  • Contact: Zhiquan LIU

摘要:

为解决基于测试集自动程序修复方法修复缺陷正确率低的问题,提出一种基于规则的自动程序修复方法——RuleFix。该方法首先通过挖掘代码中的隐式编程规则定位缺陷位置,然后根据隐式编程规则选取合适的补丁,最后采用程序合成工具对补丁进行校验以保证修复结果的正确性。此外,为解决现有规则挖掘算法无法有效挖掘低频规则的问题,提出一种低频规则挖掘算法,根据已有规则推演生成新的规则,以提升规则挖掘的能力。基于所提方法实现了原型工具,并与现有的自动程序修复方法进行对比。实验结果表明,与现有的GenProg和PAR方法相比,所提方法有明显更高的修复率和正确率。

关键词: 自动程序修复, 基于规则, 静态分析, 测试集

Abstract:

To tackle the problem of a low accuracy of test suite-based automatic program repair methods, this paper proposes a rule-based automatic program repair method named RuleFix. The proposed method first mines implicit programming rules in programs to locate defects, and then selects an appropriate patch according to the implicit programming rules, and lastly verifies the patch by utilizing the program synthesis tool to ensure the correctness of the repair result. Moreover, to tackle the problem that the existing rule mining algorithms cannot effectively mine low-frequency rules, a low-frequency rule mining algorithm is proposed, which can derives new rules based on the existing rules to improve the ability of rule mining. Finally, a prototype tool is implemented based on the proposed method, and then the proposed method is compared with the existing automatic program repair methods. Experimental results demonstrate that the proposed method has a significantly higher repair rate and accuracy rate than the existing GenProg and PAR methods.

Key words: automatic program repair, rule-based, static analysis, test suite

中图分类号: 

  • TP309