cdiggins.com

May 4, 2007

Cat Version 0.12.1 - Now with Limited Type Inference

Filed under: Everything — cdiggins @ 11:30 pm

I’ve just released a version 0.12.1 of Cat which now has a preliminary version of the inference engine. The type inference engine is still experimental but preliminary tests are promising. The type inference command is “#t”. This command pops a flat (i.e. non nested) quotation of exclusively primitives from the stack and will then tell you the type, and show the steps of constraint unification is used to arrive at the result. To see some examples in action look at “tests.cat” or type in “test_types”.

Even though the type inference feature isn’t completely finished, the initial results are superb, with the inference engine being able to handle non-trivial cases like: “eval eval”, “dip dip” or “dup dip”. If I am not mistaken, I don’t believe that even Haskell can handle those kinds of inference cases.

Other changes with the new release include:

  • restored the “#exit” command
  • added a “#save” command for saving transcripts
  • exit session transcripts are automatically saved in the default windows temporary folder using a unique name

A special thanks to Scott Prouty for giving Cat such a great workout and making so many helpful suggestions.

In other news, Gabor Greif is continuing work on his implementation of a statically typed Cat interpreter using Omega.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress