Principles of Programming languages

The course will loosely follow the text book “Concepts Techniques and Models of Computer Programming” by Peter Van Roy and Seif Haridi. The primary platform used in this book is the Oz language. One of the advantage of oz is that it provides features for all the different styles of programming. However, this is also its weakness. Therefore we will also look at candidate language for each of the paradigm to better appreciate the power/weakness of each of these paradigm.

Assignment submission

Note:

The Oz package for 64-bit is buggy. If you have trouble installing it for use you may try the following image file of about 2.3 GB (internal link) created by Satvik with virtual box. The root user password is toor and that of the user debian is reverse. I have not tested it though.

Course TA

  1. Satvik C (email id satvikc)
  2. Smriti J (email id smritij)

Programming Environment

  1. Oz/Mozart.

  2. swi-prolog for Prolog

  3. Erlang

  4. GHC for Haskell

  5. Agda for dependent typed programming

Online reading material

  1. Github repository of some sample code that I showed in the class

  2. Implementation of Functional Programming Language Topics covered in the class include:

    1. How pattern matching is compiled efficiently.
  3. A complete unification algorithm is given in my functional programming lecture notes. This unification algorithm is tailored for type inference but you can have a look.

Some difficult (long term) exercises that you can try out.

  1. Implement the general unification algorithm described in the class. Use any of your favorite programming language although doing it in C or Java might not be such a good idea.

Beware: many algorithms described in literature have subtle bugs.

  1. Code up the resolution algorithm used by Prolog (SLD Resolution). Implement a simple prolog interpreter based on it.