CS 693/793-4A Special Topics in Domain Specific Languages

 

Spring 2008

 

Instructor

Office hours

Marjan Mernik

Office: CH 122

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, maintenability 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

Programming languages, compilers

 

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-03         (ppt) (Introduction, GPL definitions and classifications, DSL definitions, GPL concepts)

- Lecture 04               (ppt) (DSL concepts)

- Lecture 05-06         (ppt) (Domain Analysis, FODA, DSL Design)

- Lecture 07               (ppt) (Language Design Principles)

- Lecture 08-11         (ppt) (Formal Syntax and Semantics – BNF, Attribute Grammars, Denotational Semantics, Operational Semantics)

- Lecture 12-13         (ppt) (DSL implementation – interpreter/compiler approach)

- Lecture 14-15         (ppt) (DSL implementation – macro-processing approach)

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

- Lecture 17-18         (ppt) (DSL implementation – extensible compiler/interpreter approach, XML-based approach, hybrid approach)

- Lecture 19-22         (ppt) (Language development toolkits – LISA, LISA examples)

- Lecture 23               (ppt) (Language development toolkits – ASF+SDF)

- Lecture 24-25         (ppt) (Resume of implementation approaches)

- Lecture 26               (ppt) (DSL patterns)

- Lecture 27               (ppt) (Domain-Specific Visual Languages)

- Lecture 28-30         (ppt) (DSLs examples)

 

HOMEWORKS

 

1st homework (write short report on differences among specification, modeling and programming languages) due January 29

2nd homework (Formally define Robot Language using Attribute grammars, Denotational and Operational Semantics;

Prove that:  begin C1 C2 end    begin C2 C1 end) due February 28

3rd homework (Compute defined but not-used composite features using LISA tool for simplified version of FDL) due April 10

Student project presentation, April 24

 

REQUIRED READINGS

 

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

 

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)

 

D. Harel, B. Rumpe. Meaningful Modeling: What’s the Semantics of “Semantics”? IEEE Computer, Vol. 37, No. 10, pages 64 – 72, October 2004.

 

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.

 

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

 

M. Mernik, V. Žumer. An educational tool for teaching compiler construction. IEEE Transactions on Education,  Vol. 46, no. 1, pages 61-68, 2003.

 

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

 

M. van den Brand, J. Heering, P. Klint, P. Olivier. Compiling Language Definitions: The ASF+SDF Compiler. ACM Transactions on Programming Languages and Systems, Vol. 24, No. 4, pages 334-368, 2002.

 

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

 

S. Thibault. Domain-Specific Languages. Conception, Implementation and Application, Ph.D. Thesis, 1998.

 

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.

 

J. Heering, M. Mernik. Domain-Specific Languages in Perspective. SEN Report E0702, September 2007.

 

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

 

K. Dybvig, R. Hieb, C. Bruggeman. Syntactic abstraction in Scheme. Lisp and Symbolic Computations, Vol. 5, No. 4, pages 295-326, 1992.

 

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

 

T. Veldhuizen. Expression Templates. C++ Report, Vol. 7, No. 5, pages 26-31, June 1995.

 

A. Langer, K. Kreft. C++ Expression Templates. C/C++ Users Journal, March 2003.

 

L. Cardelli, F. Matthes, M. Abadi. Extensible syntax with lexical scoping. Technical Report, 1994.

 

G. Gupta, E. Pontelli. A Horn Logic Denotational Framework for Specification, Implementation, and Verification of Domain Specific Languages. Technical Report, NMSU, 1999.

 

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

 

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.

 

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

 

J. Clements, M. Felleisen, R. Findler, M. Flatt, S. Krishnamurthi. Fostering Little Languages. Dr. Dobb’s Journal, March 2004.

 

M. Felleisen, R. Findler, M. Flatt, S. Krishnamurthi. Building Little Languages With Macros. Dr. Dobb’s Journal, April 2004.

 

M. Mernik, M. Lenič, E. Avdičaušević, V. Žumer. Multiple attribute grammar inheritance. Informatica, 2000, Vol. 24, No. 3, pages. 319-328.

 

M. Burnett. Visual Programming. Encyclopedia of Electrical and Electronics Engineering, 1999.

 

G. Costagliola, V. Deufemia, F. Ferrucci, C. Gravino. Exploiting XPG for Visual Languages: Definition, Analysis and Development. Electronic Notes in Theoretical Computer Science, Vol. 82, No. 3, LDTA’03, 2003.

 

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.

 

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.

 

USEFUL LINKS

 

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

http://c2.com/cgi/wiki?DomainSpecificLanguage