Abstract
Although there are powerful model transformation languages (MTLs) like ATL, model-to-model transformations still are often implemented in general-purpose languages (GPLs) like Java, especially in EMF-based projects. Developers might hesitate to learn another language, use new tools, or they feel limited by the specific but less versatile constructs an MTL provides. However, model transformation code written in a GPL is less readable, contains redundancies or verbose expressions, and there are fewer possibilities for formal reasoning. Our approach combines some benefits of MTLs with GPL programming. We use the GPL Scala to realize MTLs similar to ATL as internal domain-specific languages. The benefits are seamless integration with EMF and state-of-the-art tool support as well as the possibility to extend MTLs and to mix MTL and GPL code. In contrast to similar approaches with dynamically typed languages like Ruby, Scala allows for static type-safety without adding syntactic clutter.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Barringer, H., Havelund, K.: TraceContract: A Scala DSL for Trace Analysis. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 57–72. Springer, Heidelberg (2011)
Cuadrado, J.S., Molina, J.G., Tortosa, M.M.: RubyTL: A Practical, Extensible Transformation Language. In: Rensink, A., Warmer, J. (eds.) ECMDA-FA 2006. LNCS, vol. 4066, pp. 158–172. Springer, Heidelberg (2006)
Cuadrado, J.S., Molina, J.G.: A Plugin-Based Language to Experiment with Model Transformation. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 336–350. Springer, Heidelberg (2006)
Cuadrado, J.S., Molina, J.G.: Modularization of Model Transformations Through a Phasing Mechanism. Software and Systems Modeling 8(3), 325–345 (2009)
Cuadrado, J.S., Molina, J.G.: Approaches for Model Transformation Reuse: Factorization and Composition. In: Vallecillo, A., Gray, J., Pierantonio, A. (eds.) ICMT 2008. LNCS, vol. 5063, pp. 168–182. Springer, Heidelberg (2008)
Czarnecki, K., Helsen, S.: Classification of model transformation approaches. In: 2nd Workshop on Generative Techniques in the Context of MDA, pp. 1–17 (2003)
Fowler, M.: Domain-Specific Languages. Addison-Wesley (October 2010)
Günther, S., Cleenewerck, T.: Design Principles for Internal Domain-Specific Languages: A Pattern Catalog illustrated by Ruby. In: 17th Conference on Pattern Languages of Programs, PLoP (2010)
Halstead, M.: Elements of Software Science. Elsevier Science Inc. (1977)
Hofer, C., Ostermann, K., Rendel, T., Moors, A.: Polymorphic Embedding of DSLs. In: 7th Conference on Generative Programming and Component Engineering, GPCE 2008, pp. 137–148. ACM (2008)
Jouault, F., Kurtev, I.: Transforming Models with ATL. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 128–138. Springer, Heidelberg (2006)
Kiselyov, O., Lämmel, R., Schupke, K.: Strongly typed heterogeneous collections. In: Haskell 2004: ACM SIGPLAN Workshop on Haskell, pp. 96–107. ACM (2004)
Picard, C.: Model Transformation with Scala. Master’s thesis, Universitat Politècnica de Catalunya (2008)
Pointner, R.: An Evaluation of Scala as a host language for DSLs. Tech. rep., University of Central Lancashire (June 2010)
Sloane, A.M.: Lightweight Language Processing in Kiama. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2009. LNCS, vol. 6491, pp. 408–425. Springer, Heidelberg (2011)
Spiewak, D., Zhao, T.: ScalaQL: Language-Integrated Database Queries for Scala. In: van den Brand, M., Gašević, D., Gray, J. (eds.) SLE 2009. LNCS, vol. 5969, pp. 154–163. Springer, Heidelberg (2010)
Wider, A.: Towards Combinators for Bidirectional Model Transformations in Scala. In: 4th Conference on Software Language Engineering (SLE 2011). Springer (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
George, L., Wider, A., Scheidgen, M. (2012). Type-Safe Model Transformation Languages as Internal DSLs in Scala. In: Hu, Z., de Lara, J. (eds) Theory and Practice of Model Transformations. ICMT 2012. Lecture Notes in Computer Science, vol 7307. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30476-7_11
Download citation
DOI: https://doi.org/10.1007/978-3-642-30476-7_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-30475-0
Online ISBN: 978-3-642-30476-7
eBook Packages: Computer ScienceComputer Science (R0)