A Role-Based Approach towards Modular Language Engineering

  • Christian Wende
  • Nils Thieme
  • Steffen Zschaler
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5969)


Modularisation can reduce the effort in designing and maintaining language specifications. Existing approaches to language modularisation are typically either focused on language syntax or on language semantics. In this paper, we propose a modularisation approach covering both syntax and semantics. We propose defining composition rules on the level of abstract syntax, making it the central artefact in a language module. To enable clean interfaces for such language modules—effectively making them language components—we use role-modelling at the metamodel level.

We discuss how role-based metamodelling supports the aspectual modularisation of language semantics and can also be integrated with concrete syntax specifications to build self-contained language components. We present the implementation of our approach in the LanGems language compositions system and show how it can be used to provide a modularised definition of the Object Constraint Language.


Abstract Syntax Language Module Concrete Syntax Role Type Component Semantic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    van Deursen, A., Klint, P., Visser, J.: Domain-Specific Languages: An Annotated Bibliography. SIGPLAN Notices 35(6), 26–36 (2000)CrossRefGoogle Scholar
  2. 2.
    Kelly, S., Tolvanen, J.P.: Domain-Specific Modeling. John Wiley & Sons Inc., Hoboken (2008)CrossRefGoogle Scholar
  3. 3.
    Szyperski, C.: Component Software: Beyond Object-Oriented Programming, 2nd edn. Component Software Series. Addison-Wesley Publishing Company, Reading (2002)Google Scholar
  4. 4.
    Aßmann, U.: Invasive Software Composition. Springer, New-York (2003)zbMATHGoogle Scholar
  5. 5.
    Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The Syntax Definition Formalism SDF – Reference Manual. SIGPLAN Notices 24(11), 43–75 (1989)CrossRefGoogle Scholar
  6. 6.
    Mernik, M., Lenič, M., Avdičaušević, E., Žumer, V.: The Template and Multiple Inheritance Approach Into Attribute Grammars. In: International Conference on Computer Languages, pp. 102–110 (1998)Google Scholar
  7. 7.
    Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Bravenboer, M., Visser, E.: Parse Table Composition Separate Compilation and Binary Extensibility of Grammars. In: Gašević, D., Lämmel, R., Van Wyk, E. (eds.) SLE 2008. LNCS, vol. 5452, pp. 74–94. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  9. 9.
    Hedin, G., Magnusson, E.: The JastAdd System – An Aspect-Oriented Compiler Construction System. Science of Computer Programming 47, 37–58 (2003)zbMATHCrossRefGoogle Scholar
  10. 10.
    Van Wyk, E., Bodin, D., Krishnan, L., Gao, J.: Silver: an Extensible Attribute Grammar System. In: 7th Workshop on Language Descriptions, Tools, and Analysis, LDTA 2007 (2007)Google Scholar
  11. 11.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, 2nd edn. Addison-Wesley, Reading (2006)Google Scholar
  12. 12.
    Kleppe, A.: Software Language Engineering. Pearson Education, London (2009)Google Scholar
  13. 13.
    Greenfield, J., Short, K.: Software Factories: Assembling Applications with Patterns, Frameworks, Models & Tools (2004)Google Scholar
  14. 14.
    Jouault, F., Bezivin, J.: KM3: a DSL for Metamodel Specification. In: Gorrieri, R., Wehrheim, H. (eds.) FMOODS 2006. LNCS, vol. 4037, pp. 171–185. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  15. 15.
    OMG: MOF 2.0 core specification. OMG Document (January 2006),
  16. 16.
    Ledeczi, A., Maroti, M., Bakay, A., Karsai, G., Garrett, J., Thomason, C., Nordstrom, G., Sprinkle, J., Volgyesi, P.: The Generic Modeling Environment. In: Workshop on Intelligent Signal Processing, Budapest, Hungary, vol. 17 (2001)Google Scholar
  17. 17.
    Amelunxen, C., Königs, A., Rötschke, T., Schürr, A.: MOFLON: A Standard-Compliant Metamodeling Framework with Graph Transformations. In: Rensink, A., Warmer, J. (eds.) ECMDA-FA 2006. LNCS, vol. 4066, pp. 361–375. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. 18.
    MetaCase: MetaEdit+ - Workbench Users Guide. Online User’s Guide (2009),
  19. 19.
    Bracha, G., Lindstrom, G.: Modularity Meets Inheritance. In: International Conference on Computer Languages, pp. 282–290. IEEE Computer Society, Los Alamitos (1992)CrossRefGoogle Scholar
  20. 20.
    Taivalsaari, A.: On the Notion of Inheritance. ACM Computing Surveys 28(3), 438–479 (1996)CrossRefGoogle Scholar
  21. 21.
    Reenskaug, T.: Working with objects. The OOram Software Engineering Method. Manning/Prentice Hall (1996)Google Scholar
  22. 22.
    Steimann, F.: On the Representation of Roles in Object-Oriented and Conceptual Modelling. Data Knowledge Engineering 35(1), 83–106 (2000)zbMATHCrossRefGoogle Scholar
  23. 23.
    Andersen, E.P.: Conceptual Modeling of Objects: A Role Modeling Approach. Ph.D. Thesis. Oslo, Norway, University of Oslo (1997)Google Scholar
  24. 24.
    Paton, N.W. (ed.): Active Rules in Database Systems. Springer, New York (1999)zbMATHGoogle Scholar
  25. 25.
    Budinsky, F., Brodsky, S.A., Merks, E.: Eclipse Modeling Framework. Pearson Education, London (2003)Google Scholar
  26. 26.
    Heidenreich, F., Johannes, J., Karol, S., Seifert, M., Wende, C.: Derivation and Refinement of Textual Syntax for Models. In: Paige, R.F., Hartman, A., Rensink, A. (eds.) ECMDA-FA 2009. LNCS, vol. 5562, pp. 114–129. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  27. 27.
    Salomon, D., Cormack, G.: Scannerless NSLR (1) parsing of programming languages. In: Proceedings of the SIGPLAN 1987 symposium on Interpreters and interpretive techniques, vol. 24(7), pp. 170–178 (1989)Google Scholar
  28. 28.
    Visser, E.: Scannerless Generalized-LR Parsing. Technical Report, Programming Research Group, University of Amsterdam, P9707 (July 1997)Google Scholar
  29. 29.
    van den Brand, M., Scheerder, J., Vinju, J., Visser, E.: Disambiguation Filters for Scannerless Generalized LR Parsers. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, p. 143. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  30. 30.
    Clark, T., Sammut, P., Willans, J.: Applied Metamodelling a Foundation for Language Driven Development, 2nd edn. Ceteva (2008),
  31. 31.
    Winskel, G.: Formal Semantics of Programming Languages. MIT Press, Cambridge (1993)zbMATHGoogle Scholar
  32. 32.
    Knuth, D.E.: Semantics of context-free languages. Mathematical Systems Theory 5(1) (1971)Google Scholar
  33. 33.
    Ekman, T., Hedin, G.: The JastAdd extensible Java compiler. SIGPLAN Not. 42(10) (2007)Google Scholar
  34. 34.
    Van Wyk, E., Krishnan, L., Bodin, D., Schwerdfeger, A.: Attribute Grammar-based Language Extensions for Java. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 575–599. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  35. 35.
    Kastens, U., Waite, W.: Modularity and Reusability in Attribute Grammars. Acta Informatica 31(7), 601–627 (1994)zbMATHCrossRefGoogle Scholar
  36. 36.
    Kang, K., Cohen, S., Hess, J., Novak, W., Peterson, A.: Feature-Oriented Domain Analysis (FODA) Feasibility Study. Technical Report CMU/SEI-90-TR-0211990, Software Engineering Institute (1990)Google Scholar
  37. 37.
    Object Management Group: UML 2.0 OCL specification. Object Management Group Available Specification, formal/06-05-01 (May 2006),
  38. 38.
    Akehurst, D., Zschaler, S., Howells, G.: OCL: Modularising the language. In: Ocl4All: Workshop at MoDELS 2007, Electronic Communications of the EASST, vol. 9 (2008)Google Scholar
  39. 39.
    Thieme, N.: Modulare Redefinition von OCL. Diplomarbeit, Technische Universität Dresden, Germany (2008) (in German)Google Scholar
  40. 40.
    Moreau, P., Ringeissen, C., Vittek, M.: A Pattern Matching Compiler for Multiple Target Languages. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 61–76. Springer, Heidelberg (2003)Google Scholar
  41. 41.
    Krahn, H., Rumpe, B., Völkel, S.: MontiCore: Modular Development of Textual Domain Specific Languages. In: 46th International Conference on Objects, Models, Components, Patterns, TOOLS-Europe (2008)Google Scholar
  42. 42.
    Van Wyk, E., Schwerdfeger, A.C.: Context-aware scanning for parsing extensible languages. In: 6th International Conference on Generative Programming and Component Engineering (GPCE 2007), pp. 63–72. ACM, New York (2007)Google Scholar
  43. 43.
    Clark, C.: Newlines and Lexer States. SIGPLAN Notices 35(4), 18–24 (2000)CrossRefGoogle Scholar
  44. 44.
    Bosch, J.: Delegating Compiler Objects: Modularity and Reusability in Language Engineering. Nordic J. of Computing 4(1), 66–92 (1997)zbMATHGoogle Scholar
  45. 45.
    Ford, B.: Parsing Expression Grammars: A Recognition-based Syntactic Foundation. In: 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2004), pp. 111–122. ACM, New York (2004)CrossRefGoogle Scholar
  46. 46.
    Grimm, R.: Better Extensibility through Modular Syntax. In: 2006 ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI 2006), pp. 38–51. ACM, New York (2006)CrossRefGoogle Scholar
  47. 47.
    Lämmel, R., Riedewald, G.: Reconstruction of paradigm shifts, INRIA (1999) ISBN 2-7261-1138-6Google Scholar
  48. 48.
    Lämmel, R.: Declarative aspect-oriented programming, pp. 131–146 (1999)Google Scholar
  49. 49.
    Cazzola, W., Speziale, I.: Sectional Domain Specific Languages. In: Workshop on Domain-Specific Aspect Languages (DSAL 2009), co-located with AOSD 2009, pp. 11–14 (2009)Google Scholar
  50. 50.
    White, J., Schmidt, D.C., Mulligan, S.: The Generic Eclipse Modeling System. In: Model-Driven Development Tool Implementer’s Forum, TOOLS 2007 (2007)Google Scholar
  51. 51.
    Jetbrains: MPS - Meta Programming System. MPS Website (2009),
  52. 52.
    Atkinson, C., Kühne, T.: The Essence of Multilevel Metamodeling. In: Gogolla, M., Kobryn, C. (eds.) UML 2001. LNCS, vol. 2185, pp. 19–33. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  53. 53.
    Völter, M.: A Family of Languages for Architecture Description. In: Proceedings of the 8th Workshop on Domain-Specific Modeling (2008)Google Scholar
  54. 54.
    Rose, L.M., Paige, R.F., Kolovos, D.S., Polack, F.: The Epsilon Generation Language. In: Proceedings of the 4th European Conference on Model Driven Architecture - Foundations and Applications, pp. 1–16 (2008)Google Scholar
  55. 55.
    Wende, C., Heidenreich, F.: A Model-based Product-Line for Scalable Ontology Languages. In: Proceedings of the 1st International Workshop on Model-Driven Product Line Engineering (2009)Google Scholar
  56. 56.
    Zschaler, S., Kolovos, D., Drivalos, N., Paige, R., Rashid, A.: Domain-Specific Metamodelling Languages for Software Language Engineering. In: 2nd Int’l Conf. on Software Language Engineering, SLE (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Christian Wende
    • 1
  • Nils Thieme
    • 1
  • Steffen Zschaler
    • 2
  1. 1.Institut für Software- und MultimediatechnikTechnische Universität DresdenDresdenGermany
  2. 2.Computing DepartmentLancaster UniversityLancasterUK

Personalised recommendations