Abstract
The Object Constraint Language (OCL) is a well-accepted ingredient in model-driven engineering and accompanying modeling languages like UML (Unified Modeling Language) or EMF (Eclipse Modeling Framework) which support object-oriented software development. Among various possibilities, OCL offers the formulation of state invariants and operation contracts in form of pre- and postconditions. With OCL, side effect free query operations can be implemented. However, for operations changing the system state an implementation cannot be given within OCL. In order to fill this gap, this paper proposes the language SOIL (Simple OCL-like Imperative Language). The expression sub-language of SOIL is identical to OCL. SOIL adds well-known, traditional imperative constructs. Thus by employing OCL and SOIL, it is possible to describe any operation in a declarative way and in an operational way on the modeling level without going into the details of a conventional programming language. In contrast to other similar approaches, the embedding of OCL into SOIL is done in a new, careful way so that elementary properties in OCL are preserved (for example, commutativity of logical conjunction). The paper discusses the major criteria of a conservative embedding of OCL into SOIL. SOIL has a sound formal semantics and is implemented in the UML and OCL tool USE (UML-based Specification Environment).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Akehurst, D., Patrascoiu, O.: KMF (Kent Modeling Framework) OCL Library. website (2011), http://www.cs.kent.ac.uk/projects/ocl/tools.html (last visited February 10, 2011)
Brucker, A.D., Wolff, B.: HOL-OCL: A Formal Proof Environment for UML/OCL. In: Fiadeiro, J.L., Inverardi, P. (eds.) FASE 2008. LNCS, vol. 4961, pp. 97–100. Springer, Heidelberg (2008)
Büttner, F.: Reusing OCL in the Definition of Imperative Languages. PhD thesis, Universität Bremen, Fachbereich Mathematik und Informatik, Logos Verlag, Berlin (2011)
Büttner, F.: Transformation-Based Structure Model Evolution. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 339–340. Springer, Heidelberg (2006)
Büttner, F., Kuhlmann, M.: Shortcomings of the Embedding of OCL into QVT ImperativeOCL. In: Chaudron, M.R.V. (ed.) MODELS 2008. LNCS, vol. 5421, pp. 263–272. Springer, Heidelberg (2009)
Cabot, J., Teniente, E.: Transformation techniques for OCL constraints. Science of Computer Programming 68(3), 179–195 (2007)
Chiorean, D., Pasca, M., Cârcu, A., Botiza, C., Moldovan, S.: Ensuring UML Models Consistency Using the OCL Environment. Electronic Notes in Theorethical Computer Science 102, 99–110 (2004)
Clark, A., Warmer, J. (eds.): Object Modeling with the OCL: The Rationale behind the Object Constraint Language. LNCS, vol. 2263, pp. 4–20. Springer, Heidelberg (2002)
Cuadrado, J.S., Jouault, F., Molina, J.G., Bézivin, J.: Deriving OCL Optimization Patterns from Benchmarks. ECEASST 15 (2008)
Distefano, D.S., Katoen, J.P., Rensink, A.: Towards model checking OCL. In: ECOOP 2000: Defining Precise Semantics for UML, Sophia Antipolis, France (June 2000)
Gogolla, M., Büttner, F., Richters, M.: USE: A UML-Based Specification Environment for Validating UML and OCL. Science of Computer Programming 69, 27–34 (2007)
Hudak, P.: Modular Domain Specific Languages and Tools. In: Proceedings of the Fifth International Conference on Software Reuse, pp. 134–142. IEEE Computer Society Press, Los Alamitos (1998)
Hußmann, H., Demuth, B., Finger, F.: Modular architecture for a toolset supporting OCL. Science of Computer Programming 44(1), 51–69 (2002)
Jiang, K., Zhang, L., Miyake, S.: Using OCL in Executable UML. ECEASST 9 (2008)
Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: A model transformation tool. Science of Computer Programming 72(1-2), 31–39 (2008)
Klasse Objecten. The Klasse Objecten OCL Checker Octopus. website, www.klasse.nl/english/research/octopus-intro.html , Klasse Objecten (2005)
Kolovos, D.S., Paige, R.F., Polack, F.: The Epsilon Object Language (EOL). In: Rensink, A., Warmer, J. (eds.) ECMDA-FA 2006. LNCS, vol. 4066, pp. 128–142. Springer, Heidelberg (2006)
Krahn, H., Rumpe, B., Völkel, S.: MontiCore: Modular Development of Textual Domain Specific Languages. In: Paige, R.F., Meyer, B. (eds.) TOOLS (46). LNBIP, vol. 11, pp. 297–315. Springer, Heidelberg (2008)
Krieger, M.P., Knapp, A.: Executing Underspecified OCL Operation Contracts with a SAT Solver. ECEASST 15 (2008)
Markovic, S., Baar, T.: Refactoring OCL annotated UML class diagrams. Software and System Modeling 7(1), 25–47 (2008)
Eclipse model development tools (MDT) project page. Website, http://www.eclipse.org/modeling/mdt/ (last visited February 10, 2011)
Mellor, S.J.: Executable UML: A Foundation for Model-Driven Architecture. Addison-Wesley (2002)
Mellor, S.J., Scott, K., Uhl, A., Weise, D.: MDA Distilled: Principles of Model-Driven Architecture. Addison-Wesley, Boston (2004)
Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1992)
Siikarla, J.P.M., Selonen, P.: Combining OCL and Programming Languages for UML Model Processing. In: Schmitt, P.H. (ed.) Proceedings of the Workshop, OCL 2.0 – Industry Standard or Scientific Playground, vol. 102. Elsevier (2004)
OMG. MDA Guide Version 1.0.1. Object Management Group, Inc., Framingham, Mass, Internet (June 2003), http://www.omg.org
OMG. Object Constraint Language Specification, version 2.0 (Document formal/2006-05-01) (June 2006)
OMG. Meta Object Facility (MOF) 2.0 Query/Views/Transformation Specification (Document formal/08-04-03). Object Management Group, Inc., Framingham, Mass, Internet (2008), http://www.omg.org
Richters, M.: A Precise Approach to Validating UML Models and OCL Constraints. PhD thesis, Universität Bremen, Fachbereich Mathematik und Informatik, Logos Verlag, Berlin, BISS Monographs, No. 14 (2002)
RoclET-Team. Welcome to RoclET. Website, http://www.roclet.org/ (last visited February 10, 2011)
Warmer, J., Kleppe, A.: The Object Constraint Language: Getting Your Models Ready for MDA. Object Technology Series. Addison-Wesley, Reading (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Büttner, F., Gogolla, M. (2011). Modular Embedding of the Object Constraint Language into a Programming Language. In: Simao, A., Morgan, C. (eds) Formal Methods, Foundations and Applications. SBMF 2011. Lecture Notes in Computer Science, vol 7021. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25032-3_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-25032-3_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-25031-6
Online ISBN: 978-3-642-25032-3
eBook Packages: Computer ScienceComputer Science (R0)