New Type Inference Engine

garau at ar.ibm.com garau at ar.ibm.com
Mon Jan 10 08:27:46 UTC 2000




There is a new implementation of a Type Inference engine available from
http://typeinference.swiki.net. It is based on Ole Agensen thesis (also
there) with some improvements on the treatement of blocks and variables.
His ideas about the parallelism between run time and type inference time,
are taken a step further.

As usual this is not a finished work, and there are many things to be done
before attempting to infer types on existing code. Meanwhile, you can play
and experiment with what we have.

This version of the engine does not infer any type if there are references
to a method variable inside a block (like self). This is a limitation since
a great part of Smalltalk code happens inside blocks. I think I know how to
solve this, but since I need to write my thesis, I wont implement it right
now. There is a long to-do list with varying levels of difficulty (from
very easy, to really challenging) that I would love to share with you, and
coordinate the efforts of whoever wants to colaborate. But I think I wont
be able to do so... I want to be focused on the writing.

Lets show some examples:

5 max: 6
      return {<SmallInteger>}

5.0 max: 6.0
      return {<Float>}

1 at 1
     return {<Point x: <SmallInteger> y: <SmallInteger>>}

Point new setX: #hello setY: 'bye'
     return {<Point x: <Symbol> y: <String>>}

[:arg | arg] value: #hello
     return {<Symbol>}

If you want to play with the engine, fileIn 1) Ti-Tests 2) Ti-Support 3)
Ti-Engine. If you want the MorphicWrappers I would suggest to fileIn MW27b.
Then, read Ti-Engine preamble to see some examples.

There are many people who help this come true and wich I want to thank.
First of all, Leandro Caniglia (my advisor) for all his enthusiasm,
encouragement and dedication. Following his dynamic spirit, he promoted the
creation of local group where we could talk about type inference. All my
thanks to Valeria Murgia, Gerardo Richarte, Luciano Notarfrancesco,
Alejandro Weil and Pablo Malvolta.

Finally, since this project was born in MathMorphs and since its mailing
list carries much less traffic than this one, I would suggest to continue
this thread there. See http://mathmorphs.swiki.net on how to subcribe the
mathmorphs list.

Regards

Francisco (Pancho) Garau
Ph: (5411) 4319-6213. Fax: (5411) 4319-6422
garau at ar.ibm.com (work) - - - fgarau at bigfoot.com (home)






More information about the Squeak-dev mailing list