PLDA Homework 3: Type inference

Due: Nov. 4, 2010

Implement type inference for expressions with the following (abstract) syntax:

Expr ::= num | id | Expr '+' Expr | 'fun' id '=' Expr | Expr Expr
i.e., integers, variables, addition, function definition (lambda abstraction) and application. Free variables are allowed. You may assume no two lambda abstractions bind the same variable (no renaming is needed). Report invalid typing using exceptions.
Marius Minea
Last modified: Fri Oct 29 12:00:00 EET 2010