Some thoughts on DSLs (Domain Specific Languages)

Domain-Specific Languages (DSLs) are design and/or development languages that are designed to address the needs of a specific application domain. DSLs are particularly useful because they are tailored to the requirements of the domain, both in terms of semantics and expressive power (and thus do not enforce end users to study more comprehensive general-purpose languages) and of notation and syntax (and thus provide appropriate abstractions and primitives based on the domain).
I wish to highlight a few classifications of these languages, namely the dimensions of focus, style and notation. 

The focus of a DSL can be either vertical or horizontal.
Vertical DSLs aim at a specific industry or field. Examples of vertical DSLs may include: configuration lan-guages for home automation systems, modeling languages for biological experiments, analysis languages for financial applications, and so on.
Horizontal DSLs have a broader applicability and their technical and broad nature allows for concepts that apply across a large group of applications. Examples of horizontal DSLs include SQL, Flex , WebML , and many others.

The style of a DSL can be either declarative or imperative.
Declarative DSLs adopt a specification paradigm that expresses the logic of a computation without describing its control flow. In other words, the language defines what the program should accomplish, rather than describing how to accomplishing it. A typical example of declarative definition is the one of service choreography.
Imperative DSLs instead specifically require defining an executable algorithm that states the steps and control flow that needs to be followed to successfully complete a job. A typical example of declarative definition is the one of service orchestration.

The notation of a DSL can be either graphical or textual.
The graphical DSLs (al-so known as Domain Specific Modeling Languages, DSML) imply that the outcomes of the development are visual models and the development primitives are graphical items such as blocks, arrows and edges, containers, symbols, and so on.
The textual DSLs comprise several categories, including XML-based notations, structured text notations, textual configuration files, and so on.

Despite the various experiences in DSL design and application, there is no general assessment on the preferences of the developers for one or the other kind of language. However, typically languages oriented to the end users tend to be more visual and declarative, while the ones for developers are often textual and imperative.
This post is not meant to be a thorough discussion on DSLs though. For more info you can have a look at:

Other thoughts in this regard will be soon available within a chapter of the second Search Computing book, to be published as Springer LNCS volume in March / April 2011.

    Leave a Reply

    Your email address will not be published. Required fields are marked *