Instructor | Alley Stoughton (visting Chalmers from Kansas State University) |

Office | 5124A |

Phone | 5402 |

alley.stoughton@icloud.com | |

WWW Home Page | people.cis.ksu.edu/~stough/ |

WWW Course Home Page | people.cis.ksu.edu/~stough/cml-short-course/ |

Duration | June 1-4 (Week 23) and 7-11 (Week 24) 2004 |

Lectures | 10:15-12:00 Room 3407 |

Exercise Sessions | 15:15-16:45 Room 3407 |

This will be a two-week intensive graduate course on Concurrent ML, which is a Standard ML library for concurrent programming. The course will emphasize the ways in which Standard ML's module system and Concurrent ML's first-class synchronous operations can be combined to define new communication and synchronization abstractions. CML may be used, e.g., to implement distributed systems and graphical user-interfaces.

Students will be expected to have a strong background in typed functional programming. Prior knowledge of Standard ML will be helpful, but won't be required.

As references, we'll be using John Reppy's book *Concurrent
Programming in ML*, Cambridge University Press, 1999, and Robert
Harper's draft book *Programming in
Standard ML*. More resources on Standard ML and Concurrent
ML, including instructions for installing the Standard ML of New
Jersey compiler (SML/NJ), which we'll be using throughout the course,
can be found at the link below.

We'll have daily lectures in the mornings. Students will have the afternoons to work on assigned exercises. And we'll meet again late in the afternoons to discussion solutions to the exercises.

- Lecture 1: Tuesday, 1 June: Introduction; Standard ML's Core Language
- Reading: Part I of Harper
- Introduction to SML: strictness, exceptions, imperative features, order of evaluation
- Getting and using SML/NJ
- Emacs support for SML/NJ
- The Standard ML Basis Library
- Example program: prime factorization (
`factorization.sml`,`lect1`) - Exercise 1: An infinite version of the Sieve of Eratosthenes
- Skeleton for exercise solution:
`sieve-skeleton.sml`

- Exercise Session 1: Questions
- Lecture 2: Wednesday, 2 June: Standard ML's Module Language
- Reading: Part II of Harper
- Structures, signatures, ascription and opening
(
`lect2`) - SML/NJ Compilation Manager (CM)

- Exercise Session 2: Discussion of Exercise 1 Solutions
- Model solution:
`exer-sess2`

- Model solution:
- Lecture 3: Thursday, 3 June: First-class Continuations, and Implementation of Threads
- Exercise Session 3: Discussion of Exercise 2 Solutions
- Model solution:
`exer-sess3`

- Model solution:
- Lecture 4: Friday, 4 June: Basic CML
- Introduction
- John Reppy's Concurrent ML page
- Buffers of length at most one (
`lect4`) - Exercise 3: Buffers with fixed maximum lengths, programmed without selective communication (signature)

- Exercise Session 4: Discussion of Exercise 3 Solutions
`Fifo`structure from`SML/NJ Library`- Model solution:
`exer-sess4`

- Lecture 5: Monday, 7 June: First-class Synchronous Operations
- Introduction
- John Reppy's Concurrent ML page
- Buffers with fixed maximum lengths (
`lect5`) - Exercise 4: Buffers with variable maximum lengths (signature part)

- Exercise Session 5: Discussion of Exercise 4 Solutions
- Model solution:
`exer-sess5`

- Model solution:
- Lecture 6: Tuesday, 8 June: More event combinators
- Introduction
- John Reppy's Concurrent ML page
`Fifo`structure from`SML/NJ Library`- Bank accounts (
`lect6`) - Exercise 5: Swap channels (signature)

- Exercise Session 6: Discussion of Exercise 5 Solutions
- Model solution:
`exer-sess6`

- Model solution:
- Lecture 7: Wednesday, 9 June: Synchronization Variables and Multicasting
- Exercise Session 7: Discussion of Exercise 6 Solutions
- Model solution:
`exer-sess7`

- Model solution:
- Lecture 8: Thursday, 10 June: Formal Semantics (I)
- Exercise Session 8: Discussion of Exercise 7 Solutions
- Lecture 9: Friday, 11 June: Formal Semantics (II)
- Exercise Session 9: Discussion of Exercise 8 Solutions

Alley Stoughton (alley.stoughton@icloud.com)