软件学报
軟件學報
연건학보
JOURNAL OF SOFTWARE
2013年
7期
1455-1468
,共14页
李丰%霍玮%陈聪明%李龙%衷璐洁%冯晓兵
李豐%霍瑋%陳聰明%李龍%衷璐潔%馮曉兵
리봉%곽위%진총명%리룡%충로길%풍효병
调试%断点%最小调试边界%错误定位%依赖分析
調試%斷點%最小調試邊界%錯誤定位%依賴分析
조시%단점%최소조시변계%착오정위%의뢰분석
debugging%breakpoint%minimum debugging frontier set%fault localization%dependence analysis
时至今日,调试仍然占据软件开发过程中近70%的时间;以断点的设置和检查为基础的传统交互式调试依旧是实际工作中最常用的错误定位手段。日常调试过程中,断点的选择和调试的效率主要依赖于调试人员自身的经验以及对所调试程序的理解程度。提出一种基于最小调试边界的断点自动生成方法。最小调试边界描述了一个由程序执行轨迹上一组轨迹点构成的结合。该集合具有对错误传播的阻隔性,以及所对应的程序状态规模最小化的特征。受益于最小调试边界(minimum debugging frontier set,简称MDFS)的错误阻隔性,一旦查明其上的程序状态是否符合设计预期,即可确定错误触发位置与该MDFS在程序执行轨迹上的先后顺序,将错误触发的范围限定在MDFS的一侧。而状态规模的最小化也减轻了用户检查断点处语句实例的开销。为评价断点质量,还制定了一组断点评价标准,用于考量断点与程序失效之间的关联性、断点本身的易判性以及对调试收敛的帮助。实验结果表明,采用该方法生成的断点具有检查开销低、加速调试收敛等优势;采用所提供的断点的调试流程,与基于经典错误定位方法的流程相比,能以更低的人工开销定位更多的错误。
時至今日,調試仍然佔據軟件開髮過程中近70%的時間;以斷點的設置和檢查為基礎的傳統交互式調試依舊是實際工作中最常用的錯誤定位手段。日常調試過程中,斷點的選擇和調試的效率主要依賴于調試人員自身的經驗以及對所調試程序的理解程度。提齣一種基于最小調試邊界的斷點自動生成方法。最小調試邊界描述瞭一箇由程序執行軌跡上一組軌跡點構成的結閤。該集閤具有對錯誤傳播的阻隔性,以及所對應的程序狀態規模最小化的特徵。受益于最小調試邊界(minimum debugging frontier set,簡稱MDFS)的錯誤阻隔性,一旦查明其上的程序狀態是否符閤設計預期,即可確定錯誤觸髮位置與該MDFS在程序執行軌跡上的先後順序,將錯誤觸髮的範圍限定在MDFS的一側。而狀態規模的最小化也減輕瞭用戶檢查斷點處語句實例的開銷。為評價斷點質量,還製定瞭一組斷點評價標準,用于攷量斷點與程序失效之間的關聯性、斷點本身的易判性以及對調試收斂的幫助。實驗結果錶明,採用該方法生成的斷點具有檢查開銷低、加速調試收斂等優勢;採用所提供的斷點的調試流程,與基于經典錯誤定位方法的流程相比,能以更低的人工開銷定位更多的錯誤。
시지금일,조시잉연점거연건개발과정중근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.