Program execution summarization by novel design pattern specification, detection, and consolidation techniques

Aswathy Mohan, Bharat Jayaraman · Array · 2025

Programming languages have evolved to embrace higher levels of abstraction, with object-oriented languages like Java and C# becoming dominant in large-scale software development due to their support for both data and control abstractions. Design patterns take abstraction to greater levels by devising reusable solutions for recurrent problems that abstract a set/sequence of object state transitions and inter-object interactions. They are indispensable for software developers since they help achieve well-structured and reusable object-oriented code, thereby contributing towards ease of comprehension, maintenance, and refactoring. However, design patterns do not lend themselves to easy identification from the source code, often due to the absence of syntactic cues. This topic has therefore attracted considerable interest in the field. In this work, we devise novel techniques to identify and summarize software so as to achieve the goal of software comprehension. Our work is carried out in the context of Java and JIVE, which help us build a comprehensive program structure (referred to as augmented call tree), that combines the static and dynamic information of the program and is amenable to traversal and ease of pattern search. In our earlier work, we proposed a set of primitives using which we can declaratively specify design patterns based on a combination of static and dynamic information. Each declarative pattern specification is automatically translated into an SQL query that retrieves all instances of the design patterns present in the program. In this work, we propose a range of consolidation techniques that derive different forms of visual summaries to provide different perspectives of the software. We illustrate our approach using well-known Gang-of-Four design patterns, and experimental results demonstrate its efficacy through quantitative and qualitative case studies on large applications such as JHotDraw, JUnit, and QuickUML.

Read the paper · More papers on PaperTik