From: Philippe Fremy <pfremy@inseal.com>
To: caml-list@inria.fr
Subject: type inference for python
Date: Tue, 01 Feb 2005 06:26:29 +0100 [thread overview]
Message-ID: <41FF1305.30308@inseal.com> (raw)
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
next reply other threads:[~2005-02-01 5:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-01 5:26 Philippe Fremy [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41FF1305.30308@inseal.com \
--to=pfremy@inseal.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox