Synthesis of interface specifications for Java']Java classes

被引:133
作者
Alur, R [1 ]
Cerny, P [1 ]
Madhusudan, P [1 ]
Nam, W [1 ]
机构
[1] Univ Penn, Dept Comp & Informat Sci, Philadelphia, PA 19104 USA
关键词
algorithms; verification; behavioral interfaces; synthesis; software components; abstraction; model checking; games; learning regular languages;
D O I
10.1145/1047659.1040314
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
While a typical software component has a clearly specified (static) interface in terms of the methods and the input/output types they support, information about the correct sequencing of method calls the client must invoke is usually undocumented. In this paper, we propose a novel solution for automatically extracting such temporal specifications for Java classes. Given a Java class; and a safety property such as "the exception E should not be raised", the corresponding (dynamic) interface is the most general way of invoking the methods in the class so that the safety property is not violated. Our synthesis method first constructs a symbolic representation of the finite state-transition system obtained from the class using predicate abstraction. Constructing the interface then corresponds to solving a partial-information two-player game on this symbolic graph. We present a sound approach to solve this computationally-hard problem approximately using algorithms for learning finite automata and symbolic model checking for branching-time logics. We describe an implementation of the proposed techniques in the tool JIST-Java Interface Synthesis Tool-and demonstrate that the tool can construct interfaces accurately and efficiently for sample Java2SDK library classes.
引用
收藏
页码:98 / 109
页数:12
相关论文
共 32 条
[1]  
ABRAMSKY S, 2002, SEMANTICS INTERACTIO
[2]   Alternating-time temporal logic [J].
Alur, R ;
Henzinger, TA ;
Kupferman, O .
JOURNAL OF THE ACM, 2002, 49 (05) :672-713
[3]   Mining specifications [J].
Ammons, G ;
Bodík, R ;
Larus, JR .
ACM SIGPLAN NOTICES, 2002, 37 (01) :4-16
[4]   LEARNING REGULAR SETS FROM QUERIES AND COUNTEREXAMPLES [J].
ANGLUIN, D .
INFORMATION AND COMPUTATION, 1987, 75 (02) :87-106
[5]   Automatic predicate abstraction of C programs [J].
Ball, T ;
Millstein, T ;
Majumdar, R ;
Rajamani, SK .
ACM SIGPLAN NOTICES, 2001, 36 (05) :203-213
[6]  
BALL T, 2002, POPL, P1
[7]  
Barringer H., 2003, P 2 INT WORKSH SPEC
[8]  
BERG T, 2003, P INT WORKSH SOFTW V
[9]  
CHAKRABARTI A, 2002, LNCS, V2404, P428
[10]  
Cimatti A., 2002, LNCS, P359, DOI [10.1007/3-540-45657-0_29, DOI 10.1007/3-540-45657-0_29]