OOPSLA 07: Software Structure

Wed 10:30-12:00 pm - Ponderosa A & B
Specifying and Implementing Refactorings
Max Schaefer, Oxford University Computing Laboratory, United Kingdom
Oege de Moor, Oxford University Computing Laboratory, United Kingdom

Modern IDEs for object-oriented languages like Java provide support for a basic set of simple automated refactorings whose behaviour is easy to describe intuitively. It is, however, surprisingly difficult to specify their behaviour in detail. In particular, the popular precondition-based approach tends to produce somewhat unwieldy descriptions if advanced features of the object language are taken into account. This has resulted in refactoring implementations that are complex, hard to understand, and even harder to maintain, yet these implementations themselves are the only precise "specification" of many refactorings. We have in past work advocated a different approach based on several complementary notions of dependencies that guide the implementation, and on the concept of microrefactorings that structure it. We show in this work that these concepts are powerful enough to provide high-level specifications of many of the refactorings implemented in Eclipse. These specifications are precise enough to serve as the basis of a clean-room reimplementation of these refactorings that is very compact, yet matches Eclipse's for features and outperforms it in terms of correctness.

A Graph-based Approach to API Usage Adaptation
Hoan Nguyen, Iowa State University, United States
Tung Nguyen, Iowa State University, United States
Gary Wilson, The University of Texas at Austin, United States
Anh T Nguyen, Iowa State University, United States
Miryung Kim, The University of Texas at Austin, United States
Tien Nguyen, Iowa State University, United States

Reusing existing library components is essential for reducing the cost of software development and maintenance. When library components evolve to accommodate new feature requests, to fix bugs, or to meet new standards, the clients of software libraries often need to make corresponding changes to correctly use the updated libraries. Existing API usage adaptation techniques such as CatchUp! or SemDiff support simple adaptation such as replacing the target of calls to a deprecated API, but cannot handle complex adaptations such as creating a new object to be passed to a different API method, and adding an exception handling logic that surrounds the updated API calls.

This paper presents LIBSYNC that guides developers in adapting API usage code by learning complex API usage adaptation patterns from other clients that migrated to a new library version already (and also from the API usages within the library's test code). LIBSYNC uses several graph-based techniques:

  1. to identify changes to API declarations by comparing two library versions,
  2. to extract associated API usage skeletons before and after library migration, and
  3. to compare the extracted API usage skeletons to recover API usage adaptation patterns.

Using the learned adaptation patterns, LIBSYNC recommends the locations and edit operations for adapting API usages. The evaluation of LIBSYNC on real-world software systems shows that it is highly correct and useful with a precision of 100% and a recall of 91%.

Component Adaptation and Assembly Using Interface Relations
Stephen Kell, University of Cambridge Computer Laboratory, United Kingdom

Software's expense owes partly to frequent reimplementation of similar functionality and partly to maintenance of patches, ports or components targeting evolving interfaces. More modular non-invasive approaches are unpopular because they entail laborious wrapper code. We describe Cake, a rule-based language describing compositions using interface relations. To evaluate it, we compare several existing wrappers with reimplemented Cake versions, finding the latter to be simpler and better modularised.

 

2009 Highlights

Robert JohnsonRobert Johnson discusses Facebook’s approach to scalability issues resulting from a large growth of the user base. He talks about: why one needs to prepare for horizontal and not vertical scalability, very short release cycles which are better because they introduce fewer bugs, the need to streamline to deploying process for short release cycles, and making the entire process faster every day.

Watch the video on InfoQ.

More Highlights