Lab 1 Test Suite

Programming Languages Course, 2007
Bjorn Bringert (bringert (at)


Before you submit lab 1, your solution must pass the testsuite. This document describes how to obtain and use this testsuite.

UPDATE: The testsuite has now been extended with more good and bad test programs, and more tests will be added continously. This is done as a service to you, so that you can check your solution before submitting it. The old lab1-testsuite.tar.gz is still available, but please use the new one as described below.


You will only need to do this this part once.

  1. Download lab1-testsuite-larger.tar.gz.

  2. Unpack the downloaded file:
      $ tar -zxf lab1-testsuite-larger.tar.gz

  3. Enter the lab1-testsuite-larger directory:
      $ cd lab1-testsuite-larger

  4. Compile the test program:
      $ ghc --make -o progs-test-lab1 progs-test-lab1.hs

Running the testsuite

This is what you need to do to test your grammar.

  1. Enter the lab1-testsuite-larger directory (if you are not there already):
      $ cd lab1-testsuite-larger

  2. Run the progs-test-lab1 with the path to your .cf file:
      $ ./progs-test-lab1 path/to/your/

    (where path/to/your/ is the location of your grammar file.

NOTE: The start category (entry point) of your grammar must be called Program.