Functionality versus Practicality: Employing Existing Tools for Recovering Structural Design Patterns

The object-oriented design community has recently begun to collect so-called software design patterns : descriptions of proven solutions common software design problems, packaged in a description that includes a problem, a context, a solution, and its properties. Design pattern information can improve the maintainability of software, but is often absent in program documentation. We present a system called Pat for localizing instances of structural design patterns in existing C++ software. It relies extensively on a commercial CASE tool and a PROLOG interpreter, resulting in a simple and robust architecture that cannot solve the problem completely, but is industrial-strength; it avoids the brittleness that many reverse engineering tools exhibit when applied to realistic software. To evaluate Pat, we quantify its performance in terms of precision and recall. We examine four applications, including the popular class libraries zApp and LEDA. Within Pat's restrictions all pattern instances are found, the precision is about 40 percent, and manual ltering of the false positives is relatively easy. Therefore, we consider Pat a good compromise: modest functionality, but high practical stability for recovering design information. CR classi cation: D2.2 CASE, D.2.6, D.2.7 documentation, D.2.10 representation, I.5.5 General terms: Algorithms, Design, Measurement.