This page is kept for historical purposes only. Please see the home page for my current situation. —Luca Saiu.

PFA ("Programmation fonctionnelle avancée") - 2011

PFA is a course about advanced aspects of functional programming. It is part of the Master 2 Spécialité Programmation et Logiciels Sûrs of Institut Galilée, Université Paris Nord.

This year I teach classes (CM), while Jean-Yves Moyen manages the lab exercises (TP). With some fine-tuning and changes, the first half of my lessons is based on what Jean-Vincent Loddo and Jean-Yves did in 2009; of course all mistakes in what I do or write remain mine.

Even if I speak French in class, I maintain these pages in English. There are essentially three reasons:


Jean-Yves Moyen has prepared a really, really nice project based on trivialML. You can find the problem statement and an archive to download on his web page. Of course the elecronic version is always the most up-to-date.

Previous written exams, including solutions


Mon  2011-09-19  13:45..17:00  PFA CM1  C308
[Tue 2011-09-20  13:45..17:00  PFA TP1  F204]
Tue  2011-09-27  13:45..17:00  PFA CM2  Amphi D
[Tue 2011-10-04  13:45..17:00  PFA TP2  F204]
[Thu 2011-10-06 13:45..17:00 PFA TP3 F205]
[Tue 2011-10-11 13:45..17:00 PFA TP3 F204]
Tue  2011-10-18  13:45..17:00  PFA CM3  C308 + Amphi A
[Tue 2011-10-25  13:45..17:00  PFA TP4  F204]
Tue  2011-11-15  13:45..17:00  PFA CM4 C308 + C306
[Tue 2011-11-22  13:45..17:00  PFA TP5 F204]
Mon  2011-11-28  13:45..17:00  PFA CM5 C308
Tue 2011-11-29 13:45..17:00 PFA CM6 C308 + Amphi A Annulé (nouveau !)
Mon 2011-12-05 13:45..17:00 PFA CM6 C307 Ajouté (nouveau !)
[Tue 2011-12-06  13:45..17:00  PFA TP6 F204] [annulé]
[Tue 2011-12-13  14:00..17:00  PFA exam F001]
[Tue 2011-12-17 14:00..17:00 PFA exam [where?]] As some students noticed, this date was clearly wrong: 2011-12-17 will be a Saturday

Mailing list: if you're a PFA student then you should subscribe

In September 2011 I made a course mailing list, used for communications and answering questions: if you are a PFA student you are strongly advised to subscribe using this simple web interface. You can send a message to all subscribers (including Jean-Yves Moyen and me, of course) by writing to the address . You are free to use a nickname instead of your real name on the list, if you prefer so.

Useful resources

We will use the Objective Caml language, also called OCaml; you are expected to become fluent in it.
You don't really need to buy books about the language unless you prefer the paper format, as the documentation you find on the Net is really good; in several cases the same text is available on paper and in electronic form.

Of course, you should always have available the official OCaml documentation, particularly the default interface library. We also recommend the following texts, all of which are available online:

Course diary


Here you can find electronic copies of what I distribute on paper in class, and copies of my projector presentations.


You can find here copies of the ML files I write in class on my computer. Some of them weren't originally supposed to be published as they are not particularly well-written: I use them as exercises or examples writing them while I speak; anyway some students requested a copy, so here they are.

Travaux pratiques (Lab exercises)

You can find TPs on Jean-Yves Moyen's page.

The trivialML interpreter

In CM5 we finished implementing a very simple but usable interpreter for the trivialML language (static type checking is implemented but not called from the main program yet, as of the end of CM5). The complete interpreter sources are available here.

The trivialML interpreter simply reads its program from the standard input, then it evaluates it and prints the result on the standard output. It performs no output until it has read its input program.


# Clean old compiled stuff if any, and recompile:
./CLEAN && ./GO

# If everything has worked now the file a.out exists: this is the trivialML interpreter:
ls a.out

# Run trivialML a program:
# Write a trivialML program, then push Ctrl+D to close the standard input channel.
# The interpreter will compute and print the result.

Back to my home page...

Luca Saiu
Last modified: 2011-12-13
Copyright © 2009, 2010, 2011 Luca Saiu
Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.