MySQL4OCL: A Stored Procedure-Based MySQL Code Generator for OCL - Egea, Marina; Dania, Carolina; Clavel, Manuel (Electronic Communications of the EASST, 2010)
In this paper we introduce a MySQL code generator for a signiﬁcant subset of OCL expressions which is based on the use of stored procedures for mapping OCL iterators. Our code generator is deﬁned recursively over the structure of OCL expressions. We discuss the class of OCL expressions covered by our deﬁnition (which includes, possibly nested, iterator expressions) as well as some extensions needed to cover the full OCL language. We also discuss the efﬁciency of the MySQL code produced by our code generator, and compare it with previous known results on evaluating OCL expressions on medium-large scenarios. We have implemented our code generator in the MySQL4OCL tool.