Abstract
A design pattern is a recurring and well-understood design fragment. In a model-driven engineering methodology, detecting occurrences of design patterns supports the activities of model comprehension and maintenance. With the recent explosion of domain-specific modeling languages, each with its own syntax and semantics, there has been a corresponding explosion in approaches to detecting design patterns that are so much tailored to those many languages that they are difficult to reuse. This makes developing generic analysis tools extremely hard. Such a generic tool is however desirable to reduce the learning curve for pattern designers as they specify patterns for different languages used to model different aspects of a system. In this paper, we propose a unified approach to detecting design patterns of MOF-based modeling languages. MOF is increasingly used to define modeling languages, including UML and BPMN. In our approach, a pattern is modeled with a Visual Pattern Modeling Language and mapped to a corresponding QVT-Relations transformation. Such a transformation runs over an input model where pattern occurrences are to be detected and reports those occurrences in a result model. The approach is prototyped on Eclipse and validated in two large case studies that involve detecting design patterns—specifically a subset of GoF patterns in a UML model and a subset of Control Flow patterns in a BPMN model. Results show that the approach is adequate for modeling complex design patterns for MOF-based modeling languages and detecting their occurrences with high accuracy and performance.
Similar content being viewed by others
References
Model-driven engineering. http://en.wikipedia.org/wiki/Model-driven_engineering
Booch, G.: Handbook of Software Architecture. http://www.handbookofsoftwarearchitecture.com
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, MA (1995)
Unified Modeling Language (UML), Superstructure v2.4. http://www.omg.org/spec/UML/2.4/Superstructure/PDF
Russell, N., Hofstede, A., Aalst, W., Mulyar, N.: Workflow control-flow patterns: a revised view. BPM Center Report BPM-06-22, BPMcenter.org (2006)
Business Process Model and Notation (BPMN) v2.0. http://www.omg.org/spec/BPMN/2.0/PDF
Kerievsky, J.: Refactoring to Patterns. Addison-Wesley, Reading, MA (2004)
Ambler, S.: Agile Modeling: Effective Practices for eXtreme Programming and the Unified Process. Wiley, New York, NY (2002)
Chikofsky, E., Cross, J.: Reverse engineering and design recovery: a taxonomy. IEEE Softw. 7(1), 13–17 (1990)
Elaasar, M., Briand, L., Labiche, Y.: Domain-specific model verification with QVT. In: ECMFA’11. LNCS, vol. 6698, pp. 282–298 (2011)
Meta Object Facility (MOF) Core v2.0. http://www.omg.org/spec/MOF/2.0/
Object Constraint Language (OCL) v2.2. http://www.omg.org/spec/OCL/2.2/
Query/View/Transformation (QVT) v1.1. http://www.omg.org/spec/QVT/1.1/
ATL Transformation Language. http://www.eclipse.org/atl/
Steinberg, D., Budinsky, F., Paternostro M., Merks, E.: EMF: Eclipse Modeling Framework, 2nd edition. Addison-wesley, Boston, MA (2009)
Graphical Modeling Framework (GMF). http://www.eclipse.org/gmf/
Medini QVT. http://projects.ikv.de/qvt
Fulop, L., Ferenc R., Gyimothy, T.: Towards a benchmark for evaluating design pattern miner tools. In: Proceedings of CSMR, pp. 143–152 (2008)
Dong, J., Zhao, Y., Peng, T.: Architecture and design pattern discovery techniques—a review. In: Software Engineering Research and Practice, pp. 621–627 (2007)
Birkner, M.: Objected-oriented design pattern detection using static and dynamic analysis in Java Software. Master Thesis, University of Applied Sciences Bonn-Rhein-Sieg, Germany (2007)
Huang, H., Zhang, S., Cao, J., Duan, Y.: A practical pattern recovery approach based on both structural and behavioral analysis. J. Syst. Softw. 75(1–2), 69–87 (2005)
Mikkonen, T.: Formalizing design patterns. In: Proceedings of International Conference on Software Engineering, pp. 115–124 (1998)
Taibi, T., Check, D., Ngo, L.: Formal specification of design patterns—a balanced approach. J. Object Technol. 2(4), 127–140 (2003)
Eden, A., Hirshfeld, Y., Lundqvist, K.: LePUS—Symbolic logic modeling of object oriented architectures: a case study. University of Karlskrona. In: Proceedings of Second Nordic Workshop on Software Architecture (1999)
Beyer, D., Noack, A., Lewerentz, C.: Efficient relational calculation for software analysis. IEEE Trans. Softw. Eng. 31(2), 137–149 (2005)
Dijkmana, R., Dumasb, M., Ouyangc, C.: Semantics and analysis of business process models in BPMN. Inf. Softw. Technol. 50(12), 1281–1294 (2008)
Seemann, J., Gudenberg, J.: Pattern-based design recovery of Java software. In: Proceedings of the 6th International Symposium on Foundations of Software Engineering, pp. 10–16 (1998)
Eppstein, D.: Subgraph isomorphism in planar graphs and related problems. In: Proceedings of 6th Annual Symposium on Discrete Algorithms, pp. 632–640 (1995)
Pettersson, N., Lowe, W.: Efficient and accurate software pattern detection. In: Proceedings of 13th Asia Pacific, Software Engineering Conference, pp. 317–326 (2006)
Rudolf, M.: Utilizing constraint satisfaction techniques for efficient graph pattern matching. In: Proceedings of 6th International Workshop on Theory and Application of Graph Transformations. LNCS, vol. 1764, pp. 238–251, London (1998)
Dong, J., Lad, D., Zhao, Y.: DP-Miner: design pattern discovery using matrix. In: Proceedings of 14th IEEE International Conference on Engineering of Computer-Based Systems, pp. 371–380 (2007)
Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., Halkidis, S.: Design pattern detection using similarity scoring. IEEE Trans. Softw. Eng. 32(11), 896–909 (2006)
Gueheneuc, Y., Sahraoui, H., Zaidi, F.: Fingerprinting design patterns. In: Proceedings of the 11th Working Conference on Reverse Engineering, pp. 172–181 (2004)
Le Guennec, A., Sunye, G., Jezequel, J.: Precise modeling of design patterns. In: Proceedings of UML 2000. LNCS, vol. 1939, pp. 482–496 (2000)
Mak, J., Choy, C., Lun, D.: Precise modeling of design patterns in UML. In: Proceedings of International Conference of Software Engineering, pp. 252–261 (2004)
Milicev, D.: Model-Driven Development with Executable UML. Wiley, New York, NY (2009)
Elaasar, M., Briand, L., Labiche, Y.: A metamodeling approach to pattern specification. Model driven engineering languages and systems. LNCS, vol. 4199, pp. 484–498 (2006)
Kim, D.-K., Shen, W.: Evaluating pattern conformance of UML models: a divide-and-conquer approach and case studies. Softw. Qual. J. 16(3), 329–359 (2008)
Maplesden, D., Hosking, J., Grundy, J.: Design pattern modeling and instantiation using DPML. In: Proceedings of TOOLS Pacific, pp. 3–11 (2002)
Gueheneuc, Y.-G., Antoniol, G.: DeMIMA: a multilayered approach for design pattern identification. IEEE Trans. Softw. Eng. 34(5), 667–684 (2008)
Bayley, I., Zhu, H.: Formal specification of the variants and behavioral features of design patterns. J. Syst. Softw. 83(2), 209–221 (2010)
Milicev, D.: Automatic model transformations using extended UML object diagrams in modeling environments. IEEE Trans. Softw. Eng. 28(4), 413–431 (2002)
Varro, G., Friedl, K., Varro, D.: Adaptive graph pattern matching for model transformations using model-sensitive search plans. In: Proceedings of GraMot 2005, vol. 152, pp. 191–205 (2005)
Fujaba Tool Suite RE. http://www2.cs.uni-paderborn.de/cs/ag-schaefer/Lehre/PG/FUJABA/projects/reengineering/index.html
Wikipedia: Adder. http://en.wikipedia.org/wiki/Adder_(electronics)
Pettersson, N., Lowe, W., Nive, J.: Evaluation of accuracy in design pattern occurrence detection. IEEE Trans. Softw. Eng. 36(4), 575–590 (2009)
Model to Text (M2T). http://www.eclipse.org/m2t/
Acceleo: transforming models into code. http://www.eclipse.org/acceleo/
GMF Design Model. https://sites.google.com/site/designpatterndetection/gmf-design-model
Smith, J.: SPQR: formal foundations and practical support for the automated detection of design patterns from source code. PhD Dissertation, Computer Science Dept., University of North Carolina at Chapel Hill (2005)
GoF Specifications in VPML. https://sites.google.com/site/designpatterndetection/gof-specifications
Atwood, D.: BPM process patterns: repeatable design for BPM process models. BPTrends. http://www.bptrends.com/publicationfiles/05-06-WP-BPMProcessPatterns-Atwood1.pdf (2006)
Gschwind, T., Koehler, J., Wong, J.: Applying patterns during business process modeling. In: Proceedings of the 6th International Conference on Business Process Management. LNCS, vol. 5240, pp. 4–19 (2008)
CF Specifications in VPML. https://sites.google.com/site/designpatterndetection/cf-specifications
Elaasar, M., Briand, L., Labiche, Y.: An approach to the specification and detection of MOF-based modeling languages. Ph.D. Thesis, School of Systems and Computer Engineering, Carleton University (2012)
Systems Modeling Language (SysML), v1.2. http://www.omg.org/spec/SysML/1.2/
MARTE: modeling and analysis of real-time embedded systems v1.0. http://www.omg.org/spec/MARTE/1.0/
Acknowledgments
Maged Elaasar was supported by IBM Canada Ltd. Lionel Briand was partly supported by a PEARL grant from the National Research Fund, Luxembourg (FNR/P10/03-Validation and Verification Laboratory). Yvan Labiche was partly supported by a NSERC Discovery grant.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Dr. Ana Moreira.
Rights and permissions
About this article
Cite this article
Elaasar, M., Briand, L.C. & Labiche, Y. VPML: an approach to detect design patterns of MOF-based modeling languages. Softw Syst Model 14, 735–764 (2015). https://doi.org/10.1007/s10270-013-0325-9
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-013-0325-9