Skip to main content
Log in

Numeric semantics of class diagrams with multiplicity and uniqueness constraints

  • Regular Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

We translate class diagrams with multiplicity constraints and uniqueness attributes to inequalities over non-negative integers. Based on this numeric semantics we check the satisfiability and consistency of class diagrams and compute minimal models. We show that this approach is efficient and provides succinct user feedback in the case of errors. In an experimental section we demonstrate that general off-the-shelf solvers for integer linear programming perform as well on real-world and synthetic benchmarks as specialised algorithms do, facilitating the extension of the formal model by further numeric constraints like cost functions. Our results are embedded in a research programme on reasoning about class diagrams and are motivated by applications in configuration management. Compared to other (for instance logic-based) approaches our aim is to hide the complexity of formal methods behind familiar user interfaces like class diagrams and to concentrate on problems that can be solved efficiently in order to be able to provide immediate feedback to users.

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.

Institutional subscriptions

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

Similar content being viewed by others

Notes

  1. Lower bounds can be specified as constant class attributes like min in Fig. 1a, with a simple Ocl constraint stating that the number of instances has to be greater than or equal to this number.

  2. Remember that \(c_i\) is short for \({ {class}}^{-1}(c_i)\).

  3. Non-linear inequalities like \(xy\ge my\) are essentially lower bounds, since they simplify to \(x\ge m\) for \(y>0\).

  4. The names of variables have two different interpretations: indices of \(W\) and \(P\) refer to the name, whereas arithmetic expressions use the value of the variables.

References

  1. Anastasakis, K., Bordbar, B., Georg, G., Ray, I.: On challenges of model transformation from UML to Alloy. Softw. Syst. Model. 9(1), 69–86 (2010)

    Article  Google Scholar 

  2. André, P., Romanczukand, A., Royer, J.: Checking the consistency of UML class diagrams using Larch prover. In: Proceedings of Rigorous Object-Oriented Methods 2000, pp. 1–16 (2000)

  3. Artale, A., Calvanese, D., Kontchakov, R., Ryzhikov, V., Zakharyaschev, M.: Reasoning over extended ER models. In: Proceedings of the 26th International Conference on Conceptual Modeling (ER 2007). Lecture Notes in Computer Science, vol. 4801, pp. 277–292. Springer, Berlin (2007)

  4. Artale, A., Calvanese, D., Kontchakov, R., Zakharyaschev, M.: Adding weight to DL-Lite. In: Grau, B.C. et al. (eds.) DL 2009. CEUR, Workshop, vol. 477 (2008)

  5. Aschinger, M., Drescher, C., Gottlob, G.: Introducing LoCo, a logic for configuration problems. In: Proceedings of the 2nd Workshop on Logics for Component Configuration, LoCoCo 2011, Perugia, Italy (2011)

  6. Baader, F., Calvanese, D., McGuinness, D., Nardi, D., Patel-Schneider, P. (eds.): The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, London (2003)

  7. Balaban, M., Maraee, A.: Consistency of UML class diagrams with hierarchy constraints. In: Next Generation Information Technologies and Systems. Lecture Notes in Computer Science, vol. 4032, pp. 71–82. Springer, Berlin (2006)

  8. Beckert, B., Keller, U., Schmitt, P.: Translating the Object Constraint Language into first-order predicate logic. In: Proceedings, VERIFY, Workshop at Federated Logic Conferences (FLoC), Copenhagen, Denmark (2002)

  9. Ali, A. B. H., Boufares, F., Abdellatif, A.: Checking constraints consistency in UML class diagrams. In: 2nd International Conference on Information and Communication Technologies, 2006. ICTTA ’06, vol. 2, pp. 3599–3604 (2006)

  10. Berardi, D., Calvanese, D., De Giacomo, G.: Reasoning on UML class diagrams. Artif. Intell. 168(1–2), 70–118 (2005). http://www.inf.unibz.it/~calvanese/papers-html/AIJ-2005.html

  11. Boufares, F., Bennaceur, H.: Consistency problems in ER-schemas for database systems. Inf. Sci. 163(4), 263–274 (2004). doi:10.1016/j.ins.2003.06.015

    Article  MATH  MathSciNet  Google Scholar 

  12. Cadoli, M., Calvanese, D., Giacomo, G.D., Mancini, T.: Finite model reasoning on UML class diagrams via constraint programming. In: AI*IA 2007: Artificial Intelligence and Human-Oriented Computing. Lecture Notes in Computer Science, vol. 4733, pp. 36–47. Springer, Berlin (2007)

  13. Calì, A., Calvanese, D., Giacomo, G.D., Lenzerini, M.: A formal framework for reasoning on UML class diagrams. In: ISMIS ’02: Proceedings of the 13th International Symposium on Foundations of Intelligent Systems, pp. 503–513. Springer, London (2002)

  14. Calvanese, D., Lenzerini, M., Nardi, D.: Unifying class-based representation formalisms. J. Artif. Intell. Res. 11, 199–240 (1999)

    MATH  MathSciNet  Google Scholar 

  15. Chen, P.P.S.: The entity-relationship model: toward a unified view of data. ACM Trans. Database Syst. 1(1), 9–36 (1976). doi:10.1145/320434.320440

    Article  Google Scholar 

  16. Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. The MIT Press and McGraw-Hill Book Company, London (1989)

    Google Scholar 

  17. Dupuy, S., Ledru, Y., Chabre-Peccoud, M.: An overview of RoZ: a tool for integrating UML and Z specifications. In: Wangler, B., Bergman, L. (eds.) Proceedings of CAiSE 2000. LNCS, vol. 1789, pp. 417–430. Springer, Berlin (2000)

  18. Egyed, A.: Instant consistency checking for the UML. In: ICSE ’06: Proceeding of the 28th International Conference on Software Engineering, pp. 381–390. ACM Press, New York (2006). doi:10.1145/1134285.1134339

  19. Falkner, A., Feinerer, I., Salzer, G., Schenner, G.: Computing product configurations via UML and integer linear programming. Int. J. Mass Cust. 3(4) (2010). doi:10.1504/IJMASSC.2010.037650

  20. Feinerer, I.: A formal treatment of UML class diagrams as an efficient method for configuration management. Dissertation, Theory and Logic Group, Institute of Computer Languages, Vienna University of Technology, Austria (2007)

  21. Feinerer, I., Salzer, G.: Consistency and minimality of UML class specifications with multiplicities and uniqueness constraints. In: Proceedings of the 1st IEEE/IFIP International Symposium on Theoretical Aspects of Software Engineering, Shanghai, China, 6–8 June 2007, pp. 411–420. IEEE Computer Society Press, New York (2007). doi:10.1109/TASE.2007.17

  22. Feinerer, I., Salzer, G., Sisel, T.: Reducing multiplicities in class diagrams. In: Whittle, J., Clark, T., Kühne, T. (eds.) Proceedings of the 14th International Conference on Model Driven Engineering Languages and Systems, MODELS 2011, Wellington, New Zealand, 16–21 October 2011, Lecture Notes in Computer Science, vol. 6981, pp. 379–393. Springer, Berlin (2011). doi:10.1007/978-3-642-24485-8

  23. Felfernig, A., Friedrich, G., Jannach, D., Stumptner, M., Zanker, M.: UML as knowledge acquisition frontend for semantic web configuration knowledge bases. In: Proceedings of RuleML 2002. CEUR Workshop Proceedings, vol. 60 (2002)

  24. Génova, G., Llorens, J., Martínez, P.: Semantics of the minimum multiplicity in ternary associations in UML. In: Proceedings of the 4th International Conference on the Unified Modeling Language, Modeling Languages, Concepts, and Tools, pp. 329–341. Springer, London (2001)

  25. Génova, G., Llorens, J., Martínez, P.: The meaning of multiplicity of n-ary associations in UML. Softw. Syst. Model. 1(2), 86–97 (2002)

    Google Scholar 

  26. Hartmann, S.: On interactions of cardinality constraints, key, and functional dependencies. In: FoIKS ’00: Proceedings of the First International Symposium on Foundations of Information and Knowledge Systems, pp. 136–155. Springer, London (2000)

  27. Hartmann, S.: Coping with inconsistent constraint specifications. In: ER ’01: Proceedings of the 20th International Conference on Conceptual Modeling, pp. 241–255. Springer, London (2001)

  28. Kaneiwa, K., Satoh, K.: Consistency checking algorithms for restricted UML class diagrams. In: Dix, J., Hegner, S. (eds.) Proceedings of FoIKS. Lecture Notes of Computer Science, vol. 3861, pp. 219–239. Springer, Berlin (2006)

  29. Kim, S.K., Carrington, D.A.: Formalizing the UML class diagram using Object-Z. In: France, R.B. et al. (eds.) Proceedings of UML’99. LNCS, vol. 1723, pp. 83–98 (1999)

  30. Krishnan, P.: Consistency checks for UML. In: Proceedings of APSEC’00, p. 162. IEEE Computer Society, Washington, DC (2000)

  31. Lagarias, J.: The computational complexity of simultaneous diophantine approximation problems. SIAM J. Comput. 14(1), 196–209 (1985). doi:10.1137/0214016

    Article  MATH  MathSciNet  Google Scholar 

  32. Lenzerini, M., Nobili, P.: On the satisfiability of dependency constraints in entity-relationship schemata. Inf. Syst. 15(4), 453–461 (1990). doi:10.1016/0306-4379(90)90048-T

    Article  Google Scholar 

  33. Niederbrucker, G.: A numeric semantics for UML class diagrams: methods and tools. Master’s thesis, Technische Universität Wien (2010)

  34. Niederbrucker, G., Sisel, T.: Clews Website (2011). http://www.logic.at/clews

  35. Object Management Group: Unified Modeling Language 2.4.1 Superstructure Specification (2011)

  36. Object Management Group: Unified Modeling Language 2.3.1 Object Constraint Language Specification (2012)

  37. Queralt, A., Teniente, E.: Reasoning on UML class diagrams with OCL constraints. In: Embley, D.W. et al. (eds.) Proceedings of ER 2006. LNCS, vol. 4215, pp. 497–512 (2006)

  38. Richters, M., Gogolla, M.: Validating UML models and OCL constraints. In: Evans, A., Kent, S., Selic, B. (eds.) Proceedings of the Third International Conference on UML 2000—the Unified Modeling Language. Advancing the Standard, York, UK, October 2000. LNCS, vol. 1939, pp. 265–277. Springer, Berlin (2000)

  39. Rosati, R.: Finite model reasoning in DL-Lite. In: Bechhofer, S. et al. (eds.) Proceedings of ESWC2008. LNCS, vol. 5021, pp. 215–229. Springer, Berlin (2008)

  40. Satoh, K., Kaneiwa, K., Uno, T.: Contradiction finding and minimal recovery for UML class diagrams. In: ASE ’06: Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering, pp. 277–280. IEEE Computer Society, Washington, DC (2006). doi:10.1109/ASE.2006.30

  41. Snook, C.F., Butler, M.J.: UML-B: formal modeling and design aided by UML. ACM Trans. Softw. Eng. Methodol. 15(1), 92–122 (2006)

    Article  Google Scholar 

  42. Szlenk, M.: Formal semantics and reasoning about UML class diagram. In: DEPCOS-RELCOMEX ’06: Proceedings of the International Conference on Dependability of Computer Systems, pp. 51–59. IEEE Computer Society, Washington, DC (2006). doi:10.1109/DEPCOS-RELCOMEX.2006.27

  43. Szlenk, M.: UML static models in formal approach. In: CEE-SET. Lecture Notes in Computer Science, vol. 5082, pp. 129–142. Springer (2007). doi:10.1007/978-3-540-85279-7\_11

  44. The Alliance for Telecommunications Industry Solutions: ATIS telecom glossary (2000). Approved February 28, 2001 by the American National Standards Institute (ANSI). http://www.atis.org/glossary

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ingo Feinerer.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Feinerer, I., Salzer, G. Numeric semantics of class diagrams with multiplicity and uniqueness constraints. Softw Syst Model 13, 1167–1187 (2014). https://doi.org/10.1007/s10270-012-0294-4

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-012-0294-4

Keywords

Navigation