A General Framework to Detect Design Patterns by Combining Static and Dynamic Analysis Techniques
Autor: | Cong Liu |
---|---|
Rok vydání: | 2021 |
Předmět: |
Computer Networks and Communications
business.industry Computer science 020207 software engineering Usability 02 engineering and technology Computer Graphics and Computer-Aided Design Artificial Intelligence Software design pattern 0202 electrical engineering electronic engineering information engineering 020201 artificial intelligence & image processing Creational pattern business Software engineering Software Design pattern detection Software comprehension |
Zdroj: | International Journal of Software Engineering and Knowledge Engineering. 31:21-54 |
ISSN: | 1793-6403 0218-1940 |
DOI: | 10.1142/s0218194021400027 |
Popis: | Design pattern detection can provide useful insights to support software comprehension. Accurate and complete detection of pattern instances are extremely important to enable software usability improvements. However, existing design pattern detection approaches and tools suffer from the following problems: incomplete description of design pattern instances, inaccurate behavioral constraint checking, and inability to support novel design patterns. This paper presents a general framework to detect design patterns while solving these issues by combining static and dynamic analysis techniques. The framework has been instantiated for typical behavioral and creational patterns, such as the observer pattern, state pattern, strategy pattern, and singleton pattern to demonstrate the applicability. Based on the open-source process mining toolkit ProM, we have developed an integrated tool that supports the whole detection process for these patterns. We applied and evaluated the framework using software execution data containing around 1,000,000 method calls generated from eight synthetic software systems and three open-source software systems. The evaluation results show that our approach can guarantee a higher precision and recall than existing approaches and can distinguish state and strategy patterns that are indistinguishable by the state-of-the-art. |
Databáze: | OpenAIRE |
Externí odkaz: |