DSLs for building new software

We often use DSLs to build new software, here we explain at a high level how we do this.

by Paul Klint on 14 Mar 2020

Paul Klint

Most IT systems consist of closely interacting software components (applications/tools) that solve related problems in the same domain. Many components are based on the same domain elements.

In the banking domain this would include account, client, and interest rate. In the forensics domain file format and encryption would be prominent.

Building each software component from scratch will be expensive, error-prone and maintenance-intensive.

Using domain knowledge is the solution to these problems and it forms the centerpiece of the Swat.engineering Methodology:

Diagram

The whole process starts with an initial idea for new software. Our first step is to explore the domain and make a map of all the relevant concepts and their relationships.

Next, we design a domain-specific language (DSL) that captures the domain knowledge and allows to flexibly express desired functionality such as creating a bank account or decrypting a file. Using this DSL, the functionality of the desired software components can be described concisely. These component descriptions are at a high level and can be understood and reviewed by experts from other disciplines such as marketing, finance, legal and auditing.

These high-level descriptions are used for simulation, visualisation, validation, and feedback on each component. When done, code can be generated that turns the high level description in operational code.

And there you have it: software components are no longer black boxes but can be easily reviewed and checked. Even better: your next software component will be much simpler to create.

Contact us at [email protected] to discuss your specific situation.

Recent posts

Any substantial change to critical software should be backed by a high confidence in correctness. Testing can be difficult when working with existing software systems. Automated tests might be sparse and hard to write effectively, while manual testing practices are often error-prone and labor-intensive. During the reverse-engineering of legacy systems, in particular, correctness can be challenging to define and components might interact in non-obvious ways. Therefore, simply “writing tests” is not as simple as it sounds.

Read More…

I write a lot of Java. These days, I use Visual Studio Code. Sometimes, I see a variable but do not remember its initial value. No worries: I just put the cursor on the variable, press F12, and watch the editor navigate to the declaration. It’s called Go to Definition in Visual Studio Code. Many other IDEs have it, too, and for many other languages. It’s a very useful feature. So… Should IDEs for DSLs have Go to Definition as well?

Read More…