ACM Home Page
Please provide us with feedback. Feedback
Deep typechecking and refactoring
Full text PdfPdf (354 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: Query integration table of contents
Pages 37-52  
Year of Publication: 2008
ISBN:978-1-60558-215-3
Also published in ...
Authors
Zachary Tatlock  UC San Diego, San Diego, CA, USA
Chris Tucker  UC San Diego, San Diego, CA, USA
David Shuffelton  UC San Diego, San Diego, CA, USA
Ranjit Jhala  UC San Diego, San Diego, CA, USA
Sorin Lerner  UC San Diego, San Diego, CA, USA
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 12,   Downloads (12 Months): 200,   Citation Count: 1
Additional Information:

abstract   references   cited by   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.1449768
What is a DOI?

ABSTRACT

Large software systems are typically composed of multiple layers, written in different languages and loosely coupled using a string-based interface. For example, in modern web-applications, a server written in Java communicates with a database back-end by passing in query strings. This widely prevalent approach is unsafe as the analyses developed for the individual layers are oblivious to the semantics of the dynamically constructed strings, making it impossible to statically reason about the correctness of the interaction. Further, even simple refactoring in such systems is daunting and error prone as the changes must also be applied to isolated string fragments scattered across the code base.

We present techniques for deep typechecking and refactoring for systems that combine Java code with a database back-end using the Java Persistence API [10]. Deep typechecking ensures that the queries that are constructed dynamically are type safe and that the values returned from the queries are used safely by the program. Deep refactoring builds upon typechecking to allow programmers to safely and automatically propagate code refactorings through the query string fragments.

Our algorithms are implemented in a tool called QUAIL. We present experiments evaluating the effectiveness of QUAIL on several benchmarks ranging from 3,369 to 82,907 lines of code.We show that QUAIL is able to verify that 84% of query strings in our benchmarks are type safe. Finally, we show that QUAIL reduces the number of places in the code that a programmer must look at in order to perform a refactoring by several orders of magnitude.


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
2
 
3
Aske Simon Christensen, Anders Møller, and Michael I. Schwartzbach. P recise analysis of string expressions. In SAS, pages 1--18, 2003.
4
 
5
Ezra Cooper, Sam Lindley, PhilipWadler, and Jeremy Yallop. Links: Web programming without tiers. In FMCO, LNCS 4709. Springer, 2006.
 
6
Jacques-Antoine Dub, Rick Sapir, and Peter Purich. Oracle application server toplink application developers guide, 10g (9.0.4). Oracle Corporation, 2 003.
7
 
8
G. Hamilton and R. Cattell. Jdbc: A java sql api. Sun Microsystems, 1 997.


Collaborative Colleagues:
Zachary Tatlock: colleagues
Chris Tucker: colleagues
David Shuffelton: colleagues
Ranjit Jhala: colleagues
Sorin Lerner: colleagues