Main | October 2004 »

September 30, 2004

Algorithm W implementation

I worked on the o'caml implementation of Milner's algorithm W. I hoped I would finish it early today (and actually 'nearly' everything was working in the early afternoon), but got stuck on a naughty bug with 'let' expressions. It seems (but I am not sure this is actually the case) that I am not determining correctly which variables are generic and which are not.

Usually, the more I glance at the same bit of code, the less I understand what is going on. So, since I was getting nowhere with the debugging today, I left it for tomorrow and started studying Wand's 1987 paper 'Complete Type Inference for Simple Objects'. I haven't finished reading it yet.

September 29, 2004

Hindley-Milner algorithm

I studied Milner's 1978 paper 'A Theory of Type Polymorphism in Programming' and in particular the algorithm W to produce a well-typing for a simple lambda-calculus based language, 'Exp'. I presented the algorithm to Prof. Wadler, to make sure I had actually understood it.

I started then working on an implementation of the algorithm in o'caml. I have updated the parser, lexer, and internal types from my old interpreter to accept Milner's Exp language. That means more or less all the 'support work' has been done. I have also started implementing the algorithm in itself, but there is still plenty to do there.

I also installed the weblog system to track my work during my master project in Edinburgh.

A new weblog is born

My master project weblog is born on the 29th of September 2004 at 14:13. I intend to post on it every day (or nearly so) a short note about the status of my work.