Domain Specific Languages

Afp0506

April 28, 2006
See the solutions to the exam.

April 24, 2006
The scores for the exam are published. Contact me if you are interested in a meeting to discuss the questions of the exam.

April 12, 2006
See the results of the ant tournament.

April 3, 2006
The lecture about GADTs is rescheduled to Friday (for personal reasons). All students have been informed by email.

March 30, 2006
The deadline for exercise 4 is rescheduled to April 5 (Wednesday). See Kasper's instructions for building hat on the student machines.

March 17, 2006
The fourth (and last) exercise about testing and tracing is now online.

March 15, 2006
The final exam for AFP has been scheduled. See the Education Page.

March 7, 2006
The third exercise on Template Haskell is available.

March 1, 2006
Click here for the wxHaskell docs.

February 27, 2006
The second exercise about XTC has been published.

February 20, 2006
The Course Schedule has been slightly changed for week 8.

February 16, 2006
Tomorrow, there will be no lab session after the lecture.

February 14, 2006
The start version for the Programming Assignment has been put on the Wiki.

February 13, 2006
The first exercise (state monad) has been published.

February 10, 2006
The DSL topics have been assigned.

January 20, 2006
Setup of AFP web for 2005/2006

Task Description

All students have to further investigate one domain specific language: the available topics are listed below, and these will be assigned in the first week. For each topic, a number of starting points (web sites, papers, etc.) are given. Given these starting points, try to find as much relevant information as possible about your assigned topic. The task consists of two parts:

  • One 45 minute presentation (in English). You are encouraged to download existing software, to experiment with it, and to show us a (small) demo.
  • A review report (about 2 pages). This report should contain at least the following ingredients.
    • a summary
    • the additional gain of embedding your assigned DSL in a functional language like Haskell.
    • your opinion about and experiences with the combinator library.

For this assignment, students may work in pairs. The assignment may also be completed individually, as long as there are enough topics available.

Assigned Topics

Topic Assigned to Presentation Slides Demo
Pan# Michiel/Thomas March 10 .pdf .pan (zipped)
XML tools/Blobs Wouter/Elmar March 10 .ppt .pdf
Financial Combinators Gideon March 10 .pdf
Computer Music Sander/Gerbo March 17 .pdf demo (zipped)
Haskell DB Mark/Kasper March 17 .pdf
Web Authoring System Haskell Eric/John March 17 .pdf .wash (zipped)
Lava Nabil March 31 .pdf
Web Functions Johan/Niels March 31 .ppt
Yampa/Frag Jinfeng/Xiaoyu March 31 .pdf

Topics

1. XML Tools

A number of Haskell libraries exist for processing XML. These libraries typically offer facilities such as parsing, filtering, transforming, validating, and generating XML documents. Two well-known combinator libraries for processing XML are HaXML? and The Haskell XML Toolbox.

Difficulty: star

Resources:

2. Computer Music

(from the Haskore Computer Music System homepage)

Haskore is a collection of Haskell modules designed for expressing musical structures in the high-level, declarative style of functional programming. In Haskore, musical objects consist of primitive notions such as notes and rests, operations to transform musical objects such as transpose and tempo-scaling, and operations to combine musical objects to form more complex ones, such as concurrent and sequential composition. From these simple roots, much richer musical ideas can easily be developed.

Difficulty: star

Resources:

3. Diagram Editor Blobs

(from the Blobs homepage)

Blobs is a front-end for drawing and editing graph diagrams. You must add your own back-end engine if you want it to do some analysis or processing of the graph. There are various analysis engines that use Blobs as a front-end, e.g. Dazzle for bayesian analysis of networks, FPTC for safety analysis of systems designs, and so on, but these are not currently available as open source. We do supply a couple of very simple engines, just to demonstrate how to connect the engine up to Blobs.

Difficulty: star

Resources:

4. Haskell DB

(from the Haskell DB homepage)

Haskell DB is a combinator library for expressing queries and other operations on relational databases in a type safe and declarative way. All the queries and operations are completely expressed within Haskell, no embedded (SQL) commands are needed. This close integration makes it possible to do arbitrary computations on the database (like computing the transitive closure) and makes it very easy to combine Haskell DB with other combinator libraries (like Erik Meijer's CGI library or John Hughes pretty printer).

Difficulty: star star

Resources:

5. Financial Combinators

(from Simon PJ's homepage)

Financial and insurance contracts do not sound like promising territory for functional programming and formal semantics, but in fact we have discovered that insights from programming languages bear directly on the complex subject of describing and valuing a large class of contracts.

We introduce a combinator library that allows us to describe such contracts precisely, and a compositional denotational semantics that says what such contracts are worth. We sketch an implementation of our combinator library in Haskell. Interestingly, lazy evaluation plays a crucial role.

Difficulty: star star

Resources:

6. Pan#

(from the Pan# homepage)

Pan# combines basic mathematical operations with functional abstraction and a simple vocabulary of images. This language puts the tools of visualization in the hands of the student and instructor rather than hiding them deep inside bundled software. Images are defined in a very simple and direct way, free of the details that tell a computer how to display the image. Because images are described using mathematical functions, this language is entirely appropriate for anyone with knowledge of basic algebra.

Difficulty: star star

Resources:

7. Pretty Printing

There are a number of combinator libraries around for pretty printing. Papers by John Hughes and Philip Wadler describe the theory behind these libraries.

Difficulty: star star

Resources:

8. Web Authoring System Haskell

WASH/CGI is an EDSL for server-side Web scripting with Sessions, Compositional Forms, and Graphics.

Difficulty: star star

Resources:

9. Web Functions

Robert van Herk wrote his Master's thesis about Web Functions Web Functions is a DSEL for developing websites, implemented in Haskell. Web Functions is a domain specific embedded language for web authoring, implemented in Haskell. The functionality of the Web Functions framework was inspired by Apple’s Web Objects (http://www.apple.com/WebObjects).

Difficulty: star star star

Resources:

10. Yampa/Frag

(from the Yampa homepage)

Yampa is the culmination of our efforts to provide domain-specific embedded languages for the programming of hybrid systems using the concepts of Functional Reactive Programming (FRP). Yampa is structured using arrows, which greatly reduce the chance of introducing space- and time-leaks into reactive, time-varying systems.

Yampa was used to program the game entities of Frag, a 3D first person shooting game written in Haskell, by Mun Hon Cheong.

Difficulty: star star star

Resources:

Other topics

(These can only be selected in case we run out of topics)

Fran

This article presents one approach to declarative programming of interactive content, as realized in a prototype system called Fran, for "Functional reactive animation" [Elliott and Hudak 1997, Elliott 1997]. Fran is a high level vocabulary that allows one to describe the essential nature of an animated model, while omitting details of presentation. Moreover, because this vocabulary is embedded in a modern functional programming language (Haskell), the animation models thus described are reusable and composable in powerful ways.

Resources:

Lava

Lava is a hardware description language based upon the functional programming language Haskell. Its main aim is to show that modern programming language features such as type inference, polymorphism, higher-order functions, type classes, and laziness are very useful even in hardware description.

Resources:

Parsing


Topic attachments
I Attachment Action Size Date Who Comment
pdfpdf DSL-Lava_presentation.pdf manage 213.2 K 10 Apr 2006 - 07:02 BastiaanHeeren Lava slides
pdfpdf FinancialCombinators.pdf manage 204.5 K 15 Mar 2006 - 20:52 GideonSmeding Financial combinators presentation slides
pdfpdf HXTFinalVersion1.pdf manage 1175.7 K 13 Mar 2006 - 09:21 BastiaanHeeren Slides Haskell XML Toolbox
pptppt HXTFinalVersion1.ppt manage 747.5 K 13 Mar 2006 - 09:20 BastiaanHeeren Slides Haskell XML Toolbox
pdfpdf WASH.pdf manage 149.5 K 21 Mar 2006 - 15:39 JohnVanSchie Slides of the WASH talk
pptppt WebFunctions.ppt manage 356.5 K 07 Apr 2006 - 22:23 NielsvdWeem Slides of the WebFunctions? talk
pdfpdf Yampa.pdf manage 6372.5 K 03 Apr 2006 - 07:21 BastiaanHeeren Yampa slides
pdfpdf haskelldb.pdf manage 240.3 K 17 Mar 2006 - 12:55 BastiaanHeeren HaskellDB?
zipzip haskore-demo.zip manage 2.7 K 18 Mar 2006 - 15:58 GerboEngels The demo of Haskore; uses some examples that came with the Haskore package
pdfpdf haskore.pdf manage 242.0 K 18 Mar 2006 - 15:56 GerboEngels Slides of Haskore presentation
pdfpdf pan.pdf manage 166.9 K 10 Mar 2006 - 11:16 MichielOvereem Slides of the Pan# talk
zipzip panexamples.zip manage 2.1 K 10 Mar 2006 - 11:15 MichielOvereem Examples used in the demo of the Pan# talk
zipzip washexample.zip manage 3.7 K 17 Mar 2006 - 15:37 EricBouwers The example program