Monday, March 8, 2010

Short Taxonomy of Domain-Specific Languages

This article introduces how Domain-Specific Language can be separated along their origin, appearance, and implementation.

Types of DSLs

DSLs are separated into the following dimensions origin, appearance, and implementation according to [MernikEtAl2005], [CzarneckiEisenecker2000].

Origin

Describes whether the DSL is based on a host language or uses a individual generator or compiler.

  • External DSL: If the language engineer wants to have maximum freedom with the available expression and statement -- from both a syntactic and a semantic perspective -- then external DSL are the right means. Once the initial design is determined, a model for parsing the syntax to an internal representation, and the semantics of the internal representation have to be defined. Doing this from scratch is a tremendous effort, but special tools can help, like the early Centaur [BorrasEtAl1989] and PAN [BallanceEtAl1990], or the modern xtext. The tools predefine the language used to express grammatical rules, transformations, and semantics.
  • Internal DSL: Instead of designing a complete free language, the language engineers can also use an existing programming language as the host. The complete language infrastructure, consisting of editors, tools and compilers, can be reused with the DSL. Also, reuse is strong because every DSL expression is an expression of the host language. which simplifies integrating the DSL with existing libraries, frameworks and other DSL written in the same language. Internal DSL sacrifice their syntactic and semantic freedom for this infrastructure, requiring less effort to get a first implementation. But they require extensive developer knowledge of the metaprogramming capabilities of the language in order to extend the available methods and symbols to suite the domain.

Read more about the appearance and implementation of a DSL at http://dsl-engineer.com/2010/03/08/short-taxono…ific-languages/

blog comments powered by Disqus