User Tools

Site Tools


Programming Languages

The goals of this course are:

  • Highlighting the basics features of various programming paradigms
  • Getting a grasp of the mathematical theory behind programming languages
  • Gently introducing functional programming languages
  • Implementing some abstract machines and static analyses for programming languages.

Check constantly also the news page of the website, do not stick to this page.



The course grade will be determined as follows:

Test 270 Date
Lab test #1 10% 02/11/2017
Lab test #2 10% 30/11/2017
Lab test #3 10% 21/12/2017
Lab final project 20% 04/02/2018
Theory midterm #1 10% 19/10/2017
Theory midterm #2 20% 23/11/2017
Theory midterm #3 20% 14/12/2017

The deadlines for Lab tests and projects are firm.

Lab tests can be repeated according to the rules stated in the introductory slides. The Lab final project has to be delivered in time, and no projects will be evaluated if delivered after the deadline.

How to obtain the grade in the Lab tests

The main way is to attend Lab lessons and do the three tests. For those who fails the three Lab tests or would like to have a better grade, there will be the special test in June 2018 (see below). This test will cover and substitute the three tests, and participating regardless the actual delivering of the solutions will cancel the previous Lab tests grade.

Special Lab test (June 2018)

The Lab test for those who would like to have a grade or a better grade will take place on June, 2018 (the date will be set in May 2018) in Laboratorio T. Students wishing to do this test have to enrol on the moodle platform starting from June 1st. Recall that once you take place to the test, the grade for the Lab test will be the last one, regardless the one you may possibly got before. From the beginning of the proof you have 15 minutes to decide whether to continue or to stop. If you continue the grade will be the one you will get in that test, if you stop it will remain the one you had before. The whole test will last two hours.

How to obtain the grade in the Project

Just deliver the project in time. This is the unique possibility.


The project have to be done in groups, and groups have to be formed at most by 4 components (recommended choice). Each group must have a representative and, after forming groups, each representative has to send an email containing the names of the components (including herself/himself). The email should be sent no later than the 30th of December. I will assign to each group an identifier and communicate it to the groups representative, and the representative is responsible for submitting the project (in a single, tarred and gzipped file which name is identifier.gz). The project will be submitted in the appropriate moodle section. I will not consider any project delivered in the wrong place or by the wrong person. Once that a group is formed, the additions or the removal of a component will produce a penalty (to be subtracted from the project score). Groups representatives are encouraged to email me asking for every possible information.

When needed, I will communicate via email with the groups representatives.

The deadline for delivering the project is firm. There will be no exception.

The project is described in this (possibly updated) document.


The page with the score is available at the following link. Recall that the final grade is obtained summing all the scores of the various proofs.

The final grade may not be the exact sum of the various proofs, but it can be a rounding of this sum. Rounding will be applied at the end.

The final grade (if applicable, i.e. if it is greater or equal to 18) will be filled as soon as it is available.


The moodle platform is used to deliver the solutions of the project and of the Lab Tests. Registration on the noodle platform is mandatory.

Teaching material

Slides of Class lectures

  1. Introductory Lecture (26/09/2017) slides
  2. Context-free Languages (CF grammars) slides. These slides cover the part concerning context-free languages (grammars, push-down automata, closure properties)
  3. Parsing slides. These slides cover the part on parsing top down
  4. Introduction to Abstract Machines slides
  5. Introduction to Operational Semantics slides
  6. Memory and Environment slides
  7. Functions as parameters slides
  8. SECD Machine slides
  9. Data slides
  10. Abstract Data Type slides



Lab slides & exercises

  1. Introductions to functional programming and OCAML basic: slides
  2. Functions: slides exercises
  3. Higher order functions : slides exercises homework solutions
  4. Lists and pattern matching : slides exerciseshomeworks
  5. Exercises : homeworks
  6. Map and filter combinators on list: slides exercises BigInteger BrainTeaser homeworks
  7. Fold combinator on list : slides exercises homeworks
  8. Exercises exercises
  9. Recursive types slides exercises

Further documentation

  1. Ocaml basics: emacs mode; arithmetic expressions; booleans and conditionals; definitions; functions; partial functions; compiling. ( assignment )
  2. IMP interpreter: (sources)

Books and online resources

Here you can find some links to teaching resources about OCaml.

lip.txt · Last modified: 2018/01/12 12:16 by gmpinna