API Conformance Verification for Java Programs

Software components, services, or modules are used via their application programming interface (API). For any sufficiently complex component, there are strict rules on the order and context in which particular methods of the API can be invoked. For example, a file must be opened before reading, and not read after closing. These constraints are called API conformance rules. Their violation at run-time creates errors, which are often subtle and difficult to diagnose. In general, API conformance rules cannot be statically checked if concurrency is involved. We present a verification framework, called Fex, that assists in Java API conformance verification. Fex operates as follows. The first step is to express the API conformance rules as executable specifications. Then, the program under investigation is instrumented such that all potential exceptions can be easily raised. Next, the program is sliced to retain only control flow and the relevant APIs. The executable API conformance rules and sliced program are then processed by the Java Path Finder model checker. Possible violations of the conformance rules are exhibited as exceptions during model checking. We have successfully applied our framework to the TSAFE reference air traffic control system and identified a subtle deadlock missed by previous verification efforts.

[1]  Forrest Shull,et al.  An evolutionary testbed for software technology evaluation , 2005, Innovations in Systems and Software Engineering.

[2]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

[3]  Steven P. Reiss Specifying and checking component usage , 2005, AADEBUG'05.

[4]  Martin P. Robillard,et al.  Static analysis to support the evolution of exception structure in object-oriented systems , 2003, TSEM.

[5]  Jonathan Aldrich,et al.  Practical API Protocol Checking with Access Permissions , 2009, ECOOP.

[6]  Deepak Goyal,et al.  Deriving specialized program analyses for certifying component-client conformance , 2002, PLDI '02.

[7]  Xin Li,et al.  Towards Automatic Exception Safety Verification , 2006, FM.

[8]  Xin Li Fex: A Model Checking Framework for Event Sequences , 2008 .

[9]  Mark Weiser,et al.  Program Slicing , 1981, IEEE Transactions on Software Engineering.

[10]  Gregory D. Dennis TSAFE: Building a Trusted Computing Base for Air Traffic Control Software , 2003 .

[11]  Eran Yahav,et al.  Effective typestate verification in the presence of aliasing , 2006, TSEM.

[12]  Martin Odersky ECOOP 2004 – Object-Oriented Programming , 2004, Lecture Notes in Computer Science.

[13]  Jonathan Aldrich,et al.  Api protocol compliance in object-oriented software , 2009 .

[14]  Robert E. Strom,et al.  Typestate: A programming language concept for enhancing software reliability , 1986, IEEE Transactions on Software Engineering.

[15]  Robert DeLine,et al.  Typestates for Objects , 2004, ECOOP.

[16]  Tevfik Bultan,et al.  Eliminating synchronization faults in air traffic control software via design for verification with concurrency controllers , 2007, Automated Software Engineering.

[17]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.