Mohamed M Mohamed Fouad Eltaweel
An OCL–Based Code Engine Tool for UML Class Diagram
Mapping the UML models [1] to different high-level object-oriented programming languages such as Java, C++, etc is an important requirement for software development. Many commercial UML tools provide this mapping but they have a number of shortcomings some neglects the constraints on model elements defined by the Object Constraints Language (OCL) that customize the code to be generated. Another shortcoming is that some tools have no ability to maintain UML diagrams elements in a relational database repository for future reuse. Solving these problems will augment and improve the development and implementation of new software systems. This paper presents a model that overcomes the previously mentioned shortcomings. The model focuses on building an interactive development environment for code generation that maps the syntax and semantics of a Class Diagram into Java language code [2][3]. The design and implementation of that model represents the second phase of Al-Tosee research project, which is a UML based research project to build a tool for software development [4]. Al-Tosee is a platform-independent development environment that is planned to be Open Source Software to facilitate other researchers and developers’ contributions, besides supporting the wide usage of UML standards. For achieving the main objective, namely Al-Tosee Code Generator, the paper presents also another two supportive objectives. The first one is the design of a relational database repository for storing and manipulating different elements of two of the UML diagrams. Namely the Use Case diagram and the Class diagram which are the target of the first phase of Al-Tosee research project [4]. The second supportive objective is the development of an OCL syntax parser that validates the constraints written by a system designer based on the OCL specification documents delivered by OMG.