In large software development projects, there is always a need for refactoring and optimization of the design. Usually software designs are represented using UML diagrams (e.g., class diagrams). A software engineering team may create multiple versions of class diagrams satisfying some external constraints. In some cases, subdiagrams of the developed diagrams can be selected and combined into one diagram. It is difficult to perform this task manually since the manual process is very time consuming, is prone to human errors, and is not manageable for large projects. In this paper, we present algorithmic support for automating the generation of composing diagrams, where the composed diagram satisfies a given collection of external constraints and is optimal with respect to a given objective function. The composition of diagrams is based on the colimit operation from category theory. The developed approach was verified experimentally by generating random external constraints (expressed in SPARQL and OWL), generating random class diagrams using these external constraints, generating composed diagrams that satisfy these external constraints and computing class diagram metrics for each composed diagram.
Jackson, M. and Zave, P. (1998) Distributed Feature Composition: A Virtual Architecture for Telecommunications Services. IEEE Transactions on Software Engineering, 24, 831-847. https://doi.org/10.1109/32.729683
Kourie, D.G. and Watson, B.W. (2012) The Correctness-by-Construction Approach to Programming. Springer, Berlin. https://doi.org/10.1007/978-3-642-27919-5
de Lara, J., Bardohl, R., Ehrig, H., Ehrig, K., Prange, U. and Taentzer, G. (2007) Attributed Graph Transformation with Node Type Inheritance. Theoretical Computer Science, 376, 139-163. https://doi.org/10.1016/j.tcs.2007.02.001
W3C (2012) Web Ontology Language (OWL). http://www.w3.org/2004/OWL/
Sabetzadeh, M., Nejati, S., Liaskos, S., Easterbrook, S. and Chechik, M. (2007) Consistency Checking of Conceptual Models via Model Merging. 15th IEEE International Requirements Engineering Conference, Delhi, 15-19 October 2007, 221-230. https://doi.org/10.1109/RE.2007.18
Tazin, A. (2017) UML Class Diagram Composition Using Software Requirements Specifications. https://ceur-ws.org/Vol-2019/docsymp_9.pdf
Baclawski, K., DeLoach, S.A., Kokar, M.M. and Smith, J. (1999) Object-Oriented Transformation. In: Kilov, H., Rumpe, B. and Simmonds, I. Eds., Behavioral Specifications of Businesses and Systems, Springer, Boston. 1-14. https://doi.org/10.1007/978-1-4615-5229-1_1
OMG (2016) Meta Object Facility. https://www.omg.org/spec/MOF/
Smith, J. (1999) UML Formalization and Transformation. Ph.D. Thesis, Northeastern University, Boston.
Smith, J., Kokar, M.M. and Baclawski, K. (2001) Formal Verification of UML Diagrams: A First Step towards Code Generation. Practical UML-Based Rigorous Development Methods—Countering or Integrating the eXtremists, Toronto, 1 October 2001, 224-240.
Maraee, A. and Balaban, M. (2014) Removing Redundancies and Deducing Equivalences in UML Class Diagrams. In: Dingel, J., Schulte, W., Ramos, I., Abrahão, S. and Insfran, E., Eds., Model-Driven Engineering Languages and Systems. Lecture Notes in Computer Science, Vol. 8767, Springer, Cham, 235-251. https://doi.org/10.1007/978-3-319-11653-2_15
Balaban, M. and Maraee, A. (2013) Simplification and Correctness of UML Class Diagrams—Focusing on Multiplicity and Aggregation/Composition Constraints. In: Moreira, A., Schätz, B., Gray, J., Vallecillo, A. and Clarke, P., Eds., Model-Driven Engineering Languages and Systems. Lecture Notes in Computer Science, Vol. 8107, Springer, Berlin, 454-470. https://doi.org/10.1007/978-3-642-41533-3_28
Westfechtel, B. (2014) Merging of EMF Models. Formal Foundation. Software & Systems Modeling, 13, 757-788. https://doi.org/10.1007/s10270-012-0279-3
Gratzer, G. (1979) Universal Algebra. 2nd Edition, Springer, Berlin.
Breiner, S., Padi, S., Subrahmanian, E. and Sriram, R.D. (2021) Deconstructing UML, Part 1: Modeling Classes with Categories. National Institute of Standards and Technology (NIST), Gaithersburg. https://doi.org/10.6028/NIST.IR.8358
Ehrig, H., Ehrig, K., Prange, U. and Taentzer, G. (2006) Fundamentals of Algebraic Graph Transformation. Springer, Berlin.
Leinhos, S. (2006) OWL Ontology Extraction and Modelling from and with UML Class Diagrams—A Practical Approach. MSc. Thesis, University of the Federal Armed Forces in Munich, Neubiberg.
VIStology, Inc. (2022) BaseVISor. https://vistology.com/products/basevisor/
Egyed, A. (2002) Heterogeneous View Integration and Its Automation. Ph.D. Thesis, University of Southern California, Los Angeles.
Bansiya, J. and Davis, C. (2002) A Hierarchical Model for Object-Oriented Design Quality Assessment. IEEE Transactions on Software Engineering, 28, 4-17. https://doi.org/10.1109/32.979986
Gill, N.S. and Sikka, S. (2011) Inheritance Hierarchy Based Reuse & Reusability Metrics in OOSD. International Journal on Computer Science and Engineering (IJCSE), 3, 2300-2309.
Sharma, A.K., Kalia, A. and Singh, H. (2012) Metrics Identification for Measuring Object Oriented Software Quality. International Journal of Soft Computing and Engineering (IJSCE), 2, 255-258.
Yi, T., Wu, F. and Gan, C. (2004) A Comparison of Metrics for UML Class Diagrams. ACM SIGSOFT Software Engineering Notes, 29, 1-6. https://doi.org/10.1145/1022494.1022523
Pereira, J.L.J., Oliver, G.A., Francisco, M.B., Cunha Jr., S.S. and Gomes, G.F. (2022) A Review of Multi-Objective Optimization: Methods and Algorithms in Mechanical Engineering Problems. Archives of Computational Methods in Engineering, 29, 2285-2308. https://doi.org/10.1007/s11831-021-09663-x
Balaban, M., Maraee, A. and Sturm, A. (2007) Reasoning with UML Class Diagrams: Relevance, Problems, and Solutions—A Survey. https://www.cs.bgu.ac.il/~mira/CDReasoning-07.pdf
Northeastern University (2021) Hardware Overview. https://rc-docs.northeastern.edu/en/latest/hardware/hardware_overview.html
Alanen, M. and Porres, I. (2003) Difference and Union of Models. In: Stevens, P., Whittle, J. and Booch, G., Eds., UML 2003—The Unified Modeling Language. Modeling Languages and Applications. Lecture Notes in Computer Science, Vol. 2863, Springer, Berlin, 2-17. https://doi.org/10.1007/978-3-540-45221-8_2
Chechik, M., Nejati, S. and Sabetzadeh, M. (2012) A Relationship-Based Approach to Model Integration. Innovations in Systems and Software Engineering, 8, 3-18. https://doi.org/10.1007/s11334-011-0155-2
Fahrenberg, U., Acher, M., Legay, A. and Wasowski, A. (2014) Sound Merging and Differencing for Class Diagrams. In: Gnesi, S. and Rensink, A., Eds., Fundamental Approaches to Software Engineering. Lecture Notes in Computer Science, Vol. 8411, Springer, Berlin, 63-78. https://doi.org/10.1007/978-3-642-54804-8_5
Elasri, H., Elabbassi, E., Abderrahim, S. and Fahad, M. (2018) Semantic Integration of UML Class Diagram with Semantic Validation on Segments of Mappings. ArXiv: 1801.04482.
Rossini, A., Rutle, A., Lamo, Y. and Wolter, U. (2010) A Formalisation of the Copy-Modify-Merge Approach to Version Control in MDE. The Journal of Logic and Algebraic Programming, 79, 636-658. https://doi.org/10.1016/j.jlap.2009.10.003
Rutle, A., Rossini, A., Lamo, Y. and Wolter, U. (2009) A Category-Theoretical Approach to the Formalisation of Version Control in MDE. In: Chechik, M. and Wirsing, M., Eds., Fundamental Approaches to Software Engineering. Lecture Notes in Computer Science, Vol. 5503, Springer, Berlin, 64-78. https://doi.org/10.1007/978-3-642-00593-0_5
Farias, K., Cavalcante de Oliveira, T., Gonçales, L.J. and Bischoff, V. (2022) UML2Merge: A UML Extension for Model Merging. IET Software, 13, 575-586. https://doi.org/10.1049/iet-sen.2018.5104
Yang, S. and Sahraoui, H. (2022) Towards Automatically Extracting UML Class Diagrams from Natural Language Specifications. Proceedings of the 25th International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings, Montreal, 23-28 October 2022, 396-403. https://doi.org/10.1145/3550356.3561592
Bencharqui, H., Moubachir, Y. and Anwa, A. (2020) On the Use of Triple Graph Grammars for Model Composition. On the Use of Triple Graph Grammars for Model Composition, 5, 653-664. https://doi.org/10.25046/aj050281
Ehrig, H., Ermel, C., Golas, U. and Hermann, F. (2015) Graph and Model Transformation. Springer, Berlin. https://doi.org/10.1007/978-3-662-47980-3