Vol: 53(67) No: 1 / March 2008 OCL Compiler Support for Modeling Environments with Incremental Compilation Tamas Vajk Department of Automation and Applied Informatics, Budapest University of Technology and Economics, Goldmann György tér 3. IV. Em., 1111 Budapest, Hungary, phone: (361) 463-2870, e-mail: tamas.vajk@aut.bme.hu Gergely Mezei Department of Automation and Applied Informatics, Budapest University of Technology and Economics, Goldmann György tér 3. IV. Em., 1111 Budapest, Hungary, e-mail: gmezei@aut.bme.hu Tihamer Levendovszky Department of Automation and Applied Informatics, Budapest University of Technology and Economics, Goldmann György tér 3. IV. Em., 1111 Budapest, Hungary, e-mail: tihamer@aut.bme.hu Keywords: UML, OCL, Metamodeling, Compiler, C#, Transformation, VMTS. Abstract In software engineering, Model-Driven Architecture is a widely adopted software design approach, which is intended to support model-driven development of software systems based on specifications expressed as models. In MDA, system functionality is expressed with a Platform Independent Model and it is translated into corresponding Platform Specific Models, required by the software specification. All of these domain specific models have to conform to different rule sets that are encapsulated in metamodels. Metamodel-based software design is flexible; however, there are cases when a textual language is also needed to specify precise constraints on models. In our solution, the Object Constraint Language has been utilized for this purpose. This paper summarizes the steps of creating a compiler that translates OCL constructs into their .NET C# counterparts. Also, we introduce a method that enables incremental OCL code building and therefore reduces the development time. The background and implementation framework for the discussed compiler are the Visual Modeling and Transformation System. References [1] A. Kleppe, J. Warmer and W. Bast, “MDA Explained: The Model Driven Architecture: Practice and Promise”, Addison Wesley, 2003. [2] QVT, Object Management Group Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification (2007). URL http://www.omg.org/docs/ptc/07-07-07.pdf [3] J. Warmer and A. Kleppe, “Object Constraint Language, “The: Getting Your Models Ready for MDA”, Second Edition,” Addison Wesley, 2003. [4] T. Levendovszky, L. Lengyel, G. Mezei and H. Charaf, “A Systematic Approach to Metamodeling Environments and Model Transformation Systems in VMTS”, in: International Workshop on Graph-Based Tools (GraBaTs) Electronic Notes in Theoretical Computer Science, Rome, Italy, 2005, pp. 65–75. [5] G. Mezei, T. Levendovszky and H. Charaf, “Implementing an OCL 2.0 Compiler for Metamodeling Environments”, in: 4th Slovakian - Hungarian Joint Symposium on Applied Machine Intelligence, SAMI 2006, Herlany, Slovakia, 2006, pp. 544–555. [6] J. P. Bennett, “Introduction to Compiling Techniques”, McGraw Hill Publishing Company, 1996 [7] ANTLR - ANother Tool for Language Recognition, 2007, http://antlr.org/. [8] Bison - GNU parser generator, 2007, http://www.gnu.org/software/bison/. [9] Alfred V. Aho and Ravi Sethi and Jeffrey D. Ullman, “Compilers: Principles, Techniques, and Tools”, Addison Wesley, Pearson Education, 1986. [10] T. Vajk, G. Mezei and H. Charaf, “Architecture of an In-Memory Transformation Engine”, in: 8th International Symposium of Hungarian Researchers on Computational Intelligence, Budapest, Hungary, 2007, pp. 573–581. |