Skip to main content
Log in

Structural similarity measure between UML class diagrams based on UCG

  • Original Article
  • Published:
Requirements Engineering Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28

Similar content being viewed by others

References

  1. Krueger CW (1992) Software reuse. ACM Comput Surv 24(2):131–183

    Article  Google Scholar 

  2. Prieto-Diaz R (1993) Status report: software reusability. IEEE Softw 10(3):61–66

    Article  Google Scholar 

  3. Prieto-Diaz R (1993) Software reuse: issues and experiences. Am Progr 6(8):10–18

    Google Scholar 

  4. Mili H, Mili F, Mili A (1995) Reusing software: issues and research directions. IEEE Trans Softw Eng 22(6):528–562

    Article  Google Scholar 

  5. Kim Yongbeom, Stohr Edward A (1998) Software reuse: survey and research directions. J Manag Inf Syst 14(4):113–147

    Article  Google Scholar 

  6. Medvidovic N et al (2002) Modeling software architectures in the unified modeling language. ACM Trans Softw Eng Methodol 11(1):2–57

    Article  Google Scholar 

  7. 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

  8. Ali FM, Du W (2004) Toward reuse of object-oriented software design models. Inf Softw Technol 46(15):499–517

    Article  Google Scholar 

  9. Adamu A, Zainon WMNW (2016) A review of UML model retrieval approaches. Indian J Sci Technol 9(46):384–390

    Article  Google Scholar 

  10. Object Management Group, Unified Modeling Language: Superstructure V2.0, 2005

  11. 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

  12. 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

  13. 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

  14. McMillan C et al (2012) Exemplar: a source code search engine for finding highly relevant applications. IEEE Trans Softw Eng 38(5):1069–1087

    Article  Google Scholar 

  15. Robles K et al (2012) Towards an ontology-based retrieval of UML Class Diagrams. Inf Softw Technol 54(1):72–86

    Article  Google Scholar 

  16. 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

  17. 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

  18. 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

  19. Al-Khiaty MAR, Ahmed M (2016) UML class diagrams: similarity aspects and matching. Lect Notes Softw Eng 4(1):41–47

    Article  Google Scholar 

  20. 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

  21. Gomes P et al (2004) Using WordNet for case-based retrieval of UML models. AI Commun 17(1):13–23

    MathSciNet  MATH  Google Scholar 

  22. Miller G (1998) WordNet: an electronic lexical database. MIT press, Cambridge

    MATH  Google Scholar 

  23. Kara S et al (2012) An ontology-based retrieval system using semantic indexing. Inf Syst 37(4):294–305

    Article  Google Scholar 

  24. Cordi V, Lombardi P, Martelli M, Mascardi V (2005) An ontology-based similarity between sets of concepts. In: Proceedings of WOA, pp 6–21

  25. Meng L, Huang R, Junzhong G (2013) A review of semantic similarity measures in wordnet. Int J Hybrid Inf Technol 6(1):1–12

    Google Scholar 

  26. Lucrédio D, Fortes RPM, Whittle J (2012) MOOGLE: a metamodel-based model search engine. Softw Syst Model 11(2):183–208

    Article  Google Scholar 

  27. 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

  28. 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

  29. 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

  30. Ahmed M, Salami HO (2015) Behavior-based retrieval of software. Afr J Comput ICT 8(1):95–102

    Google Scholar 

  31. 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

  32. Grose TJ, Doney GC, Brodsky SA (2002) Mastering XMI Java Programming with XMI, XML and UML, vol 20. Wiley, Hoboken

    Google Scholar 

  33. Bondy JA, Murty USR (1976) Graph theory with applications, vol 290. Macmillan, London

    Book  Google Scholar 

  34. Bunke Horst (2000) Graph matching: theoretical foundations, algorithms, and applications. Proc. Vision Interface 2000:82–88

    Google Scholar 

  35. Conte D et al (2004) Thirty years of graph matching in pattern recognition. Int J Pattern Recognit Artif Intell 18(3):265–298

    Article  Google Scholar 

  36. Derek G, Gotlieb CC (1970) An efficient algorithm for graph isomorphism. J ACM 17(1):51–64

    Article  MathSciNet  Google Scholar 

  37. McKay BD (1981) Practical graph isomorphism. J Symb Comput 60(1):94–112

    MathSciNet  MATH  Google Scholar 

  38. Gao X et al (2010) A survey of graph edit distance. Pattern Anal Appl 13(1):113–129

    Article  MathSciNet  Google Scholar 

  39. Bunke Horst, Shearer Kim (1998) A graph distance metric based on the maximal common subgraph. Pattern Recognit Lett 19(3–4):255–259

    Article  Google Scholar 

  40. 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

Download references

Acknowledgements

This work was supported in part by National Natural Science Foundation of China (61772269 and 61370075).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zongmin Ma.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00766-019-00317-w

Keywords

Navigation