UP | HOME
../../

DSLs for Software Engineering

1 Overview

2 Domain Specific Languages

  1. http://martinfowler.com/books/dsl.html "DSLs are small languages, focused on a particular aspect of a software system. You can't build a whole program with a DSL, but you often use multiple DSLs in a system mainly written in a general purpose language." Reference.
  2. Building a software product requires knowledge in both software engineering and the domain the software is written for.
  3. However, common software engineering methods in fact exclude domain experts from the architectural design of a software system, because the generality of the notations defined by these methods require expert knowledge in the field of software engineering and especially software architecture.
  4. In order to avoid this effect, domain-specific languages (DSL) have been proposed as an alternative to the general purpose languages being normally used in software architecture.
  5. One of the advantages of DSLs is that they are less cryptic and easier to learn for domain experts. Of course, the design of such a language requires deep understanding of the problem domain, on the other hand the existing tools for language design are only mastered by a few experts.

3 DSL Examples

  1. There are easily 1000+ DSLs. But there is no known collection of links. But, see https://blog.xrds.acm.org/2013/12/on-domain-specific-language-usage/ 2013
  2. Generally believed: For the development of a large software, the cost in designing and implementing a DSL for that software development more than offsets the development costs.
  3. The design and implementation of DSL is a highly sought after skill.

3.1 Well Known Examples

  1. HTML – web layout. Many other "markup" lanaguages. MarkDown, PHP, …
  2. sed – non-interactive text editing. man sed in Linux.
  3. gawk – manipulate lines of text. man gawk in Linux.
  4. dot – define graphs, with nodes and directed/ undirected edges.
  5. PlantUML – A DSL to draw UML diagrams. http://plantuml.com/
  6. SQL – database query language.
  7. build.gradle – software build scripting

3.2 Less Known Examples

  1. Gherkin – A DSL to define functional tests. https://www.guru99.com/gherkin-test-cucumber.html
  2. Website-spec – A DSL for functional web testing. https://www.npmjs.com/package/website-spec

4 Tools for the DSLs

  1. Several tools exist now (2018). E.g., MPS: Domain-Specific Language Creator by JetBrains.
  2. The tools assume good command over Grammars and ASTs.
  3. See the book by Voelter et al. (see Refs).

5 References

  1. Javier Luis Canovas Izquierdo, Domain-specific Languages, javier.canovas@inria.fr, ./dsl-jlcanovas-slides-156.pptx 156 slides. 2013. Required Reading.
  2. http://martinfowler.com/books/dsl.html Domain Specific Languages, Language workbenches. 2010. DSLs: An Introductory Example, first chapter of the book. Highly Recommended Reading.
  3. Mernik, Marjan, Jan Heering, and Anthony M. Sloane. "When and how to develop Domain-Specific Languages", ACM Computing Surveys, vol. 37, no. 4, 2005, pp 316-344. Recommended Reading.
  4. Markus Voelter et al., DSL Engineering: Designing, Implementing and Using Domain-Specific Languages, 2013, http://dslbook.org/ "Donationware". Pretty good. Recommended Reading.
  5. Shaikhha, Amir, Vojin Jovanovic, and Christoph Koch. "A Compiler-Compiler for DSL Embedding." arXiv preprint arXiv:1808.01344 (2018). Recommended Reading.

6 End


Copyright © 2018 pmateti@wright.edu www.wright.edu/~pmateti 2018-01-11