摘要
时至今日,调试仍然占据软件开发过程中近70%的时间;以断点的设置和检查为基础的传统交互式调试依旧是实际工作中最常用的错误定位手段.日常调试过程中,断点的选择和调试的效率主要依赖于调试人员自身的经验以及对所调试程序的理解程度.提出一种基于最小调试边界的断点自动生成方法.最小调试边界描述了一个由程序执行轨迹上一组轨迹点构成的结合.该集合具有对错误传播的阻隔性,以及所对应的程序状态规模最小化的特征.受益于最小调试边界(minimum debugging frontier set,简称MDFS)的错误阻隔性,一旦查明其上的程序状态是否符合设计预期,即可确定错误触发位置与该MDFS在程序执行轨迹上的先后顺序,将错误触发的范围限定在MDFS的一侧.而状态规模的最小化也减轻了用户检查断点处语句实例的开销.为评价断点质量,还制定了一组断点评价标准,用于考量断点与程序失效之间的关联性、断点本身的易判性以及对调试收敛的帮助.实验结果表明,采用该方法生成的断点具有检查开销低、加速调试收敛等优势;采用所提供的断点的调试流程,与基于经典错误定位方法的流程相比,能以更低的人工开销定位更多的错误.
Until recently, debugging still takes almost 70% of the time in software engineering. The conventional debugging process, based on setting breakpoints and inspecting the states on them, remains the most common and useful way to detect faults. The efficiency of debugging differs a lot as both the selection and inspection of breakpoints are up to programmers. This paper presents a novel breakpoint generating approach based on a new concept named minimum debugging frontier sets (abbr. MDFS). A debugging frontier set describes a set of trace points, which have the ability of bug isolation, and a MDFS is the one with minimum size. Benefiting from the ability of bug isolation, the error suspicious domain will always be narrowed down to one side of the MDFS no matter the state of MDFS is proven correct or not. Breakpoints generated on the basis of MDFS also make the statement instances to be inspected at each breakpoint at the minimum. The paper also establishes a set of criterions to judge the quality of breakpoints. Empirical result indicates that breakpoints generated through this approach not only require low inspecting cost, but also have the ability to accelerate the efficiency of debugging. It also shows that this MDFS-based debugging prototype performs better than the state-of-art fault-localization techniques on the Siemens Suite.
出处
《软件学报》
EI
CSCD
北大核心
2013年第7期1455-1468,共14页
Journal of Software
基金
国家自然科学基金(61100011
60921002)
国家重点基础研究发展计划(973)(2011CB302504)
国家高技术研究发展计划(863)(2012AA010901)
国家核高基重大专项(2011ZX01028-001-002)
关键词
调试
断点
最小调试边界
错误定位
依赖分析
debugging
breakpoint
minimum debugging frontier set
fault localization
dependence analysis