Abstract
Reuse is a key technique for a more efficient development and ensures the quality of the results. In object technology explicit encapsulation, interfaces, and inheritance are well-known principles for independent development that enable combination and reuse of developed artifacts. In this paper we apply modularity concepts for domain specific languages (DSLs) and discuss how they help to design new languages by extending existing ones and composing fragments to new DSLs. We use an extended grammar format with appropriate tool support that avoids redefinition of existing functionalities by introducing language inheritance and embedding as first class artifacts in a DSL definition. Language embedding and inheritance is not only assisted by the parser, but also by the editor, and algorithms based on tree traversal like context checkers, pretty printers, and code generators. We demonstrate that compositional engineering of new languages becomes a useful concept when starting to define project-individual DSLs using appropriate tool support.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Spinellis, D.: Notable Design Patterns for Domain Specific Languages. Journal of Systems and Software 56(1), 91–99 (2001)
Grönniger, H., Krahn, H., Rumpe, B., Schindler, M., Völkel, S.: MontiCore 1.0 - Ein Framework zur Erstellung und Verarbeitung domänenspezifischer Sprachen. Technical Report Informatik-Bericht 2006-04, Software Systems Engineering Institute, Braunschweig University of Technology (2006)
Krahn, H., Rumpe, B., Völkel, S.: Integrated Definition of Abstract and Concrete Syntax for Textual Languages. In: Proceedings of Models 2007 (2007)
MontiCore Website, http://www.monticore.de
Krahn, H., Rumpe, B., Völkel, S.: Efficient Editor Generation for Compositional DSLs in Eclipse. In: Proceedings of the 7th OOPSLA Workshop on Domain-Specific Modeling 2007 (2007)
Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972)
Klint, P., Lämmel, R., Verhoef, C.: Toward an engineering discipline for grammarware. ACM Transactions on Software Engineering Methodology 14(3), 331–380 (2005)
Tomita, M.: Efficient Parsing for Natural Languages. A Fast Algorithm for Practical Systems. Kluwer Academic Publishers (1985)
Earley, J.: An efficient context-free parsing algorithm. Communications of the Association for Computing Machinery 13(2), 94–102 (1970)
Ford, B.: Packrat parsing: Simple, powerful, lazy, linear time. In: Proceedings of the 2002 International Conference on Functional Programming (2002)
Grimm, R.: Better extensibility through modular syntax. In: PLDI 2006: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation, pp. 38–51. ACM, New York (2006)
Bravenboer, M., Visser, E.: Designing Syntax Embeddings and Assimilations for Language Libraries. In: 4th International Workshop on Software Language Engineering (2007)
Bravenboer, M., Visser, E.: Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions. In: Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2004, Vancouver, BC, Canada, October 24-28, 2004, pp. 365–383 (2004)
Bravenboer, M., de Groot, R., Visser, E.: Metaborg in action: Examples of domain-specific language embedding and assimilation using stratego/xt. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2005. LNCS, vol. 4143. Springer, Heidelberg (2006)
Wyk, E., Moor, O., Backhouse, K., Kwiatkowski, P.: Forwarding in Attribute Grammars for Modular Language Design. In: Proceedings of the 11th International Conference on Compiler Construction 2002, pp. 128–142. Springer, London (2002)
Mernik, M., Žumer, V., Lenič, M., Avdičaušević, E.: Implementation of multiple attribute grammar inheritance in the tool LISA. SIGPLAN Not. 34(6), 68–75 (1999)
Mernik, M., Lenič, M., Avdičaušević, E., Žumer, V.: Multiple Attribute Grammar Inheritance. In: Parigot, D., Mernik, M. (eds.) Second Workshop on Attribute Grammars and their Applications, WAGA 1999, Amsterdam, The Netherlands, pp. 57–76. INRIA rocquencourt (1999)
Adams, S.R.: Modular Grammars for Programming Language Prototyping. PhD thesis, University of Southhampton (1991)
Ekman, T., Hedin, G.: The jastadd system - modular extensible compiler construction. Sci. Comput. Program. 69(1-3), 14–26 (2007)
Ledeczi, A., Maroti, M., Bakay, A., Karsai, G., Garrett, J., Thomason, C.: The Generic Modeling Environment. In: International Workshop on Intelligent Signal Processing (WISP), IEEE (2001)
MetaCase Website, http://www.metacase.com
Meta Programming System Website, http://www.jetbrains.com/mps/
OpenArchitectureWare Website, http://www.openarchitectureware.com/
Amelunxen, C., Königs, A., Rötschke, T., Schürr, A.: MOFLON: A Standard-Compliant Metamodeling Framework with Graph Transformations. In: Proceedings of Model Driven Architecture - Foundations and Applications: Second European Conference. LNCS, vol. 4066, pp. 361–375. Springer, Heidelberg (2006)
Jouault, F., Bezivin, J., Kurtev, I.: TCS: a DSL for the Specification of Textual Concrete Syntaxes in Model Engineering. In: Proceedings of the fifth international conference on Generative programming and Component Engineering (2006)
Parr, T., Quong, R.: ANTLR: A Predicated-LL(k) Parser Generator. Journal of Software Practice and Experience 25(7), 789–810 (1995)
Kadhim, B.M., Waite, W.M.: Maptool - Supporting Modular Syntax Development. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 268–280. Springer, Heidelberg (1996)
Meijer, E., Beckman, B., Bierman, G.: Linq: reconciling object, relations and xml in the.net framework. In: SIGMOD 2006: Proceedings of the 2006 ACM SIGMOD international conference on Management of data, pp. 706–706. ACM, New York (2006)
Object Management Group: Unified Modeling Language: Superstructure Version 2.0 (05-07-04) (August (2005), http://www.omg.org/docs/formal/05-07-04.pdf
Budinsky, F., Steinberg, D., Merks, E., Ellersick, R., Grose, T.J.: Eclipse Modeling Framework. Addison-Wesley (2003)
Lämmel, R.: Grammar Adaptation. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 550–570. Springer, Heidelberg (2001)
Rumpe, B.: Modellierung mit UML. Springer, Berlin (2004)
Rumpe, B.: Agile Modellierung mit UML: Codegenerierung, Testfälle, Refactoring. Springer, Berlin (2004)
Höwing, F.: Effiziente entwicklung von autosar-komponenten mit domänenspezifischen programmiersprachen. In: Proceedings of 5th Workshop Automotive Software Engineering, Bremen, Germany. LNI, p. 110 (2007)
Grönniger, H., Hartmann, J., Krahn, H., Kriebel, S., Rothhardt, L., Rumpe, B.: Modelling automotive function nets with views for features, variants, and modes. In: Proceedings of ERTS 2008 (2008)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Krahn, H., Rumpe, B., Völkel, S. (2008). MontiCore: Modular Development of Textual Domain Specific Languages. In: Paige, R.F., Meyer, B. (eds) Objects, Components, Models and Patterns. TOOLS EUROPE 2008. Lecture Notes in Business Information Processing, vol 11. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69824-1_17
Download citation
DOI: https://doi.org/10.1007/978-3-540-69824-1_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69823-4
Online ISBN: 978-3-540-69824-1
eBook Packages: Computer ScienceComputer Science (R0)