The Cat’s Progress - Slow and Stealthy
Well I’m going to drop off the radar for about 10 days, because I’m driving across America, moving from Seattle to Montreal. It doesn’t look like I am going to be able to make any release before I leave. In general though things are looking very promising, I am now achieving pretty good test coverage with the most recent type system. I still have some problems identifying bound variables in edge cases, though I think I know what I am doing wrong. The current development version of the type reconstructor and constraint solver are accesible online at http://cat-language.googlecode.com/svn/trunk/ in the files http://cat-language.googlecode.com/svn/trunk/CatTypeReconstructor.cs and http://cat-language.googlecode.com/svn/trunk/ConstraintSolver.cs .
I have had some big help from Luca Cardelli’s paper Basic Polymorphic Typechecking ( http://research.microsoft.com/Users/luca/Papers/BasicTypechecking.pdf ). For those of you implementing type systems I strongly recommend that paper. I could never explain things more eloquently than he does. However, let me point out that Luca calls bound type variables “generic” variable and free type variables “non-generic” variables. This is a little non-standard, but to be honest I think it is easier to grasp. I am torn between the two different names in my code, and I keep oscillating between the two (though in the end I think I will end up using “free” and “bound”).
What I find a little mysterious about the type checking literature I have read is that no one has really stated the obvious thing: implementing a type system is very similar to writing a Prolog interpreter. Manfred von Thun was the only person I’ve heard make that connection, and it has proven to be an immensely helpful observation.
P.S.
Luca Cardelli is one of my heroes in the field of computer science. He has an uncanny ability for adding clarity to advanced concepts while maintaining precision and technical accuracy. I can’t recommend his papers enough, too bad all computer scientists didn’t write like he does.