Mining specifications

被引:310
作者
Ammons, G
Bodík, R
Larus, JR
机构
[1] Univ Wisconsin, Dept Comp Sci, Madison, WI 53706 USA
[2] Microsoft Res, Redmond, WA USA
关键词
D O I
10.1145/565816.503275
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Program verification is a promising approach to improving program quality. because it can search all possible program executions for specific errors. However. the need to formally describe correct behavior or errors is a major barrier to the widespread adoption of program verification, since programmers historically have been reluctant to write formal specifications. Automating the process of formulating specification, would remove a barrier to program verification and enhance its practicality. This paper describes specification mining, a machine learning approach to discovering formal specification, of the protocols that code must obey when interacting with an application program interface or abstract data type. Starting from the assumption that a working program is well enough debugged to reveal strong hints of correct protocols, our tool infers a specification by observing program execution and concisely summarizing the frequent interaction patterns as state machines that capture both temporal and data dependences. These state machines can be examined by a programmer, to refine the specification and identity errors, and can be utilized by automatic verification tools, to find bugs. Our preliminary experience with the mining tool has been promising. We were able to learn specifications that not only captured the correct protocol, but also discovered serious bugs.
引用
收藏
页码:4 / 16
页数:13
相关论文
共 28 条
[1]  
Ball T, 2001, ACM SIGPLAN NOTICES, P97
[2]  
BALL T, 2001, PROGRAMMING LANGUAGE, P203, DOI DOI 10.1145/378795.378846
[3]  
BALL T, 2001, LECT NOTES COMPUTER, V2057, P103
[4]   SYNTHESIS OF FINITE-STATE MACHINES FROM SAMPLES OF THEIR BEHAVIOR [J].
BIERMANN, AW ;
FELDMAN, JA .
IEEE TRANSACTIONS ON COMPUTERS, 1972, C 21 (06) :592-&
[5]  
Bush WR, 2000, SOFTWARE PRACT EXPER, V30, P775, DOI 10.1002/(SICI)1097-024X(200006)30:7<775::AID-SPE309>3.0.CO
[6]  
2-H
[7]  
CHOU A, 2001, P 18 ACM S OP SYST P, P73, DOI DOI 10.1145/502034.502042
[8]  
Comer DE., 1993, INTERNETWORKING TCP
[9]  
Cook J. E., 1998, ACM Transactions on Software Engineering and Methodology, V7, P215, DOI 10.1145/287000.287001
[10]  
DeLine Robert., 2001, Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, P59, DOI DOI 10.1145/381694.378811