Carmine GRAVINO | Web appendix - ePAD
Carmine GRAVINO Web appendix - ePAD
Behavioral Design Pattern Detection based on Model Checking and Dynamic Analysis
by Andrea De Lucia, Vincenzo Deufemia, Carmine Gravino, Michele Risi
University of Salerno
Abstract:
We present a method and tool, named ePAD, for the detection of behavioral design pattern instances in source code. The approach combines static analysis, based on visual language parsing and model checking, and dynamic analysis, based on source code instrumentation. Visual language parsing and static source code analysis verify the structural properties of design pattern instances. Model checking statically verifies the behavioral aspects of design pattern instances. We encode the properties defining the correct behavior of a pattern as LTL (Linear Temporal Logic) formulae and the sequence diagram representing the possible in- teraction traces among the objects involved in the candidate instances as Promela specifications. The model checker SPIN verifies which candidates satisfy the LTL properties. Dynamic analysis is performed on the candidate instances identified statically by instrumenting the source code and monitoring those instances at run-time through the execution of a set of test cases automatically generated using a search-based approach. The effectiveness of ePAD has been evaluated by detecting instances of twelve behavioral design patterns from six publicly available software systems. The results reveal that ePAD outperforms other approaches by recovering more actual design pattern instances. Furthermore, on average ePAD achieves better results in terms of correctness and completeness.
Design patterns considered in the empirical study: ePAD was implemented to recover all the GoF design patterns [1], except Singleton, Mediator, CoR, FlyWeight, and Interpreter. Here we report and discuss the results obtained for behavioural design patterns, which represent the focus of the proposed recovery technique.
Software systems considered in the empirical study: JHotDraw 5.1 and 6.0, JUnit 3.7, JRefactory 2.6.24, QuickUML 2001, and MapperXML 1.9.7.
References
[1] J E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Menlo Park, CA, 1995.
[2] A. De Lucia, V. Deufemia, C. Gravino, M. Risi, “Design Pattern Recovery through Visual Language Parsing and Source Code Analysis”, Journal of System & Software, vol. 18, no. 7, pp. 1177-1193, 2009.
[3] A. De Lucia, V. Deufemia, C. Gravino, M. Risi, “Behavioral Pattern Identification through Visual Language Parsing and Code Instrumentation”, in Proc. of European Conference on Software Maintenance and Reengi- neering (CSMR’09), pp. 99-108, 2009.
[4] A. De Lucia, V. Deufemia, C. Gravino, M. Risi, “Improving Behavioral Design Pattern Detection through Model Checking”, Proc. of European Conference on Software Maintenance and Reengineering (CSMR’10), pp. 176-185, 2010.
Correlati
POO 2018 |