From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 772C5BC88 for ; Tue, 1 Feb 2005 06:26:36 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j115QafY027547 for ; Tue, 1 Feb 2005 06:26:36 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA07489 for ; Tue, 1 Feb 2005 06:26:35 +0100 (MET) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j115QZ9G018031 for ; Tue, 1 Feb 2005 06:26:35 +0100 Received: from [192.168.1.101] (marcadet-4-81-56-68-124.fbx.proxad.net [81.56.68.124]) by postfix4-1.free.fr (Postfix) with ESMTP id 4EAD728B92A for ; Tue, 1 Feb 2005 06:26:33 +0100 (CET) Message-ID: <41FF1305.30308@inseal.com> Date: Tue, 01 Feb 2005 06:26:29 +0100 From: Philippe Fremy User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: type inference for python X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41FF130C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41FF130B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; inference:01 inference:01 ocaml:01 def:01 def:01 ...:98 assertions:01 int:01 constraints:01 constraints:01 caml:02 append:02 append:02 python:02 python:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: 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