Abstract
Until the recent adoption of fUML, UML has lacked standard execution semantics. However, parts of UML models have always been executable: OCL expressions. They may notably be used to express contracts (i.e., invariants, pre- and post-conditions), to define side-effect free operations, and to specify how to compute derived features. Nonetheless, although fUML is partly inspired by OCL (notably for primitive behaviors), its specification does not consider interoperability with OCL expressions. Moreover, the semantics of OCL is specified independently of (f)UML, and their implementations are separate execution engines, hampering all global activities (e.g., analysis, optimization, debugging). This paper explores a possible integration approach of OCL and fUML: by transforming (i.e., compiling) OCL expressions into fUML activities we obtain a unified executable model. With this approach, operations specified in OCL can be called, and getters can be generated for derived features. Preconditions (resp. postconditions) can be automatically executed before (resp. after) the execution of their contextual operations. A precise semantics for invariant evaluation can be specified in fUML. Thanks to this work, OCL may also be seen as a functional counterpart to Alf.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
For space reasons we can not provide here the code of all OCL contracts, derived features and fUML activities mentioned in this section.
- 3.
The complete mapping for the OCL standard library is available at the project repository https://github.com/atlanmod/OCL2fUML.
- 4.
- 5.
The diagrams have nonetheless been modified manually in Inkscape (https://inkscape.org/), mostly to improve whitespace usage.
References
Object Management Group (OMG): Semantics of a Foundational Subset for Executable UML Models (fUML), v1.2.1, January 2016
Guermazi, S., Tatibouet, J., Cuccuru, A., Seidewitz, E., Dhouib, S., Gérard, S.: Executable modeling with fUML and alf in papyrus: tooling and experiments. In: 1st International Workshop on Executable Modeling, pp. 3–8 (2015)
Object Management Group (OMG): Precise Semantics Of UML Composite Structures (PSCS), v1.0. http://www.omg.org/spec/PSCS/1.0/, October 2015
Object Management Group (OMG): Concrete Syntax For A UML Action Language: Action Language For Foundational UML (ALF), v1.0.1. http://www.omg.org/spec/ALF/1.0.1/, October 2013
Object Management Group (OMG): Object Constraint Language (OCL), v2.4. http://www.omg.org/spec/OCL/2.4/, February 2014
Mayerhofer, T., Langer, P.: Moliz: a model execution framework for UML models. In: Proceedings of the 2nd International Master Class on Model-Driven Engineering: Modeling Wizards. MW 2012, pp. 3: 1–3: 2. ACM, New York (2012)
Tisi, M., Jouault, F., Delatour, J., Saidi, Z., Choura, H.: fUML as an assembly language for model transformation. In: Combemale, B., Pearce, D.J., Barais, O., Vinju, J.J. (eds.) SLE 2014. LNCS, vol. 8706, pp. 171–190. Springer, Heidelberg (2014)
Mayerhofer, T., Langer, P., Wimmer, M., Kappel, G.: xMOF: executable DSMLs based on fUML. In: Erwig, M., Paige, R.F., Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 56–75. Springer, Heidelberg (2013)
Tisi, M., Jouault, F., Fraternali, P., Ceri, S., Bézivin, J.: On the use of higher-order model transformations. In: Paige, R.F., Hartman, A., Rensink, A. (eds.) ECMDA-FA 2009. LNCS, vol. 5562, pp. 18–33. springer, Heidelberg (2009)
Seidewitz, E., Tatibouet, J.: Tool Paper: Combining Alf and UML in Modeling Tools - An Example with Papyrus. In: Brucker, A.D., Egea, M., Gogolla, M., Tuong, F. (eds.) OCL@MoDELS. vol. 1512 of CEUR Workshop Proceedings, CEUR-WS.org, pp. 105–119 (2015)
Gogolla, M., Büttner, F., Richters, M.: USE: A UML-based specification environment for validating UML and OCL. Sci. Comput. Program. 69(1), 27–34 (2007)
Jiang, K., Zhang, L., Miyake, S.: Using OCL in executable UML. In: Proceedings of the Workshop Ocl4All: Modeling Systems with OCL at MoDELS 2007. vol. 9, Electronic Communications of the EASST (2008)
Tisi, M., Jouault, F., Delatour, J., Saidi, Z., Choura, H.: fUML as an assembly language for model transformation. In: Combemale, B., Pearce, D.J., Barais, O., Vinju, J.J. (eds.) SLE 2014. LNCS, vol. 8706, pp. 171–190. Springer, Heidelberg (2014)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Tisi, M., Jouault, F., Saidi, Z., Delatour, J. (2016). Enabling OCL and fUML Integration by Transformation. In: Wąsowski, A., Lönn, H. (eds) Modelling Foundations and Applications. ECMFA 2016. Lecture Notes in Computer Science(), vol 9764. Springer, Cham. https://doi.org/10.1007/978-3-319-42061-5_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-42061-5_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-42060-8
Online ISBN: 978-3-319-42061-5
eBook Packages: Computer ScienceComputer Science (R0)