ICFP 2001 Programming Contest

Unreal files

Team Members

Our program


Our program is completely written in Objective-caml . We used the Caml Development Kit at the beginning in case special libraries were needed but finally, we almost didn't use it.



At the beginning of the contest, we immediatly defined two representations for the document. Then we divided the task in different parts:
  1. Creation of a generator of SML/NG files,
  2. Lexing and parsing: file to untyped representation,
  3. Typing: untyped representation to typed representation,
  4. Optimisations: typed representation to typed representation,
  5. Output: typed representation to file,
  6. Validation: types representation to bool.
Thanks to the fixed representations of the document, each member was able to develop its own optimisation passes. After each optimisation pass, the document size was checked (bigger documents were rejected) and the equivalence with the initial document was checked too. This allowed us to detect lots of bugs in our optimisations without using the judges'validator.

SML/NG file generator

To test our program we needed some SML/NG files of various sizes and didn't want to write them by hand. We quickly developped our own generator with various options to suit our needs : We wanted the generator to generate a file, call our simplifer and connect to the online validator to check our result, but then we realized that our program had to be able to check its results by its own, so the generator turned out to be nothing more than a random generator. This way we were able to feed our simplifier with a lot of big files, hoping it would cover a maximum of different cases.

Performed Optimisations

Big Problems

During the contest, we encountered some big problems:


On the 7 tests published by the judges, here are our results: