用户名: 密码: 验证码:
程序自动修复:关键问题及技术
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Automatic Program Repair: Key Problems and Technologies
  • 作者:李斌 ; 贺也平 ; 马恒太
  • 英文作者:LI Bin;HE Ye-Ping;MA Heng-Tai;University of Chinese Academy of Sciences;National Engineering Center of Fundamental Software(Institute of Software, Chinese Academy of Sciences);State Key Laboratory of Computer Science(Institute of Software, Chinese Academy of Sciences);
  • 关键词:程序自动修复 ; 静态分析 ; 程序规约 ; 补丁生成 ; 测试集
  • 英文关键词:automatic program repair;;static analysis;;program specification;;patch generation;;test suite
  • 中文刊名:RJXB
  • 英文刊名:Journal of Software
  • 机构:中国科学院大学;基础软件国家工程研究中心(中国科学院软件研究所);计算机科学国家重点实验室(中国科学院软件研究所);
  • 出版日期:2019-02-15
  • 出版单位:软件学报
  • 年:2019
  • 期:v.30
  • 基金:核高基国家科技重大专项(2014ZX01029101-002)~~
  • 语种:中文;
  • 页:RJXB201902004
  • 页数:22
  • CN:02
  • ISSN:11-2560/TP
  • 分类号:54-75
摘要
程序自动修复技术能够有效地降低软件维护成本,是近年来学术研究的热点问题.待修复程序规约的刻画,对自动修复过程具有至关重要的作用.从规约的角度对程序自动修复问题和技术进行了分析梳理.从待修复程序是否具有完整的程序规约,将现有修复问题分为不完全规约、完全规约和半完全规约这3大类待修复问题.以3类抽象问题为线索,梳理了不同前提假设下修复技术面临的核心问题、问题之间的联系和技术体系中的逻辑关系.分析了不完全规约程序修复问题中高精度补丁生成、规约补全和补丁择优等问题,梳理了完全规约程序修复问题中内存泄漏、资源泄露、并发错误中的数据竞争、原子性违背、顺序违背和死锁,配置错误以及特定性能错误等具体问题及研究进展,整理了半完全规约程序修复问题中多种形式的修复具体问题及研究进展.最后分析了程序自动修复面临的机遇和挑战.
        Automatic program repair technology can effectively reduce the cost of software maintenance, which is a hot topic of academic research in recent years. Specifications description of to be fixed program plays a vital role in the automatic program repair process, this article analyses the problems and technologies of automatic program repair from specifications point of view. According to whether the specifications to be repaired program is complete, the existing repair problems are divided into three kinds of problems to be repaired, such as incomplete specifications, complete specifications, and semi-complete specifications problems to be repaired. It is analyzed that the core problems, the relationship between problems and the logical relationship of technology under different assumptions based on three kinds of abstract problems. Also analyzed issues are high-precision patch generation, specifications completion and patch selection in incomplete specifications repair, and the specific problems and progress in memory leak, resource leak, concurrency errors include data competition, atomic violation, sequence violation and deadlock, configuration error and specific performance error in complete specifications repair. The various specific repair problems and research progress of the semi-complete specifications repair problem are collated. Finally, the opportunities and challenges faced by automatic program repair are analyzed.
引文
[1]Hailpern B,Santhanam P.Software debugging,testing,and verification.IBM Systems Journal,2002,41(1):4-12.
    [2]Anvik J,Hiew L,Murphy GC.Who should fix this bug?In:Proc.of the 28th Int’l Conf.on Software Engineering.2006.361-370.
    [3]https://www.mozilla.org/en-US/security/client-bug-bounty
    [4]https://blog.chromium.org/2010/01/encouraging-more-chromium-security.html
    [5]https://technet.microsoft.com/en-us/security/dn425036
    [6]https://en.wikipedia.org/wiki/Deep_Impact_(spacecraft)
    [7]Xuan JF,Ren ZL,Wang ZY,Xie XY,Jiang H.Progress on approaches to automatic program repair.Ruan Jian Xue Bao/Journal of Software,2016,27(4):771-784(in Chinese with English abstract).http://www.jos.org.cn/1000-9825/4972.htm[doi:10.13328/j.cnki.jos.004972]
    [8]Wang Z,Gao J,Chen X,Fu HJ,Fan XY.Automatic program repair techniques:A survey.Chinese Journal of Computers,2018,41(3):588-610(in Chinese with English abstract).
    [9]Goues CL,Forrest S,Weimer W.Current challenges in automatic software repair.Software Quality Journal,2013,21(3):421-443.
    [10]Monperrus M.Automatic software repair:A bibliography.ACM Computing Surveys,2018,51(1):Article No.17.
    [11]Le XBD,Thung F,Lo D,Le Goues C.Overfitting in semantics-based automated program repair.In:Proc.of the Empirical Software Engineering.2018.1-27.
    [12]Mechtaev S,Nguyen MD,Noller Y,Grunske L,Roychoudhury A.Semantic program repair using a reference implementation.In:Proc.of the 40th Int’l Conf.on Software Engineering(ICSE 2018).2018.11-22.
    [13]Andersen J,Lawall JL.Generic patch inference.Automated Software Engineering,2010,17(2):119-148.
    [14]Staats M,Whalen MW,Heimdahl MPE.Programs,tests,and oracles:The foundations of testing revisited.In:Proc.of the Int’l Conf.on Software Engineering.2011.391-400.
    [15]Gao Q,Xiong Y,Mi Y,Zhang L,Yang W,Zhou Z,Xie B,Mei H.Safe memory-leak fixing for c programs.In:Proc.of the 37th Int’l Conf.on Software Engineering(ICSE 2015),Vol.1.Piscataway:IEEE Press,2015.459-470.
    [16]Wong WE,Gao R,Li Y,Abreu R,Wotawa F.A survey on software fault localization.IEEE Trans.on Software Engineering,2016,42(8):707-740.
    [17]Yu K,Lin MX.Advances in automatic fault localization techniques.Chinese Journal of Computers,2011,34(8):1411-1422(in Chinese with English abstract).
    [18]Chen X,Ju XL,Wen WZ,Gu Q.Review of dynamic fault localization approaches based on program spectrum.Ruan Jian Xue Bao/Journal of Software,2015,26(2):390-412(in Chinese with English abstract).http://www.jos.org.cn/1000-9825/4708.htm[doi:10.13328/j.cnki.jos.004708]
    [19]Jones JA,Harrold MJ,Stasko J.Visualization of test information to assist fault localization.In:Proc.of the 24th Int’l Conf.on Software Engineering(ICSE 2002).2002.467-477.
    [20]Tassey G.The economic impacts of inadequate infrastructure for software testing.National Institute of Standards and Technology,2002,15(3):125-125.
    [21]Dijkstra EW.Notes on structured programming.In:Dahl OJ,Dijkstra EW,Hoare CAR,eds.Proc.of the Structured Programming.Academic Press,1972.1-82.
    [22]Qi Z,Long F,Achour S,Rinard M.An analysis of patch plausibility and correctness for generate-and-validate patch generation systems.In:Proc.of the 2015 Int’l Symp.on Software Testing and Analysis.ACM Press,2015.24-36.
    [23]Smith EK,Barr ET,Goues CL,Brun Y.Is the cure worse than the disease?Overfitting in automated program repair.In:Proc.of the 2015 10th Joint Meeting on Foundations of Software Engineering.ACM Press,2015.532-543.
    [24]Le Goues C,Nguyen T,Forrest S,Weimer W.GenProg:A generic method for automatic software repair.IEEE Trans.on Software Engineering,2012,38(1):54-72.
    [25]D’Antoni L,Samanta R,Singh R.Qlose:Program repair with quantitative objectives.In:Proc.of the Int’l Conf.on Computer Aided Verification.Cham:Springer-Verlag,2016.383-401.
    [26]Su XH,Yu Z,Wang TT,Ma PJ.A survey on exposing,detecting and avoiding concurrency bugs.Chinese Journal of Computers,2015,38(11):2215-2233(in Chinese with English abstract).
    [27]Wei Y,Pei Y,Furia CA,Silva LS,Buchholz S,Meyer B,Zeller A.Automated fixing of programs with contracts.In:Proc.of the19th Int’l Symp.on Software Testing and Analysis.ACM Press,2010.61-72.
    [28]Long F,Rinard M.An analysis of the search spaces for generates and validates patch generation systems.In:Proc.of the IEEE/ACM 38th Int’l Conf.on Software Engineering(ICSE).IEEE,2016.702-713.
    [29]Le XBD,Le TDB,Lo D.Should fixing these failures be delegated to automated program repair?In:Proc.of the IEEE 26th Int’l Symp.on Software Reliability Engineering.IEEE Computer Society,2015.427-437.
    [30]Tan SH,Yi J,Mechtaev S,Roychoudhury A.Codeflaws:A programming competition benchmark for evaluating automated program repair tools.In:Proc.of the 39th Int’l Conf.on Software Engineering Companion.IEEE,2017.180-182.
    [31]Mechtaev S,Yi J,Roychoudhury A.Angelix:Scalable multiline program patch synthesis via symbolic analysis.In:Proc.of the38th Int’l Conf.on Software Engineering.ACM Press,2016.691-701.
    [32]Le XBD,Lo D,Goues CL.Empirical study on synthesis engines for semantics-based program repair.In:Proc.of the IEEE Int’l Conf.on Software Maintenance and Evolution.IEEE,2017.423-427.
    [33]Le XBD,Lo D,Goues CL.History driven program repair.In:Proc.of the Int’l Conf.on Software Analysis,Evolution,and Reengineering.IEEE,2016.213-224.
    [34]Kim D,Nam J,Song J,Kim S.Automatic patch generation learned from human-written patches.In:Proc.of the 2013 Int’l Conf.on Software Engineering.IEEE Press,2013.802-811.
    [35]Suzuki R,Suzuki R,Suzuki R,Polozov O,Gulwani S,Gheyi R,Hartmann B.Learning syntactic program transformations from examples.In:Proc.of the 39th Int’l Conf.on Software Engineering.IEEE Press,2017.404-415.
    [36]Xiong Y,Wang J,Yan R,Zhang J,Han S,Huang G,Zhang L.Precise condition synthesis for program repair.In:Proc.of the 39th Int’l Conf.on Software Engineering.IEEE Press,2017.416-426.
    [37]Zhang X,Gupta N,Gupta R.Locating faults through automated predicate switching.In:Proc.of the 28th Int’l Conf.on Software Engineering.ACM Press,2006.272-281.
    [38]Saha RK,Lyu Y,Yoshida H,Prasad MR.Elixir:Effective object-oriented program repair.In:Proc.of the 2017 32nd IEEE/ACMInt’l Conf.on Automated Software Engineering(ASE).IEEE,2017.648-659.
    [39]Chen L,Pei Y,Furia CA.Contract-based program repair without the contracts.In:Proc.of the 2017 32nd IEEE/ACM Int’l Conf.on Automated Software Engineering(ASE).IEEE,2017.637-647.
    [40]Qi X,Reiss SP.Leveraging syntax-related code for automated program repair.In:Proc.of the 32nd IEEE/ACM Int’l Conf.on Automated Software Engineering.IEEE Press,2017.660-670.
    [41]Sumi S,Higo Y,Hotta K,Kusumoto S.Toward improving graftability on automated program repair.In:Proc.of the 2015 IEEEInt’l Conf.on Software Maintenance and Evolution(ICSME).IEEE,2015.511-515.
    [42]Sidiroglou-Douskos S,Lahtinen E,Long F,Rinard M.Automatic error elimination by horizontal code transfer across multiple applications.ACM SIGPLAN Notices,2015,50(6):43-54.
    [43]Ke Y,Stolee KT,Goues CL,Brun Y.Repairing programs with semantic code search.In:Proc.of the 2015 30th IEEE/ACM Int’l Conf.on Automated Software Engineering(ASE).IEEE,2015.295-306.
    [44]Wen M,Chen JJ,Wu RX,Hao D,Cheung SC.Context-aware patch generation for better automated program repair.In:Proc.of the40th Int’l Conf.on Software Engineering(ICSE 2018).2018.1-11.
    [45]Hua JR,Zhang MS,Wang KY,Khurshid S.Towards practical program repair with on-demand candidate generation.In:Proc.of the 40th Int’l Conf.on Software Engineering.2018.12-23.
    [46]Mechtaev S,Yi J,Roychoudhury A.Directfix:Looking for simple program repairs.In:Proc.of the 37th Int’l Conf.on Software Engineering.Vol.1.IEEE Press,2015.448-458.
    [47]Do H,Elbaum S,Rothermel G.Supporting controlled experimentation with testing techniques:An infrastructure and its potential impact.Empirical Software Engineering,2005,10(4):405-435.
    [48]Cadar C,Dunbar D,Engler D.KLEE:Unassisted and automatic generation of high-coverage tests for complex systems programs.In:Proc.of the Usenix Conf.on Operating Systems Design and Implementation.USENIX Association,2009.209-224.
    [49]Nguyen HDT,Qi D,Roychoudhury A,Chandra S.Semfix:Program repair via semantic analysis.In:Proc.of the 2013 35th Int’l Conf.on Software Engineering(ICSE).IEEE,2013.772-781.
    [50]Le Goues C,Dewey-Vogt M,Forrest S,Weimer W.A systematic study of automated program repair:Fixing 55 out of 105 bugs for$8 each.In:Proc.of the 2012 34th Int’l Conf.on Software Engineering(ICSE).IEEE,2012.3-13.
    [51]Xuan JF,Martinez M,DeMarco F,Clement M,Marcote SL,Durieux T,Le Berre D,Monperrus M.Nopol:Automatic repair of conditional statement bugs in Java programs.IEEE Trans.on Software Engineering,2017,43(1):34-55.
    [52]DeMarco F,Xuan JF,Berre DL,Monperrus M.Automatic repair of buggy if conditions and missing preconditions with smt.In:Proc.of the Int’l Workshop on Constraints in Software Testing,Verification,and Analysis.Hyderabad,2014.30-39.
    [53]Qi X,Reiss SP.Identifying test-suite-overfitted patches through test case generation.In:Proc.of the 26th ACM SIGSOFT Int’l Symp.on Software Testing and Analysis.ACM Press,2017.226-236.
    [54]Kong X,Zhang L,Wong WE,Li B.Experience report:How do techniques,programs,and tests impact automated program repair?In:Proc.of the IEEE 26th Int’l Symp.on Software Reliability Engineering.IEEE Computer Society,2015.194-204.
    [55]Qi Y,Mao X,Lei Y,Dai Z,Wang C.The strength of random search on automated program repair.In:Proc.of the 36th Int’l Conf.on Software Engineering.ACM Press,2014.254-265.
    [56]Ackling T,Alexander B,Grunert I.Evolving patches for software repair.In:Proc.of the 13th Annual Conf.on Genetic and Evolutionary Computation.ACM Press,2011.1427-1434.
    [57]Assiri FY,Bieman JM.An assessment of the quality of automated program operator repair.In:Proc.of the 2014 IEEE 7th Int’l Conf.on Software Testing,Verification and Validation(ICST).IEEE,2014.273-282.
    [58]Tan SH,Yoshida H,Prasad MR,Roychoudhury A.Anti-patterns in search-based program repair.In:Proc.of the 2016 24th ACMSIGSOFT Int’l Symp.on Foundations of Software Engineering.ACM Press,2016.727-738.
    [59]Fan L,Rinard M.Automatic patch generation by learning correct code.In:Proc.of the ACM Sigplan-Sigact Symp.on Principles of Programming Languages.ACM Press,2016.298-312.
    [60]Xiong YF,Liu XY,Zeng MH,Zhang L,Huang G.Identifying patch correctness in test-based program repair.In:Proc.of the 40th Int’l Conf.on Software Engineering.ACM Press,2018.789-799.
    [61]Jin G,Song L,Zhang W,Lu S,Liblit B.Automated atomicity-violation fixing.In:Proc.of the ACM Sigplan Conf.on Programming Language Design and Implementation.2011.389-400.
    [62]Jin G,Zhang W,Deng D,Liblit B,Lu S.Automated concurrency-bug fixing.In:Proc.of the Usenix Conf.on Operating Systems Design and Implementation.2012.221-236.
    [63]Park S,Lu S,Zhou Y.CTrigger:Exposing atomicity violation bugs from their hiding places.ACM Sigarch Computer Architecture News,2009,37(1):25-36.
    [64]Liu P,Zhang C.Axis:Automatically fixing atomicity violations through solving control constraints.In:Proc.of the Int’l Conf.on Software Engineering.IEEE,2012.299-309.
    [65]Liu P,Tripp O,Zhang C.Grail:Context-aware fixing of concurrency bugs.In:Proc.of the 22nd ACM SIGSOFT Int’l Symp.on Foundations of Software Engineering.ACM Press,2014.318-329.
    [66]Liu H,Chen Y,Lu S.Understanding and generating high quality patches for concurrency bugs.In:Proc.of the ACM Sigsoft Int’l Symp.on Foundations of Software Engineering.ACM Press,2016.715-726.
    [67]Joshi P,Naik M,Sen K,Gay D.An effective dynamic analysis for detecting generalized deadlocks.In:Proc.of the 18th ACMSIGSOFT Int’l Symp.on Foundations of Software Engineering.ACM Press,2010.327-336.
    [68]Cai Y,Cao L.Fixing deadlocks via lock pre-acquisitions.In:Proc.of the Int’l Conf.on Software Engineering.IEEE,2016.1109-1120.
    [69]Zhang W,Sun C,Lu S.ConMem:Detecting severe concurrency bugs through an effect-oriented approach.ACM SIGARCHComputer Architecture News,2010,38(1):179-192.
    [70]van Tonder R,Le Goues C.Static automated program repair for heap properties.In:Proc.of the 40th Int’l Conf.on Software Engineering(ICSE 2018).2018.151-162.
    [71]Nistor A,Chang PC.CARAMEL:Detecting and fixing performance problems that have non-intrusive fixes.In:Proc.of the 2015IEEE/ACM 37th IEEE Int’l Conf.on Software Engineering(ICSE).IEEE,2015.902-912.
    [72]Weiss A,Guha A,Brun Y.Tortoise:Interactive system configuration repair.In:Proc.of the 2017 32nd IEEE/ACM Int’l Conf.on Automated Software Engineering(ASE).IEEE,2017.625-636.
    [73]Xiong Y,Zhang H,Hubaux A,et al.Range fixes:Interactive error resolution for software configuration.IEEE Trans.on Software Engineering,2015,41(6):603-619.
    [74]Pei Y,Wei Y,Furia CA,Nordio M,Meyer B.Code-based automated program fixing.In:Proc.of the 26th IEEE/ACM Int’l Conf.on Automated Software Engineering.ACM Press,2011.392-395.
    [75]Yu P,Furia CA,Nordio M,Meyer B.Automatic program repair by fixing contracts.In:Proc.of the Int’l Conf.on Fundamental Approaches to Software Engineering.Springer-Verlag,2014.246-260.
    [76]Pei Y,Furia CA,Nordio M,Meyer B.Automated program repair in an integrated development environment.In:Proc.of the 37th Int’l Conf.on Software Engineering,Vol.2.IEEE Press,2015.681-684.
    [77]Jobstmann B,Griesmayer A,Bloem R.Program repair as a game.In:Proc.of the Int’l Conf.on Computer Aided Verification.Berlin,Heidelberg:Springer-Verlag,2005.226-238.
    [78]Essen CV,Jobstmann B.Program repair without regret.In:Proc.of the Int’l Conf.on Computer Aided Verification.SpringerVerlag,2013.896-911.
    [79]Kneuss E,Koukoutos M,Kuncak V.Deductive program repair.In:Proc.of the Int’l Conf.on Computer Aided Verification.Springer Int’l Publishing,2015.217-233.
    [80]Daniel B,Jagannath V,Dig D,Marinov D.ReAssert:Suggesting repairs for broken unit tests.In:Proc.of the 24th IEEE/ACM Int’l Conf.on Automated Software Engineering.2010.433-444.
    [81]Gao Z,Chen Z,Zou Y,Memon AM.SITAR:GUI test script repair.IEEE Trans.on Software Engineering,2016,42(2):170-186.
    [82]Gao Q,Zhang HS,Wang J,Xiong YF.Fixing recurring crash bugs via analyzing Q&A sites.In:Proc.of the 2015 30th IEEE/ACMInt’l Conf.on Automated Software Engineering(ASE).IEEE,2015.307-318.
    [83]Wang W,Zheng Y,Liu P,Xu L,Zhang X,Eugster P.ARROW:Automated repair of races on client-side Web pages.In:Proc.of the Int’l Symp.on Software Testing and Analysis.2016.201-212.
    [84]Gao F,Wang L,Li X.BovInspector:Automatic inspection and repair of buffer overflow vulnerabilities.In:Proc.of the IEEE/ACMInt’l Conf.on Automated Software Engineering.ACM Press,2016.786-791.
    [85]Cheng X,Zhou M,Song X,et al.IntPTI:Automatic integer error repair with proper-type inference.In:Proc.of the IEEE/ACMInt’l Conf.on Automated Software Engineering.IEEE,2017.996-1001.
    [86]Gupta R,Pal S,Kanade A,Shevade S.Deepfix:Fixing common C language errors by deep learning.In:Proc.of the 31st AAAIConf.on Artificial Intelligence(AAAI).2017.1345-1351.
    [87]Gopinath D,Khurshid S,Saha D,Chandra S.Data-guided repair of selection statements.In:Proc.of the 36th Int’l Conf.on Software Engineering.2014.243-253.
    [88]Mahajan S,Abolhassani N,McMinn P,Halfond GJ.Automated repair of mobile friendly problems in Web pages.In:Proc.of the40th Int’l Conf.on Software Engineering.ACM Press,2018.140-150.
    [7]玄跻峰,任志磊,王子元,谢晓园,江贺.自动程序修复方法研究进展.软件学报,2016,27(4):771-784.http://www.jos.org.cn/1000-9825/4972.htm[doi:10.13328/j.cnki.jos.004972]
    [8]王赞,郜健,陈翔,傅浩杰,樊向宇.自动程序修复方法研究述评.计算机学报,2018,41(3):588-610.
    [17]虞凯,林梦香.自动化软件错误定位技术研究进展.计算机学报,2011,34(8):1411-1422.
    [18]陈翔,鞠小林,文万志,顾庆.基于程序频谱的动态缺陷定位方法研究.软件学报,2015,26(2):390-412.http://www.jos.org.cn/1000-9825/4708.htm[doi:10.13328/j.cnki.jos.004708]
    [26]苏小红,禹振,王甜甜,马培军.并发缺陷暴露、检测与规避研究综述.计算机学报,2015,38(11):2215-2233.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700