ACM Home Page
Please provide us with feedback. Feedback
Enforcing object protocols by combining static and runtime analysis
Full text PdfPdf (307 KB)
Source
Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications table of contents
Nashville, TN, USA
SESSION: Formal methods table of contents
Pages 245-260  
Year of Publication: 2008
ISBN:978-1-60558-215-3
Also published in ...
Authors
Madhu Gopinathan  Indian Institute of Science, Bangalore, India
Sriram K. Rajamani  Microsoft Research India, Bangalore, India
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 21,   Downloads (12 Months): 110,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1449764.1449784
What is a DOI?

ABSTRACT

In this paper, we consider object protocols that constrain interactions between objects in a program. Several such protocols have been proposed in the literature. For many APIs (such as JDOM, JDBC), API designers constrain how API clients interact with API objects. In practice, API clients violate such constraints, as evidenced by postings in discussion forums for these APIs. Thus, it is important that API designers specify constraints using appropriate object protocols and enforce them. The goal of an object protocol is expressed as a protocol invariant. Fundamental properties such as ownership can be expressed as protocol invariants. We present a language, PROLANG, to specify object protocols along with their protocol invariants, and a tool, INVCOP++, to check if a program satisfies a protocol invariant. INVCOP++ separates the problem of checking if a protocol satisfies its protocol invariant (called protocol correctness), from the problem of checking if a program conforms to a protocol (called program conformance). The former is solved using static analysis, and the latter using runtime analysis. Due to this separation (1) errors made in protocol design are detected at a higher level of abstraction, independent of the program's source code, and (2) performance of conformance checking is improved as protocol correctness has been verified statically. We present theoretical guarantees about the way we combine static and runtime analysis, and empirical evidence that our tool INVCOP++ finds usage errors in widely used APIs. We also show that statically checking protocol correctness greatly optimizes the overhead of checking program conformance, thus enabling API clients to test whether their programs use the API as intended by the API designer.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
AspectJ -- http://www.eclipse.org/aspectj/.
2
 
3
M. Barnett, R. DeLine, M. Fähndrich, K. R. M. Leino, and W. Schulte. Verification of object-oriented programs with invariants. JOT, 3(6):27--56, 2004.
 
4
M. Barnett, K. R. M. Leino, and W. Schulte. The Spec# programming system: An overview. In CASSIS 04: Construction and Analysis of Safe, Secure and Interoperable Smart devices, LNCS 3362. Springer Verlag, 2004.
 
5
M. Barnett and D. A. Naumann. Friends need a bit more: Maintaining invariants over shared state. In MPC, pages 54--84. Springer-Verlag, 2004.
6
7
8
9
 
10
 
11
 
12
13
14
15
16
 
17
 
18
M. Gopinathan and S. Rajamani. Runtime monitoring of object invariants with guarantee. In RV '08: Runtime Verification, LNCS 5289. Springer, 2008.
19
20
 
21
 
22
 
23
JDOM -- http://www.jdom.org.
 
24
JDOM FAQ -- http://www.jdom.org/docs/faq.html#a0390.
 
25
G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. V. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In ECOOP, pages 220--242, 1997.
 
26
G. Leavens and Y. Cheon. Design by contract with jml, 2003.
 
27
 
28
MySQL -- http://www.mysql.com.
 
29
 
30

Collaborative Colleagues:
Madhu Gopinathan: colleagues
Sriram K. Rajamani: colleagues