Formalization of UML Composition in OCL
With the increasing use of design models during the development process, developers now face a daunting task to maintain consistency between the design models and their implementation. Consistency maintenance is particularly challenging when a design model language introduces constructs that have no direct counterpart in programming languages. For example, the UML composition, an important relationship in software development, reflects some important principles in software engineering such as encapsulation. Unfortunately, influenced by the ownership model, existing approaches supporting UML composition require the non-accessibility property. However, composition in the UML specification does not support the ownership model. In this paper we present a UML composition formalization using the Object Constraint Language (OCL) that strictly adheres to the UML specification.