Abstract
The Unified Modelling Language (UML) is the standard for designing and documenting object-oriented software systems. Its most frequent use is for static modelling in the form of class diagrams. A correlated concept is that of object diagrams. An object diagram may or may not adhere to a given class diagram, and the understanding of this connection is key to correctly using class diagrams in practice. We present an approach for automatic generation of verified, non-trivial, conceptually relevant examples and counterexamples of class/object diagram combinations, aimed at providing exercise tasks in a university course setting. The underlying technique is model instance finding using the Alloy specification language and analyser. We provide an implementation of our approach in an e-learning system.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
That involves variants of the stuff shown and elided in Fig. 7, e.g., definitions
etc., while for the predicate
considered in a moment, separate variants
etc. would be produced.
- 2.
For example, can you spot which of the five ODs in Fig. 1 do not conform to either of the two CDs given there?
- 3.
By happenstance, they could also be identical, but that would be detected and rejected in a later step.
- 4.
This is also the step where we would reject the case that CD1 and CD2 happened to be identical. For if they were, then the first two buckets,
as well as
, would be empty, and it would be impossible to choose five ODs from the remaining two buckets while not taking more than two from one bucket.
References
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)
Booch, G.: The Unified Modeling Language User Guide. Pearson Education India (2005)
Ehrig, K., Küster, J.M., Taentzer, G.: Generating instance models from meta models. Softw. Syst. Model. 8(4), 479–500 (2009)
Fowler, M.: UML Distilled: A Brief Guide to the Standard Object Modeling Language. Addison-Wesley Professional, Reading (2004)
Jackson, D.: Alloy: a lightweight object modelling notation. ACM Trans. Softw. Eng. Methodol. (TOSEM) 11(2), 256–290 (2002)
Jackson, D.: Software Abstractions – Logic, Language, and Analysis, Revised edn. MIT Press, Cambridge (2011)
Kautz, O., Maoz, S., Ringert, J.O., Rumpe, B.: CD2Alloy: a translation of class diagrams to Alloy. Technical report AIB-2017-06, RWTH Aachen University (2017)
Maoz, S., Ringert, J.O., Rumpe, B.: CD2Alloy: class diagrams analysis using Alloy revisited. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 592–607. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24485-8_44
Massoni, T., Gheyi, R., Borba, P.: A UML class diagram analyzer. In: Proceedings of Workshop on Critical Systems Development with UML, pp. 143–153 (2004)
Object Management Group: Unified Modeling Language (OMG UML), Version 2.5.1, December 2017
Rumbaugh, J., Jacobson, I., Booch, G.: The Unified Modeling Language Reference Manual. Pearson Higher Education (2004)
Shah, S.M.A., Anastasakis, K., Bordbar, B.: From UML to Alloy and back again. In: Ghosh, S. (ed.) MODELS 2009. LNCS, vol. 6002, pp. 158–171. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-12261-3_16
Waldmann, J.: Generating and grading exercises on algorithms and data structures automatically. In: Proceedings of Automatische Bewertung von Programmieraufgaben. CEUR Workshop Proceedings, vol. 2015. CEUR-WS.org (2017)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Kafa, V., Siegburg, M., Voigtländer, J. (2020). Exercise Task Generation for UML Class/Object Diagrams, via Alloy Model Instance Finding. In: Tait, B., Kroeze, J., Gruner, S. (eds) ICT Education. SACLA 2019. Communications in Computer and Information Science, vol 1136. Springer, Cham. https://doi.org/10.1007/978-3-030-35629-3_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-35629-3_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-35628-6
Online ISBN: 978-3-030-35629-3
eBook Packages: Computer ScienceComputer Science (R0)