66. DEEP TYPECHECKING AND REFACTORING
Department: Computer Science & Engineering
Faculty Advisor(s):
Sorin Lerner | Ranjit Jhala
Primary Student
Name: Zachary L Tatlock
Email: ztatlock@ucsd.edu
Phone: 952-221-2948
Grad Year: 2012
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 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 a 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.
The Deep Typechecking and Refactoring project addresses these challenges by investigating techniques for deep typechecking and refactoring in systems that combine Java code with a database back-end using the Java Persistence API (JPA). Deep typechecking ensures that dynamically constructed queries are type safe and that the values returned by the database are used safely by the Java program. Deep refactoring builds upon typechecking to allow programmers to safely and automatically propagate code refactorings through the flat query string fragments scattered throughout the code base.
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 Q UAIL 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.
Related Links: