Lehrstuhl Informatik II   
Sprachen und Beschreibungsstrukturen      
   Home Lehre Wintersemester 09/10 Vorlesungen Programming Languages login

Programming Languages

Dozent:Joerg Kreiker
Ort/Zeit:Thursdays 12.15-1.45pm in Room MI 02.07.014
Beschreibung:    Various programming paradigms illustrated by a number of real programming languages such Haskell, Prolog, and others.

Final Exam:

  • results of exam and final grades are published in TUMOnline
  • Inspection will be on Monday, March 15th, 2010; 3pm-4pm at 03.11.58
  • Grading scale is available at page 5 of the first lecture slides
  • Exam and sample solution sol.pdf


  • results of evaluation of assignment 2 published in TUMOnline
  • test cases for evaluation of assignment 2 test.pl
  • assignment2: deadline: Feb 28!
  • results of evaluation of assignment 1 published in TUMOnline
  • test cases for evaluation Test.hs, solution to test cases solution
  • registration in TUMOnline possible


Lectures: Thursdays 12 noon-1.30pm in Room 02.07.014

Tutorial: Mondays 4pm-5.30pm in Room 02.07.014

Question Time: Fridays 3pm in Room 02.07.034

Final Exam: Thursday, March 4, 2010; 2.30pm-3.30pm at MW2350

Assignment 2

  • implement chess endgames (rook, queen, pawn) in Prolog
  • if you did not get a copy of the handout, please ask
  • the original Prolog chess program (use swi-prolog): rook.pl
  • instructions

Assignment 1


  • Step 3 of the generalization algorithm has to take into account the free variables in Gamma inference.pdf
  • Inference rule [C-Let] is incomplete -- the resulting unification problems U' and instance constraints V' have to be collected
  • Substitutions have type [(Type,Type)]. A substitution [(t1,t2), (t1',t2')] is supposed to mean (t1,t2) ; (t1',t2'), that is, not simultaneously, but consecutively
  • [Context] changed to Context in Check.hs (sorry for that)
  • added a few test inputs (Test.hs) below

Implement Haskell type inference in Haskell!


Date Topic Material Exercise
Oct 22 Introduction to Programming Languages and Haskell slides, program, hugs run sheet 1, solution 1
Oct 29 Haskell -- Syntax and Dynamic Semantics slides, program, hugs run sheet 2, solution 2
Nov 5 List comprehensions, let, case, pattern matching slides, program, hugs run sheet 3, solution 3
Nov 9 Pattern matching, value declarations, (user-defined) types, kinds slides, program, hugs run sheet 4, solution 4
Nov 19 Type classes slides, program, hugs run sheet 5, shapes.hs, sh.hs
Nov 26 Modules, type inference slides, compact rules, type inference paper sheet 6, l6.pdf, s.hs, ts.hs
Dec 3 Type inference, unification slides, rules sheet 7
Dec 10 Monads slides sheet 8, euclid.hs, monad_expr.hs
Dec 17 Continuation Passing Style
slides, whiteboard 1, whiteboard 2, cps code, regular expression matcher sheet 9, l9.hs, reg_ex.hs
Jan 7 Introduction to Prolog slides, prolog program sheet 10, l10.pl
Jan 14 Unification, Resolution, Backtracking, Cuts, Negation by failure
slides, program, computation trees sheet 11, l11.pl
Jan 21 Databases, terms, difference lists
slides, program sheet 12, l12.pl
Jan 28 DCG, CLP
slides, program sheet 13, l13.pl
Feb 4 Curry slides, program sheet 14, l14.curry, dt.pdf
Feb 11 Course Summary, Evaluation, Questions slides, C, Prolog, Java, Haskell 1, Haskell 2  

Curry Material:

Prolog Material:

Hugs GUI:

    Python script written by Jakob Kummerow;
    requires Python v. 2.6, PyQt4 and Hugs;

Haskell papers:

Haskell book:


  • each week there will be (programming) exercises, which are not mandatory.
  • two mandatory assignments in weeks 7 and 11 (tentatively)
  • mailing list: proglang@mailseidl.informatik.tu-muenchen.de, register by writing an email to flexeder@in.tum.de



This lecture is about different concepts found across
all programming paradigms. Examples of such concepts
are types, values, control-flow, modularization,
concurrency, or data abstractions. We will focus on
the functional and logical paradigm, (Haskell and Prolog),
but will also treat other languages such as Lustre
(synchronous language), Postscript, or C
(in particular, the pointer concept).

We will see instances of the concepts in these
programming languages. We learn how to choose an
appropriate language for a given programming task and
how to evaluate the strengths and weaknesses of various
languages. Participants will be able to easily adapt
to new languages and they will know the basics of language design.

Lectures will be given in English.



angehängte Dateien:


TUM - Lehrstuhl Informatik II (Sprachen und Beschreibungsstrukturen) Thanks: Tango and TinyMCE     Generationszeit: 10 ms