WebDSL: A Case Study in Domain-Specific Language Engineering

The goal of domain-specific languages (DSLs) is to increase the productivity of software engineers by abstracting from low-level boilerplate code. Introduction of DSLs in the software development process requires a smooth workflow for the production of DSLs themselves. This requires technology for designing and implementing DSLs, but also a methodology for using that technology. That is, a collection of guidelines, design patterns, and reusable DSL components that show developers how to tackle common language design and implementation issues. This paper presents a case study in domain-specific language engineering. It reports on a project in which the author designed and built WebDSL, a DSL for web applications with a rich data model, using several DSLs for DSL engineering: SDF for syntax definition and Stratego/XT for code generation. The paper follows the stages in the development of the DSL. The contributions of the paper are three-fold. (1) A tutorial in the application of the specific SDF and Stratego/XT technology for building DSLs. (2) A description of an incremental DSL development process. (3) A domain-specific language for web-applications with rich data models. The paper concludes with a survey of related approaches.

[1]  James R. Cordy,et al.  The TXL source transformation language , 2006, Sci. Comput. Program..

[2]  Dave Thomas,et al.  Agile Web Development with Rails , 2005 .

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

[4]  Peter Thiemann,et al.  WASH/CGI: Server-Side Web Scripting with Sessions and Typed, Compositional Forms , 2002, PADL.

[5]  Eelco Dolstra,et al.  The purely functional software deployment model , 2006 .

[6]  Eelco Visser,et al.  Building program optimizers with rewriting strategies , 1998, ICFP '98.

[7]  Anthony M. Sloane,et al.  Eli: a complete, flexible compiler construction system , 1992, CACM.

[8]  Christian Queinnec,et al.  The influence of browsers on evaluators or, continuations to program web servers , 2000, ICFP '00.

[9]  Krzysztof Czarnecki,et al.  Feature-based survey of model transformation approaches , 2006, IBM Syst. J..

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

[11]  Eelco Visser,et al.  Meta-programming with Concrete Object Syntax , 2002, GPCE.

[12]  Donald E. Knuth,et al.  On the Translation of Languages from Left to Right , 1965, Inf. Control..

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

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

[15]  Paul Klint,et al.  Compiling language definitions: the ASF+SDF compiler , 2000, TOPL.

[16]  Ralf Lämmel,et al.  Typed Combinators for Generic Traversal , 2002, PADL.

[17]  Alan L. Tharp The impact of fourth generation programming languages , 1984, SGCS.

[18]  Eelco Visser,et al.  Code generation by model transformation: a case study in transformation modularity , 2008, Software & Systems Modeling.

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

[20]  P. Klint,et al.  Efficient annotated terms , 2000 .

[21]  A B S T R Preventing Injection Attacks with Syntax Embeddings , .

[22]  Charles Consel,et al.  From a Program Family to a Domain-Specific Language , 2003, Domain-Specific Program Generation.

[23]  Eelco Visser,et al.  Mixing source and bytecode: a case for compilation by normalization , 2008, OOPSLA.

[24]  Merijn de Jonge,et al.  Imposing a memory management discipline on software deployment , 2004, Proceedings. 26th International Conference on Software Engineering.

[25]  Joseph Faisal Nusairat Beginning JBoss Seam: From Novice to Professional , 2007 .

[26]  M Mernik,et al.  When and how to develop domain-specific languages , 2005, CSUR.

[27]  Eelco Visser,et al.  Declarative Access Control for WebDSL: Combining Language Integration and Separation of Concerns , 2008, 2008 Eighth International Conference on Web Engineering.

[28]  Diomidis Spinellis,et al.  Lightweight Languages as Software Engineering Tools , 1997, DSL.

[29]  Claus Brabrand,et al.  The < bigwig > Project , 2022 .

[30]  Eelco Visser,et al.  Components for Transformation Systems , 2005 .

[31]  Donald D. Chamberlin,et al.  SEQUEL: A structured English query language , 1974, SIGFIDET '74.

[32]  Douglas C. Schmidt,et al.  Guest Editor's Introduction: Model-Driven Engineering , 2006, Computer.

[33]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[34]  Stuart Kent,et al.  Model Driven Engineering , 2002, IFM.

[35]  Eelco Visser,et al.  Program Transformation with Scoped Dynamic Rewrite Rules , 2006, Fundam. Informaticae.

[36]  Eelco Visser,et al.  Stratego/XT 0.16: components for transformation systems , 2006, PEPM '06.

[37]  Eelco Visser,et al.  Generating Editors for Embedded Languages: Integrating SGLR into IMP , 2008 .

[38]  William R. Cook,et al.  Extracting queries by static analysis of transparent persistence , 2007, POPL '07.

[39]  Eelco Visser,et al.  Program Transformation with Stratego/XT: Rules, Strategies, Tools, and Systems in Stratego/XT 0.9 , 2003, Domain-Specific Program Generation.

[40]  Terence Parr The Definitive ANTLR Reference: Building Domain-Specific Languages , 2007 .

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

[42]  Claus Brabrand,et al.  PowerForms: Declarative client-side form field validation , 2004, World Wide Web.

[43]  Leslie Lamport,et al.  Latex : A Document Preparation System , 1985 .

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

[45]  Paul Klint A Meta-Environment for Generating Programming Environments , 1989, Algebraic Methods.

[46]  Charles Consel,et al.  Architecture Software Using: A Methodology for Language Development , 1998, PLILP/ALP.

[47]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[48]  Laurence Tratt,et al.  Domain specific language implementation via compile-time meta-programming , 2008, TOPL.

[49]  Jon Louis Bentley,et al.  Programming pearls: little languages , 1986, CACM.

[50]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[51]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[52]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[53]  A. Augusteijn,et al.  Functional programming, program transformations and compiler construction , 1993 .

[54]  Aske Simon Christensen,et al.  Extending Java for High-Level Web Service Construction , 2002 .

[55]  S. Dmitriev Language Oriented Programming: The Next Programming Paradigm , 2004 .

[56]  Eelco Visser,et al.  Service configuration management , 2005, SCM '05.

[57]  Laurence Tratt,et al.  Domain Specific Language Implementation via Compile-Time MetaProgramming , 2008 .

[58]  Thomas Ball,et al.  Mawl: A Domain-Specific Language for Form-Based Services , 1999, IEEE Trans. Software Eng..

[59]  Krzysztof Czarnecki,et al.  Overview of Generative Software Development , 2004, UPP.

[60]  Jack Greenfield,et al.  Software factories: assembling applications with patterns, models, frameworks and tools , 2004, OOPSLA '03.

[61]  Vincent Balat,et al.  Ocsigen: typing web interaction with objective Caml , 2006, ML '06.

[62]  Masaru Tomita,et al.  Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems , 1985 .

[63]  Masaru Tomita,et al.  Efficient parsing for natural language , 1985 .

[64]  Eelco Visser,et al.  Stratego/XT 0.17. A language and toolset for program transformation , 2008, Sci. Comput. Program..

[65]  Jos Warmer A Model Driven Software Factory Using Domain Specific Languages , 2007, ECMDA-FA.

[66]  Donald E. Knuth,et al.  The TeXbook , 1984 .

[67]  Juha-Pekka Tolvanen,et al.  Domain-Specific Modeling: Enabling Full Code Generation , 2008 .

[68]  Eelco Visser,et al.  Syntax definition for language prototyping , 1997 .

[69]  Daan Leijen,et al.  Domain specific embedded compilers , 1999, DSL '99.

[70]  Thomas Reps,et al.  The Synthesizer Generator: A System for Constructing Language-Based Editors , 1988 .

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

[72]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[73]  Friedrich L. Bauer,et al.  Report on the algorithmic language ALGOL 60 , 1960, Commun. ACM.

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

[75]  William Clinger Macros in Scheme , 1991, LIPO.

[76]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[77]  Christian Bauer,et al.  Java Persistence with Hibernate , 2006 .

[78]  Eelco Visser,et al.  Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions , 2004, OOPSLA '04.

[79]  Simon L. Peyton Jones,et al.  Template meta-programming for Haskell , 2002, Haskell '02.

[80]  K. Beck,et al.  Extreme Programming Explained , 2002 .

[81]  Eelco Visser,et al.  Preventing Injection Attacks with Syntax Embeddings: A Host and Guest Language Independent Approach , 2007 .

[82]  Volker Gruhn,et al.  Model-Driven Software Development , 2005 .

[83]  Eelco Visser,et al.  Code Generation by Model Transformation , 2008, ICMT@TOOLS.

[84]  Guy L. Steele,et al.  Growing a Language , 1999, High. Order Symb. Comput..

[85]  Thorsten Sturm,et al.  Generating Code from UML with Velocity Templates , 2002, UML.

[86]  Diomidis Spinellis,et al.  Notable design patterns for domain-specific languages , 2001, J. Syst. Softw..

[87]  E. F. CODD,et al.  A relational model of data for large shared data banks , 1970, CACM.

[88]  Eelco Visser,et al.  Designing Syntax Embeddings and Assimilations for Language Libraries , 2007, MoDELS Workshops.

[89]  Eelco Visser,et al.  A survey of strategies in rule-based program transformation systems , 2005, J. Symb. Comput..

[90]  Kito D. Mann JavaServer Faces in Action (In Action series) , 2005 .

[91]  Torbjörn Ekman,et al.  Rewritable Reference Attributed Grammars , 2004, ECOOP.

[92]  Charles Simonyi,et al.  Intentional software , 2006, OOPSLA '06.

[93]  M. deJonge A pretty-printer for every occasion , 2001 .

[94]  Donald E. Knuth,et al.  backus normal form vs. Backus Naur form , 1964, CACM.

[95]  Matthias Felleisen,et al.  Implementation and use of the PLT scheme Web server , 2007, High. Order Symb. Comput..

[96]  Ian Jacobs,et al.  Cascading Style Sheets, level 2 CSS2 Specification , 2008 .

[97]  Terence John Parr,et al.  Enforcing strict model-view separation in template engines , 2004, WWW '04.

[98]  Matti Husu Software Factories , 2006 .

[99]  Arie van Deursen,et al.  Little languages: little maintenance , 1998 .

[100]  Paul Hudak,et al.  Building domain-specific embedded languages , 1996, CSUR.

[101]  Axel Uhl,et al.  Model-Driven Architecture , 2002, OOIS Workshops.

[102]  Stéphane Ducasse,et al.  Seaside: A Flexible Environment for Building Dynamic Web Applications , 2007, IEEE Software.

[103]  Steve Cook,et al.  Domain-Specific Development with Visual Studio DSL Tools , 2007 .