Locating faults through automated predicate switching

X. Zhang, Neelam Gupta, Rajiv Gupta
{"title":"Locating faults through automated predicate switching","authors":"X. Zhang, Neelam Gupta, Rajiv Gupta","doi":"10.1145/1134285.1134324","DOIUrl":null,"url":null,"abstract":"Typically debugging begins when during a program execution a point is reached at which an obviously incorrect value is observed. A general and powerful approach to automated debugging can be based upon identifying modifications to the program state that will bring the execution to a successful conclusion. However, searching for arbitrary changes to the program state is difficult due to the extremely large search space. In this paper we demonstrate that by forcibly switching a predicate's outcome at runtime and altering the control flow, the program state can not only be inexpensively modified, but in addition it is often possible to bring the program execution to a successful completion (i.e., program produces the desired output). By examining the switched predicate, also called the critical predicate, the cause of the bug can then be identified. Since the outcome of a branch can only be either true or false, the number of modified states resulting by predicate switching is far less than those possible through arbitrary state changes. Thus, it is possible to automatically search through modified states to find one that leads to the correct output. We have developed an implementation based upon dynamic instrumentation to perform this search through program re-execution -- the program is executed from the beginning and a predicate's outcome is switched to produce the desired change in control flow. To evaluate our approach, we tried our technique on several reported bugs for a number of UNIX utility programs. Our technique was found to be practical (i.e., acceptable in time taken) and effective (i.e., we were able to automatically identify critical predicates). Moreover we show that bidirectional dynamic slices of critical predicates capture the faulty code.","PeriodicalId":246572,"journal":{"name":"Proceedings of the 28th international conference on Software engineering","volume":"46 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2006-05-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"277","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 28th international conference on Software engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1134285.1134324","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 277

Abstract

Typically debugging begins when during a program execution a point is reached at which an obviously incorrect value is observed. A general and powerful approach to automated debugging can be based upon identifying modifications to the program state that will bring the execution to a successful conclusion. However, searching for arbitrary changes to the program state is difficult due to the extremely large search space. In this paper we demonstrate that by forcibly switching a predicate's outcome at runtime and altering the control flow, the program state can not only be inexpensively modified, but in addition it is often possible to bring the program execution to a successful completion (i.e., program produces the desired output). By examining the switched predicate, also called the critical predicate, the cause of the bug can then be identified. Since the outcome of a branch can only be either true or false, the number of modified states resulting by predicate switching is far less than those possible through arbitrary state changes. Thus, it is possible to automatically search through modified states to find one that leads to the correct output. We have developed an implementation based upon dynamic instrumentation to perform this search through program re-execution -- the program is executed from the beginning and a predicate's outcome is switched to produce the desired change in control flow. To evaluate our approach, we tried our technique on several reported bugs for a number of UNIX utility programs. Our technique was found to be practical (i.e., acceptable in time taken) and effective (i.e., we were able to automatically identify critical predicates). Moreover we show that bidirectional dynamic slices of critical predicates capture the faulty code.
通过自动谓词切换定位故障
通常,在程序执行过程中,当到达一个观察到明显错误值的点时,调试就开始了。一种通用的、强大的自动调试方法可以基于对程序状态的修改进行识别,这些修改将使执行成功结束。然而,由于极大的搜索空间,搜索程序状态的任意变化是困难的。在本文中,我们证明了通过在运行时强制切换谓词的结果和改变控制流,程序状态不仅可以被廉价地修改,而且通常可以使程序执行成功完成(即程序产生期望的输出)。通过检查切换谓词(也称为关键谓词),就可以确定错误的原因。由于分支的结果只能为真或假,因此由谓词切换导致的修改状态的数量远远少于通过任意状态更改可能产生的数量。因此,可以自动搜索修改后的状态,以找到导致正确输出的状态。我们已经开发了一种基于动态检测的实现,通过程序重新执行来执行这种搜索——程序从头开始执行,并切换谓词的结果,以在控制流中产生所需的更改。为了评估我们的方法,我们在一些UNIX实用程序的几个报告错误上尝试了我们的技术。我们的技术被发现是实用的(即,在时间上是可接受的)和有效的(即,我们能够自动识别关键谓词)。此外,我们还展示了关键谓词的双向动态切片捕获错误代码。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信