C e n t r u m v o o r W i s k u n d e e n I n f o r m a t i c a
Software ENgineering
When and how to develop domain-specific languages
M. Mernik, J. Heering, A.M. Sloane
REPORT SEN-E0517 DECEMBER 2005
SEN
Software Engineering
CWI is the National Research Institute for Mathematics and Computer Science. It is sponsored by the
Netherlands Organization for Scientific Research (NWO).
CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics.
CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names
of the clusters and in parentheses their acronyms.
Probability, Networks and Algorithms (PNA)
Software Engineering (SEN)
Modelling, Analysis and Simulation (MAS)
Information Systems (INS)
Copyright © 2005, Stichting Centrum voor Wiskunde en Informatica
P.O. Box 94079, 1090 GB Amsterdam (NL)
Kruislaan 413, 1098 SJ Amsterdam (NL)
Telephone +31 20 592 9333
Telefax +31 20 592 4199
ISSN 1386-369X
When and how to develop domain-specific
languages
ABSTRACT
Domain-specific languages (DSLs) are languages tailored to a specific application domain.
They offer substantial gains in expressiveness and ease of use compared with general-purpose
programming languages in their domain of application. DSL development is hard, requiring both
domain knowledge and language development expertise. Few people have both. Not
surprisingly, the decision to develop a DSL is often postponed indefinitely, if considered at all,
and most DSLs never get beyond the application library stage. Although many articles have
been written on the development of particular DSLs, there is very limited literature on DSL
development methodologies and many questions remain regarding when and how to develop a
DSL. To aid the DSL developer, we identify patterns in the decision, analysis, design, and
implementation phases of DSL development. Our patterns improve and extend earlier work on
DSL design patterns. We also discuss domain analysis tools and language development
systems that may help to speed up DSL development. Finally, we state a number of open
problems.
2000 Mathematics Subject Classification: 68N15
1998 ACM Computing Classification System: D.3.2
Keywords and Phrases: domain-specific language; application language; domain analysis; language development
system
Note: Accepted for publication in ACM Computing Surveys. This is a revised and extended version of CWI report SEN-
E0309 with the same title. Many examples illustrating the various patterns were added, the section on domain analysis
was extended, the FODA and FAST approaches are discussed in more detail, and the number of references was
increased from 100 to 150.
½
¾
¿
!
" #
$
%
!
&
" '
#
!
" #!$%
&''()
&'*( ++)
&',()
&'- '.)
&//)
#*0$% &//)
!$
!$
#01$%
&'* .'-)
!$ + 2
3
'