A Role-Based Approach towards Modular Language Engineering

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.

[1]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools (2nd Edition) , 2006 .

[2]  Ralf Lämmel,et al.  Reconstruction of paradigm shifts , 1999 .

[3]  Donald E. Knuth Semantics of context-free languages: Correction , 2005, Mathematical systems theory.

[4]  Gordon V. Cormack,et al.  Scannerless NSLR(1) parsing of programming languages , 1989, PLDI '89.

[5]  Jean Bézivin,et al.  KM3: A DSL for Metamodel Specification , 2006, FMOODS.

[6]  Mirko Seifert,et al.  Derivation and Refinement of Textual Syntax for Models , 2009, ECMDA-FA.

[7]  Bernhard Rumpe,et al.  MontiCore: Modular Development of Textual Domain Specific Languages , 2008, TOOLS.

[8]  Uwe Aßmann,et al.  Invasive Software Composition , 2003, Springer Berlin Heidelberg.

[9]  Trygve Reenskaug,et al.  Working with objects - the OOram software engineering method , 1995 .

[10]  Robert Grimm,et al.  Better extensibility through modular syntax , 2006, PLDI '06.

[11]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[12]  Clemens A. Szyperski,et al.  Component software - beyond object-oriented programming , 2002 .

[13]  Jack Greenfield Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools , 2004, SPLC.

[14]  Eric Van Wyk,et al.  Context-aware scanning for parsing extensible languages , 2007, GPCE '07.

[15]  Markus Voelter A Family of Languages for Architecture Description , 2008 .

[16]  Gabor Karsai,et al.  The Generic Modeling Environment , 2001 .

[17]  Eric Van Wyk,et al.  Silver: An extensible attribute grammar system , 2008, Sci. Comput. Program..

[18]  Eelco Visser,et al.  Parse Table Composition , 2009, SLE.

[19]  Colin Atkinson,et al.  The Essence of Multilevel Metamodeling , 2001, UML.

[20]  William M. Waite,et al.  Modularity and reusability in attribute grammars , 1994, Acta Informatica.

[21]  G. Winskel The formal semantics of programming languages , 1993 .

[22]  Eric Van Wyk,et al.  Attribute Grammar-Based Language Extensions for Java , 2007, ECOOP.

[23]  Chris Clark Newlines and lexer states , 2000, SIGP.

[24]  Arie van Deursen,et al.  Domain-specific languages: an annotated bibliography , 2000, SIGP.

[25]  Ralf Lämmel,et al.  Declarative Aspect-Oriented Programming , 1999, PEPM.

[26]  Eelco Visser,et al.  Scannerless Generalized-LR Parsing , 1997 .

[27]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[28]  Walter Cazzola,et al.  Sectional domain specific languages , 2009, DSAL '09.

[29]  Bernhard Rumpe,et al.  Domain specific modeling , 2005, Software & Systems Modeling.

[30]  Trygve Reenskaug,et al.  Working with objects , 1995 .

[31]  Viljem Zumer,et al.  The template and multiple inheritance approach into attribute grammars , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[32]  Frank Budinsky,et al.  Eclipse Modeling Framework , 2003 .

[33]  Görel Hedin,et al.  JastAdd--an aspect-oriented compiler construction system , 2003, Sci. Comput. Program..

[34]  Anneke Kleppe The Field of Software Language Engineering , 2008, SLE.

[35]  Norman W. Paton,et al.  Active Rules in Database Systems , 1998, Monographs in Computer Science.

[36]  Michael R. Clarkson,et al.  Polyglot: An Extensible Compiler Framework for Java , 2003, CC.

[37]  Christian Wende,et al.  A Model-based Product-Line for Scalable Ontology Languages (cid:63) , 2009 .

[38]  Christophe Ringeissen,et al.  A Pattern Matching Compiler for Multiple Target Languages , 2003, CC.

[39]  Richard F. Paige,et al.  Domain-Specific Metamodelling Languages for Software Language Engineering , 2009, SLE.

[40]  Eelco Visser,et al.  Disambiguation Filters for Scannerless Generalized LR Parsers , 2002, CC.

[41]  Peter Lucas,et al.  Formal Semantics of Programming Languages: VDL , 1981, IBM J. Res. Dev..

[42]  D. Schmidt,et al.  The Generic Eclipse Modeling System , 2006 .

[43]  Friedrich Steimann,et al.  On the representation of roles in object-oriented and conceptual modelling , 2000, Data Knowl. Eng..

[44]  Jan Bosch Delegating Compiler Objects: Modularity and Reusability in Language Engineering , 1997, Nord. J. Comput..

[45]  Torbjörn Ekman,et al.  The jastadd extensible java compiler , 2007, OOPSLA.

[46]  Antero Taivalsaari,et al.  On the notion of inheritance , 1996, CSUR.

[47]  Erik Ernst,et al.  ECOOP 2007 - Object-Oriented Programming, 21st European Conference, Berlin, Germany, July 30 - August 3, 2007, Proceedings , 2007, ECOOP.

[48]  Egil P. Andersen Conceptual Modeling of Objects - A Role Modeling Approach , 1997 .

[49]  W. Gareth J. Howells,et al.  OCL: Modularising the Language , 2008, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[50]  Bernhard Rumpe,et al.  MontiCore: a framework for the development of textual domain specific languages , 2008, ICSE Companion '08.

[51]  Glynn Winskel,et al.  The formal semantics of programming languages - an introduction , 1993, Foundation of computing series.

[52]  Arend Rensink Model Driven Architecture - Foundations and Applications, 5th European Conference, ECMDA-FA 2009, Enschede, The Netherlands, June 23-26, 2009. Proceedings , 2009, ECMDA-FA.

[53]  Gilad Bracha,et al.  Modularity meets inheritance , 1992, Proceedings of the 1992 International Conference on Computer Languages.

[54]  Bryan Ford,et al.  Parsing expression grammars: a recognition-based syntactic foundation , 2004, POPL '04.

[55]  Paul Klint,et al.  The syntax definition formalism SDF—reference manual— , 1989, SIGP.

[56]  Eelco Visser,et al.  Parse Table Composition : Separate Compilation and Binary Extensibility of Grammars , 2008 .

[57]  Tobias Rötschke,et al.  MOFLON: A Standard-Compliant Metamodeling Framework with Graph Transformations , 2006, ECMDA-FA.

[58]  Kyo Chul Kang,et al.  Feature-Oriented Domain Analysis (FODA) Feasibility Study , 1990 .

[59]  Richard F. Paige,et al.  The Epsilon Generation Language , 2008, ECMDA-FA.