Modernizing the WebDSL front-end: A case study in SDF3 and Statix
Master Project of Max de Krieger

Project description

The implementation of a programming languages can be separated into two parts: the front-end and the back-end. The front-end is the part of the programming language with which the user interacts (the syntax, early feedback using analysis results) and the back-end is the part that makes the programming language operational (optimization, code generation). While the back-end of a programming language makes it work, the front-end defines how a user experiences the programming language.

WebDSL is a domain-specific language for developing web applications. The language incorporates ideas from various web programming frame-works and produces code for all tiers in a web application [1]. Ever since its introduction over 10 years ago [2], WebDSL has been the subject of many published papers and on top of that, is the programming language underpinning several applications used daily by thousands of users. Examples of WebDSL applications include but are not limited to:

  • WebLab: An online learning management system, used by the Delft University of Technology.
  • A domain-specific content management system for conferences, used by all ACM SIGPLAN and SIGSOFT conferences.
  • A platform for finding, collecting, sharing, and reviewing scientific computer science related publications.

Because of its academic nature, many research projects added features to the language, all contributing to the success of existing WebDSL applications. The downside of having many different contributors adding new features, is that the development experience that comes from the front-end leaves much to be desired. Currently, the WebDSL implementation is composed of multiple definitions in meta-DSLs supported by the Spoofax language workbench [3]: the syntax is defined in SDF2 and the desugaring, typechecking, optimization and code generation is defined in the term transformation language Stratego. The interleaving of all the latter processes in the same Stratego environment poses a threat to the readability and maintainability of the WebDSL language.

In this thesis, we will be focusing on modernizing the WebDSL front-end, by implementing the syntax definition in SDF3 [4] and the static analyses in Statix [5] and documenting the challenges posed by this process. In this work, the following contributions are made:

  • We present an implementation of the WebDSL grammar in SDF3.
  • We present an implementation of the WebDSL static analyses in Statix.
  • We assess the completeness and performance of the WebDSL SDF3 and Statix implementation.
  • We provide qualitative feedback about the development process with SDF3 and Statix.
  1. Danny M. Groenewegen, Elmer van Chastelet, and Eelco Visser. 2020. Evolution of the WebDSL runtime: reliability engineering of the WebDSL web programming language. In Conference Companion of the 4th International Conference on Art, Science, and Engineering of Programming <programming> ‘20. Association for Computing Machinery, New York, NY, USA, 77–83. DOI:
  2. Eelco Visser. 2007. WebDSL: A Case Study in Domain-Specific Language Engineering. In: Lämmel R., Visser J., Saraiva J. (eds) Generative and Transformational Techniques in Software Engineering II. GTTSE 2007. Lecture Notes in Computer Science, vol 5235. Springer, Berlin, Heidelberg. DOI:
  3. Lennart C.L. Kats and Eelco Visser. 2010. The spoofax language workbench: rules for declarative specification of languages and IDEs. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications (OOPSLA ‘10). Association for Computing Machinery, New York, NY, USA, 444–463. DOI:
  4. Luís E. de Souza Amorim and Eelco Visser. 2020. Multi-purpose Syntax Definition with SDF3. In: de Boer F., Cerone A. (eds) Software Engineering and Formal Methods. SEFM 2020. Lecture Notes in Computer Science, vol 12310. Springer, Cham. DOI:
  5. Hendrik van Antwerpen, Casper Bach Poulsen, Arjen Rouvoet, and Eelco Visser. 2018. Scopes as types. Proc. ACM Program. Lang. 2, OOPSLA, Article 114 (November 2018), 30 pages. DOI:

Modernizing the WebDSL front-end: A case study in SDF3 and Statix

Student: Max de Krieger
Supervisor(s): Danny Groenewegen, Jesper Cockx, Arie van Deursen, Eelco Visser†