caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* type inference for python
@ 2005-02-01  5:26 Philippe Fremy
  2005-02-01  6:56 ` [Caml-list] " Richard Cole
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Philippe Fremy @ 2005-02-01  5:26 UTC (permalink / raw)
  To: caml-list


	Hi,

I would like to implement something similar to the type inference of 
ocaml for the python language. I have always found it very impressive 
(although I have only used caml light).

I have no experience with the topic, it is just a project that seems 
cool to me :-)

Do you have any hints or where I could build up my knowledge (code, 
books, article, ...) to do that kind of thing.

I imagine that it works in a kind of three way pass:

1. analyse all the constraints of the code
Ex:
def f(a): a.append(1)
def g(a): a=a+1; f(a)
g('coucou')

=> a must support append
=> a must also be an int

2. cross-validate the constraints consistency
=> inconsistent assertions

3. validate the constraints against reality
=> g('coucou') will not work


The 2. and 3. looks like the most difficult aspect of it.

	regards,

	Philippe

-- 
Philippe Fremy
InSeal Technical Director
tel: +33 6 07 98 76 44



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-02-01 23:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-01  5:26 type inference for python Philippe Fremy
2005-02-01  6:56 ` [Caml-list] " Richard Cole
2005-02-01  6:58 ` skaller
2005-02-01 10:54   ` Philippe Fremy
2005-02-01 12:37     ` skaller
2005-02-01 23:06       ` Philippe Fremy
2005-02-01  7:25 ` Nicolas Cannasse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).