Domain-Specific Languages:
Effective modeling, automation, and reuse

Overview

A book by Andrzej Wasowski and Thorsten Berger. It is published by Springer (appeared Jan. 2023) and available directly via Springer Link or typical book shops.

The book describes the necessary theory and the pragmatics of using and developing high-level software languages (Domain-Specific Languages, or DSLs) for the effective production of quality software. This includes methods, design patterns, guidelines, and testing practices for defining concrete syntax, abstract syntax, and semantics of languages. The book attempts to be close to technology, while covering multiple paradigms and solutions—to avoid being limited to a particular technical silo.

We created a classic academic textbook, providing a theoretical and conceptual foundation derived from research, and a sound pedagogy built around many focused problem-solving exercises, concrete take-home lessons, and examples from diverse domains. While DSL books exist, the pedagogy was a key reason to write this book, which follows a standard textbook approach with focused problem-solving exercises and solid grounding in research. It also brings together Software Engineering (SE, a.k.a. modelware) and Programming Language (PL, a.k.a. grammarware perspectives and technologies, which have co-existed for decades.

Competencies

After reading this book, the reader will be able to:

  • Perform domain analysis of a problem domain and obtain a meta-model.
  • Engineer external and internal DSLs (note that we focus mostly on external DSLs).
  • Design and improve the concrete syntax of DSLs.
  • Implement DSL semantics using declarative and imperative transformations, code generators and interpreters, in various scenarios such as from text to models, from models to text, involving XML, database, etc.
  • Implement declarative constraints and type rules for DSLs.
  • Test implementations of DSLs.
  • Characterize, classify, and compare languages along various properties.

Code Repository

We provide a repository with lots of further material (models, code, infrastructure), all integrated via Gradle.

Buy or Get Access

The primary source is Springer Link, where you can access it directly in case your academic institution has a subscription (which most universities have) or buy it as a printed book or an ebook: You can also buy it from book shops, including:

Keynote Presentation

The slides of my keynote presentation at the MODELS'22 Educators Symposium are available online.

Appendix Tutorials

We also some tutorials with more practical, tool-specific advice. We are currently revising them and making them public below. appendices, which we'll make public asap (contact us if you want to see the current versions).

(available) Tutorial A: Class Modeling

(available) Tutorial B: Using the Eclipse Modeling Framework

Tutorial C: OCL in a Nutshell

Tutorial D: Xtext in a Nutshell

Known Uses

At various occasions, we've heard from colleagues that they have used, are planning to, or are currently using the book for teaching. If you also use it, let us know with a very quick email. So far, we have heard from:
  • Technical University of Dortmund, DE
  • University of Oslo, NO
  • University of Rostock, DE
  • University of Bremen, DE
  • University of Potsdam, DE
  • North Carolina State University, US
  • IT University of Copenhagen, DK
  • Chalmers University of Technology and University of Gothenburg, SE