Abstract
Model-based software engineering gains further attention these days. To better support it, the use of constraint languages is important in order to bridge expressiveness gaps and eliminate ambiguity. Nevertheless, the use of model-based constraint languages, like the Object Constraint Language (OCL), is quite limited and the specification of constraints is left to the implementation stage. One option for these practices might be the misconception that model-based constraint languages are difficult to work with. In this paper, we examine the usages of representative constraint languages, namely OCL, for model-based constraint languages, and Java, for implementation-based constraint languages. In particular, we examine their usage in understanding and developing constraints. We evaluate these usages via a controlled experiment with 110 Information Systems Engineering undergraduate students. We found out that using OCL outperforms using Java for both understanding and developing constraints. Yet, the students had more confidence with Java. The results indicate that the aforementioned misconception is wrong and there is a need for further education regarding model-based constraints languages, so to get more practice and confidence.
Similar content being viewed by others
References
AbuHassan, A., Alshayeb, M.: A metrics suite for UML model stability. Softw. Syst. Model. 18(1), 557–583 (2019)
Ali, S., Yue, T., Iqbal, M.Z., Panesar-Walawege, R.K.: Insights on the use of OCL in diverse industrial applications. In International Conference on System Analysis and Modeling, pp. 223–238 (2014)
Ali, S., Zohaib, M.I., Arcuri, A., Briand, L.C.: Generating test data from OCL constraints with search techniques. IEEE Trans. Softw. Eng. 39(10), 1376–1402 (2013)
Balaban, M., Bennett, P., Doan, K.H., Georg, G., Gogolla, M., Khitron, I., Kifer, M.: A comparison of textual modeling languages: OCL, Alloy, FOML. InOCL@ MoDELS, pp. 57–72 (2016)
Bao-Lin, L., Zhi-shu, L., Qing, L., Hong, C.Y.: Test case automate generation from UML sequence diagram and OCL expression. In: International Conference on Computational Intelligence and Security, pp. 1048–1052 (2007)
Briand, L.C., Labiche, Y., Yan, H.D., Penta, M.D.: A controlled experiment on the impact of the object constraint language in UML-based maintenance. In: The 20th IEEE International Conference on Software Maintenance, pp. 380–389 (2004)
Briand, L.C., Morasca, S., Basili, V.R.: Defining and validating measures for object-based high-level design. IEEE Trans. Softw. Eng. 25(5), 722–743 (1999)
Briand, L.C., Wust, J., Ikonomovski, S.V., Lounis, H.: Investigating quality factors in object-oriented designs: an industrial case study. In: Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No. 99CB37002), pp. 345–354. IEEE (1999)
Burgueño, L., Vallecillo, A., Gogolla, M.: Teaching UML and OCL models and their validation to software engineering students: an experience report. Comput. Sci. Educ. 28(1), 23–41 (2018)
Cabot, J., Clarisó, R., Riera, D.: On the verification of UML/OCL class diagrams using constraint programming. J. Syst. Softw. 93, 1–23 (2014)
Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)
Chiorean, D., Bortes,M., Corutiu, D., Botiza, C., Cârcu, A.: Object constraint language environment (OCLE). http://lci.cs.ubbcluj.ro/ocle/. Accessed Sept 2019
Correa, A., Werner, C., Barros, M.: An empirical study of the impact of OCL smells and refactorings on the understandability of OCL specifications. In: Proceedings of the 10th international conference on Model Driven Engineering Languages and Systems (MODELS’07). Springer-Verlag, Berlin, Heidelberg, pp. 76–90 (2007)
Cruz-Lemus, J.A., Maes, A., Genero, M., Poels, G., Piattini, M.: The impact of structural complexity on the understandability of UML statechart diagrams. Inf. Sci. 180(11), 2209–2220 (2010)
Eclipse IDE for Java Developers. https://www.eclipse.org/downloads/packages/release/kepler/sr1/eclipse-ide-java-developers
Eclipse, Eclipse OCL. https://projects.eclipse.org/projects/modeling.mdt.ocl. Accessed Sept 2019
Fahland, D., et al. (2009) Declarative versus Imperative Process Modeling Languages: The Issue of Understandability. In: Halpin, T., et al. (eds.) Enterprise, Business-Process and Information Systems Modeling. BPMDS 2009, EMMSAD 2009. Lecture Notes in Business Information Processing, vol 29. Springer, Berlin, Heidelberg (2009)
Genero, M., Piattini, M., Calero, C.: A survey of metrics for UML class diagrams. J. Object Technol. 4(9), 59–92 (2005)
Genero, M., Poels, G., Piattini, M.: Defining and validating metrics for assessing the understandability of entity–relationship diagrams. Data Knowl. Eng. 64(3), 534–557 (2008)
Gogolla, M., Büttner, F., Richters, R.: USE: a UML-based specification environment for validating UML and OCL. Sci. Comput. Program. 69(1–3), 27–34 (2007)
Gogolla, M., Bohling, J., Richters, M.: Validating UML and OCL models in USE by automatic snapshot generation. Softw. Syst. Model. 4(4), 386–398 (2005)
Green, T.R.G.: Cognitive dimensions of notations. In: Sutcliffe, A., Macaulay, L. (eds.) People and Computers, pp. 443–460. Cambridge University Press, Cambridge (1989)
IntelliJ IDEA. https://www.jetbrains.com/idea/
Jamil H, Islam A.: The power of declarative languages: a comparative exposition of scientific workflow design using BioFlow and Taverna. In: Congress on Services, pp. 322–329 (2009)
Kitchenham, B.A., Pfleeger, S.L., Pickard, L.M., Jones, P.W., Hoaglin, D.C., El Emam, K., Rosenberg, J.: Preliminary guidelines for empirical research in software engineering. IEEE Trans. Softw. Eng. 28(8), 721–734 (2002)
Krogstie, J., Sindre, G.: Utilizing deontic operators in information systems specifications. Requir. Eng. 1, 210–237 (1996)
Krogstie, J.: Model-Based Development and Evolution of Information Systems—A Quality Approach. Springer, New York (2012)
Manso, M.E., Genero, M., Piattini, M.: No-redundant metrics for UML class diagram structural complexity. In International Conference on Advanced Information Systems Engineering, pp. 127–142 (2003)
Maraee, A., Sturm, A.: The usage of constraint specification languages: a controlled experiment. BPMDS/EMMSAD@CAiSE, pp. 329–343 (2019)
Misra, S., Adewumi, A., Fernandez-Sanz, L., Damasevicius, R.: A suite of object oriented cognitive complexity metrics. IEEE Access 6, 8782–8796 (2018)
Mussbacher, G., et al.: The relevance of model-driven engineering thirty years from now. In: Dingel, J., Schulte, W., Ramos, I., Abrahão, S., Insfran, E. (eds.) Model-Driven Engineering Languages and Systems. MODELS 2014. Lecture Notes in Computer Science, vol. 8767, pp. 183–200 (2014)
OCL Portal, OCL Tools. http://st.inf.tu-dresden.de/oclportal/index.php?option=com_content&view=category&id=8&Itemid=26. Accessed Sept 2019
OMG, Object-Constraint Language, version 2.4, https://www.omg.org/spec/OCL/2.4. Accessed Sept 2019
Papyrus. https://www.eclipse.org/papyrus/
Pérez, B., Porres, I.: Reasoning about UML/OCL class diagrams using constraint logic programming and formula. Inf. Syst. 81, 152–177 (2019)
Pichler, P., Weber, B., Zugal, S., Pinggera, J., Mendling, J., Reijers, H.A.: Imperative versus declarative process modeling languages: an empirical investigation. In: Daniel, F., Barkaoui, K., Dustdar, S. (eds.) Business Process Management Workshops. Lecture Notes in Business Information Processing, vol. 99, pp. 383–394 (2012)
Przigoda, N., Wille, R., Przigoda, J., Drechsler, R.: Automated Validation and Verification of UML/OCL Models Using Satisfiability Solvers. Springer, New York (2015)
Rull, G., Farré, C., Queralt, A., Teniente, E., Urpí, T.: AuRUS: explaining the validation of UML/OCL conceptual schemas. Softw. Syst. Model. 14(2), 953–980 (2015)
Rychkova, I., Regev, G., Wegmann, A.: High-level design and analysis of business processes the advantages of declarative specifications. In: Second International Conference on Research Challenges in Information Science, pp. 99–110 (2008)
Sendall, S., Kozaczynski, W.: Model transformation: the heart and soul of model-driven software development. IEEE Softw. 20(5), 42–45 (2003)
Störrle, H.: Improving the usability of OCL as an ad-hoc model querying language. In: The 13th International Workshop on OCL, Model Constraint and Query Languages, pp. 83–92 (2013)
Subramaniam, V.: Functional programming in Java: harnessing the power of Java 8 Lambda expressions. Pragmatic Bookshelf (2014)
Warmer, J., Kleppe, A.: The Object Constraint Language: Getting Your Models Ready for MDA. Addison-Wesley, Boston (2003)
Wikipedia contributors, Integrated development environment, Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=Integrated_development_environment&oldid=936168158. Accessed 30 Jan 2020
Wohlin, C., Runeson, P., Höst, M., Ohlsson, M.C., Regnell, B., Wesslén, A.: Experimentation in Software Engineering. Springer, New York (2012)
Yue, T., Ali, S.: Empirically evaluating OCL and Java for specifying constraints on UML models. Softw. Syst. Model. 15(3), 757–781 (2016)
Zugal, S., Pinggera, J., Weber, B.: Toward enhanced life-cycle support for declarative processes. J. Softw. Evol. Process 24(3), 285–302 (2012)
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Jelena Zdravkovic and Iris Reinhartz-Berger.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A. Class diagram complexity metrics
See Table 12
Appendix B. The library management system-class diagram
See Table 13.
Appendix C. The academic system-class diagram
See Table 14.
Appendix D. Comparing the complexity of the two domains
See Table 15.
Appendix E. Values of complexity metrics and specifications in OCL for library management system
See Table 16.
Appendix F. OCL and Java formulations of the Constraint 1, 5 and 8 discussed in Sect. 0
Rights and permissions
About this article
Cite this article
Maraee, A., Sturm, A. Imperative versus declarative constraint specification languages: a controlled experiment. Softw Syst Model 20, 27–48 (2021). https://doi.org/10.1007/s10270-020-00796-4
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-020-00796-4