http://www.cis.uab.edu/UABLogo.gif

http://www.cis.uab.edu/CIS.gif

 

CS 493/693/793 Special Topics in Domain Specific Languages

 

Spring 2010

 

Instructor

Office hours

Marjan Mernik

Office: CH 117

Phone: (205) 934-8640

Email: marjan.mernik@uni-mb.si

mernik@cis.uab.edu

By appointment

 

COURSE DESCRIPTION

 

Programming languages are a programmer's most basic tools. A language is suitable for a programming problem if it makes the programmer productive, and if it allows the programmer to write highly scalable, generic, readable and maintainable code. There are various ways to classify or to group programming languages. One can, for example, focus on the programming paradigm in such a classification (imperative vs. functional vs. logic vs. object-oriented). One can also consider 2GLs, 3GLs, 4GLs, or very high-level languages. We want to emphasize the division of programming languages into general-purpose and domain-specific languages. With general-purpose languages, one can address large classes of problems e.g., scientific computing, business processing, symbolic processing while a domain-specific language (DSL) facilitates the solution of problems in a particular domain. To this end, a DSL provides built-in abstractions and notations specific to the domain of concern. DSLs are usually small, more declarative than imperative, and more attractive than GPLs for a variety of applications because of easier programming, systematic reuse and easier verification. DSLs have been used in various domains and these applications have clearly illustrated the advantages of DSLs over GPLs in areas such as productivity, reliability, maintainability and flexibility. However, the cost for DSL design, development and maintenance has to be taken into account. Without an appropriate methodology and tools this costs can be higher than savings obtained by the later use of DSL. This course introduces students to appropriate methodologies and tools needed to support the development of DSLs.

The general topics of the course will be:

-       An introduction to the history of DSLs (including examples of some widely used DSLs)

-       Phases in the development of DSLs (analysis, design, implementation)

-       Domain Analysis Methodologies (e.g. FODA - Feature-Oriented Domain Analysis)

-       Language design issues

-       DSLs implementation approaches (compiler/interpreter, preprocessing, embedded, extensible compiler/interpreter)

-       Language development toolkits (ASF+SDF, LISA, metafront, etc.)

-       Incremental language development

-       DSL design patterns

-       Domain-Specific Visual Languages

 

PREREQUISITES OR CO-REQUISITE

Programming languages

 

TEXTBOOK

There is no formal textbook for this course. The course web site will contain a list of required readings, as well as other related papers/books.

 

LECTURES

 

- Lecture 01 (ppt) - Introduction, GPL definitions and classifications, DSL definitions

- Lecture 02 (ppt) - Differences between modeling and programming languages

- Lecture 03-05 (ppt) - GPL concepts

- Lecture 06 (ppt) - DSL concepts

- Lecture 07 (ppt) - When to develop DSL

- Lecture 08 (ppt) - Domain Analysis, FODA

- Lecture 09 (ppt) - DSL Design

- Lecture 10-13 (ppt) - Formal Syntax and Semantics: BNF, Attribute Grammars

- Lecture 14 - Scenario-based Analysis of UML Class Models by dr. Robert France (Colorado State University)

- Lecture 15-17 (ppt) - Formal Semantics: Denotational Semantics, Operational Semantics

- Lecture 18-19 (ppt) - DSL implementation - interpreter/compiler approach

- Lecture 20 (ppt) - DSL implementation - macro-processing approach

- Lecture 21 (ppt) - DSL implementation - source-to-source, pipeline, lexical processing, embedding

- Lecture 22 (ppt) - DSL implementation - extensible compiler/interpreter approach, XML-based approach, hybrid approaches

- Lecture 23 (ppt) - Resume on implementation approaches

- Lecture 24 (ppt) - DSL patterns

- Lecture 25-26 (ppt) - Language development toolkits - LISA (LISA examples)

- Lecture 27 (ppt) - DSLs examples

- Lecture 28 - Final Exam Sample

- Lecture 29-30 - DSL student projects presentations

 

REQUIRED READINGS

 

A. van Deursen, P. Klint, J. Visser. Domain-Specific Languages: An Annotated Bibliography. ACM Sigplan Notices, Vol. 35, No. 6, pages 26 - 36, 2000.

L. Cardelli, R. Davies. Service Combinators for Web Computing. Proceedings of the 1st Conference on Domain-Specific Languages, 1997.

A. van Deursen, P. Klint. Domain-Specific Language Design Requires Feature Description. CIT Journal of Computing and Information Technology, Special Issue on Domain-Specific Languages, Part II, Eds. R. Laemmel, M. Mernik, Vol. 10, No. 1, pages 1-17, 2002.

D. Wile. Lessons Learned from Real DSL Experiments. Science of Computer Programming, Vol 51, Issue 3, pages 265-290, 2004.

J. Paakki. Attribute grammar paradigms - a high-level methodology in language implementation. ACM Computing Surveys, Vol. 27, No. 2, pages 196-255, 1995. (1st chapter)

C. Brabrand, M. Schwartzbach. Growing Languages with Metamorphic Syntax Macros. ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, 2002.

J. Bentley. Little Languages. Communications of the ACM, Vol. 29, No. 8, pages 711-721, 1986.

C. Consel, R. Marlet. Architecturing software using a methodology for language development . Proceedings of the 10th International Symposium on Programming Language Implementation and Logic Programming, pages 170-194, 1998.

S. Chiba. A Metaobject Protocol for C++. Conference on Object Oriented Programming Systems Languages and Applications, pages 285-299, 1995.

T. Kosar, P. Martinez Lopez, P. Barrientos, M. Mernik. A preliminary study on various implementation approaches of domain-specific language. Information and Software Technology, Vol. 50, No. 5, pages. 390-405, 2008.

D. Spinellis. Notable design patterns for domain-specific languages. The Journal of Systems and Software, Vol. 56, Issue 1, pages 91-99, 2001.

M. Mernik, J. Heering, T. Sloane. When and how to develop domain-specific languages. ACM Computing Surveys, Vol. 37, Issue 4, pages 316-344, 2005.

S. Mauw, W. Wiersma, T. Willemse. Language-Driven System Design. HICSS-35, 2002 (revised and extended version).

 

 

OPTIONAL READINGS

 

Y. Sun, Z. Demirezen, M. Mernik, J. Gray, B. Bryant. Is my DSL a modeling or programming language? 2nd International Workshop on Domain-Specific Program Development (DSPD), Nashville, Tennessee, October 22, 2008.

M. Alanen, I. Porres. A Relation Between Context-Free Grammars and Meta-Object Facility Metamodels. TUCS Technical Report No. 606, 2003.

H. Nielson, F. Nielson: Semantics with Applications: A Formal Introduction. Wiley, 1992.

D. Harel, B. Rumpe. Meaningful Modeling: What is the Semantics of Semantics? IEEE Computer, Vol. 37, No. 10, pages 64 - 72, October 2004.

T. Veldhuizen. Using C++ template metaprograms. C++ Report, Vol. 7, No. 4, pages 36-43, May 1995.

P. Hudak. Modular Domain Specific Languages and Tools. Proceedings Fifth International Conference on Software Reuse, pages 134 - 142, 1998.

G. Kiczales, A. Paepcke. Open Implementations and Metaobject Protocols. Tutorial.

C. Elliott, S. Finne, O. de Moor. Compiling Embedded Languages. Semantics, Applications and Implementation of Program Generation workshop, SAIG 2000.

J. van Schagen. Measuring the quality of domain-specific language implementation approaches: Java versus ANTLR. Master Thesis, University of Amsterdam, 2009.

M. Mernik, V. Zumer. Incremental Programming Language Development, Computer Languages, Systems and Structures, Vol. 31, Issue 1, pages 1-16, 2005.

M. Mernik, M. Lenic, E. Avdicausevic, V. Zumer. Multiple attribute grammar inheritance. Informatica, 2000, Vol. 24, No. 3, pages. 319-328.

D. Rebernak, M. Mernik, H. Wu, and J. Gray. Domain-specific aspect languages for modularising crosscutting concerns in grammars. IET Software, Vol. 3, Issue 3, pages 184-200.

R. Pike, S. Dorward, R. Griesemer, S. Quinlan. Interpreting the Data: Parallel Analysis with Sawzall. Scientific Programming, Vol. 13, Issue 4, pages 277-298, 2005.

R. A. van Engelen. ATMOL: A Domain-Specific Language for Atmospheric Modeling. CIT Journal of Computing and Information Technology, Special Issue on Domain-Specific Languages, Part I, Eds. R. Laemmel, M. Mernik, Vol. 9, No. 4, pages 289-303, 2001.

 

 

USEFUL LINKS

 

http://en.wikipedia.org/wiki/Domain-specific_programming_language

http://www.theenterprisearchitect.eu/archive/2009/05/06/dsl-development-7-recommendations-for-domain-specific-language-design-based-on-domain-driven-design