Abstract
In software reuse, the reuse of UML class diagram produced in design phase has received more attention due to the important influence on the following developing process. The reuse is based on similarity. The similarity between class diagrams contains semantic and structural aspects. The existing works focus on semantic similarity, while the structural similarity is little paid attention to. The structure of class diagram can be categorized into two aspects: intra-structure and inter-structure. The intra-structure refers to the composition of each class, and the inter-structure is represented as the relationships between classes. So, the structural similarity measure should be carried out from these two aspects. In this paper, we propose to use a graph named UML class graph (UCG) to represent a class diagram for the structural similarity measure. An algorithm based on UCG Maximum Common Subgraph Sequence is proposed for the inter-structure similarity measure, and UCG edit distance is proposed and introduced to the intra-structure similarity measure. The experimental results show that our proposed approach is effective within a domain or across domains.
Similar content being viewed by others
References
Krueger CW (1992) Software reuse. ACM Comput Surv 24(2):131–183
Prieto-Diaz R (1993) Status report: software reusability. IEEE Softw 10(3):61–66
Prieto-Diaz R (1993) Software reuse: issues and experiences. Am Progr 6(8):10–18
Mili H, Mili F, Mili A (1995) Reusing software: issues and research directions. IEEE Trans Softw Eng 22(6):528–562
Kim Yongbeom, Stohr Edward A (1998) Software reuse: survey and research directions. J Manag Inf Syst 14(4):113–147
Medvidovic N et al (2002) Modeling software architectures in the unified modeling language. ACM Trans Softw Eng Methodol 11(1):2–57
Arango G, Schoen E, Pettengill R (1993) Design as evolution and reuse. In: Proceedings of the second international workshop on advances in software reuse, pp 9–18
Ali FM, Du W (2004) Toward reuse of object-oriented software design models. Inf Softw Technol 46(15):499–517
Adamu A, Zainon WMNW (2016) A review of UML model retrieval approaches. Indian J Sci Technol 9(46):384–390
Object Management Group, Unified Modeling Language: Superstructure V2.0, 2005
Reiss SP (2009) Semantics-based code search. In: Proceedings of the 31st international conference on software engineering, IEEE Computer Society, IEEE, 2009, pp 243–253
Kim J et al (2010) Towards an intelligent code search engine. In: Proceedings of the twenty-fourth AAAI conference on artificial intelligence, pp 1358–1363
Alnusair A, Zhao T (2010) Component search and reuse: an ontology-based approach. In: Proceedings of 2010 IEEE international conference on information reuse and integration, pp 258–261
McMillan C et al (2012) Exemplar: a source code search engine for finding highly relevant applications. IEEE Trans Softw Eng 38(5):1069–1087
Robles K et al (2012) Towards an ontology-based retrieval of UML Class Diagrams. Inf Softw Technol 54(1):72–86
Salami HO, Ahmed M (2013) Class diagram retrieval using genetic algorithm. In: Proceedings of 12th international conference on machine learning and application, vol 2, pp 96–101
Al-Khiaty MAR, Ahmed M (2014) Similarity assessment of UML class diagrams using a greedy algorithm. In: Proceedings of 2014 international computer science and engineering conference (ICSEC2014), IEEE, 2014, pp 228–233
Al-Khiaty MAR, Ahmed M (2014) Similarity assessment of UML class diagrams using simulated annealing, In: Proceedings of 2014 5th international conference on software engineering and service science, IEEE, 2014, pp 19–23
Al-Khiaty MAR, Ahmed M (2016) UML class diagrams: similarity aspects and matching. Lect Notes Softw Eng 4(1):41–47
Oksana N et al (2015) An approach to compare UML class diagrams based on semantical features of their elements. In: Proceedings of the tenth international conference on software engineering advances, pp 147–153
Gomes P et al (2004) Using WordNet for case-based retrieval of UML models. AI Commun 17(1):13–23
Miller G (1998) WordNet: an electronic lexical database. MIT press, Cambridge
Kara S et al (2012) An ontology-based retrieval system using semantic indexing. Inf Syst 37(4):294–305
Cordi V, Lombardi P, Martelli M, Mascardi V (2005) An ontology-based similarity between sets of concepts. In: Proceedings of WOA, pp 6–21
Meng L, Huang R, Junzhong G (2013) A review of semantic similarity measures in wordnet. Int J Hybrid Inf Technol 6(1):1–12
Lucrédio D, Fortes RPM, Whittle J (2012) MOOGLE: a metamodel-based model search engine. Softw Syst Model 11(2):183–208
Zhang X, Chen H, Zhang T (2012) An UML model query method based on structure pattern matching. In: Proceedings of international conference on trustworthy computing and services. Springer, Berlin, Heidelberg, vol 320, pp 506–513
Qiu DH, Li H, Sun JL (2013) Measuring software similarity based on structure and property of class diagram. In: Proceedings of 2013 sixth international conference on advanced computational intelligence, IEEE, pp 75–80
Salami HO, Ahmed M (2014) Retrieving sequence diagrams using genetic algorithm. In: Proceedings of 2014 11th international joint conference on computer science and software engineering, IEEE, pp 324–330
Ahmed M, Salami HO (2015) Behavior-based retrieval of software. Afr J Comput ICT 8(1):95–102
Routledge N, Bird L, Goodchild A (2002) UML and XML schema. In: Proceedings of 2002 thirteenth Australasian database conference DBLP on database technologies, pp 157–166
Grose TJ, Doney GC, Brodsky SA (2002) Mastering XMI Java Programming with XMI, XML and UML, vol 20. Wiley, Hoboken
Bondy JA, Murty USR (1976) Graph theory with applications, vol 290. Macmillan, London
Bunke Horst (2000) Graph matching: theoretical foundations, algorithms, and applications. Proc. Vision Interface 2000:82–88
Conte D et al (2004) Thirty years of graph matching in pattern recognition. Int J Pattern Recognit Artif Intell 18(3):265–298
Derek G, Gotlieb CC (1970) An efficient algorithm for graph isomorphism. J ACM 17(1):51–64
McKay BD (1981) Practical graph isomorphism. J Symb Comput 60(1):94–112
Gao X et al (2010) A survey of graph edit distance. Pattern Anal Appl 13(1):113–129
Bunke Horst, Shearer Kim (1998) A graph distance metric based on the maximal common subgraph. Pattern Recognit Lett 19(3–4):255–259
Bunke H, Messmer BT (1995) Efficient attributed graph matching and its application to image analysis. In: Proceedings of international conference on image analysis and processing, Springer-Verlag, vol 974, pp 45–55
Acknowledgements
This work was supported in part by National Natural Science Foundation of China (61772269 and 61370075).
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Yuan, Z., Yan, L. & Ma, Z. Structural similarity measure between UML class diagrams based on UCG. Requirements Eng 25, 213–229 (2020). https://doi.org/10.1007/s00766-019-00317-w
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00766-019-00317-w