[Pharo-project] type inference in Pharo
Hi! There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
It's in the same blog: http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html Cheers, Guille On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Hi!
There is some work being done on inferring type ( http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Santiago's building on Francisco Garau's thesis, which builds on Ole Agesen's PhD thesis: ttps://labs.oracle.com/techrep/1996/smli_tr-96-52.pdf "Concrete Type Inference: Delivering Object-Oriented Applications" which tackles the problem of type inference in the context of a Self image. frank On 17 July 2012 17:08, Guillermo Polito <guillermopolito@gmail.com> wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Well... I still do not know which algorithm is used. Without a clear answer, I do not know how to compare it with other type inferencer. For example, is the one of Scala more accurate? No idea Cheers, Alexandre On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On 17 July 2012 18:31, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Well... I still do not know which algorithm is used. Without a clear answer, I do not know how to compare it with other type inferencer. For example, is the one of Scala more accurate? No idea
Very different kind of beast. Scala's type inference will use some kind of Hindley-Milner unification based algorithm. Concrete type inference answers a different question: given some expression, what are the _actual_ types (hence "concrete", rather than "the most general possible type"/abstract) of the bits of the expression. So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number". It uses abstract interpretation, if that answers your question? I don't think it would be inaccurate to say that it works like Shivers/etc's k-CFA work. frank
Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number".
It uses abstract interpretation, if that answers your question?
Well... not really. The problem I have is the following: I would like to compare two techniques to get dependencies between classes. One using a type inferencer and another using a profiler we have done. The hypothesis I would like to verify is that statically you always know less than by profiling the execution. However, it is difficult for me to use your type inferencer if I do not exactly know what is your algorithm. In a scientific publication, I cannot just put the url of the blog as a description of the algorithm. Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On 18 July 2012 15:23, Alexandre Bergel <alexandre.bergel@me.com> wrote:
So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number".
It uses abstract interpretation, if that answers your question?
Well... not really. The problem I have is the following: I would like to compare two techniques to get dependencies between classes. One using a type inferencer and another using a profiler we have done. The hypothesis I would like to verify is that statically you always know less than by profiling the execution.
However, it is difficult for me to use your type inferencer if I do not exactly know what is your algorithm. In a scientific publication, I cannot just put the url of the blog as a description of the algorithm.
http://dl.dropbox.com/u/1754431/Type%20inference/TiThesis-1.pdf isn't exactly a post on a blog though. Francisco can of course correct me if I'm wrong, but I'm pretty sure he & I discussed something like what you're after during a UKSTUG meeting. I wanted to be able to answer questions like "what types does this method take as arguments? what types can it return?", which is something like calculating dependencies between classes. I'm pretty sure he felt that concrete type inference wouldn't answer those kinds of questions. I solved my issue [1] by querying the system: given a single-parameter method, what messages are sent to that parameter? What classes implement that set of messages? frank [1] http://www.lshift.net/blog/2012/01/31/duck-finding-for-testing-your-theories
Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
The description of the algorithm is fully detailed in the Francisco Garau 's thesis.. you should read it. In a fairy case, you have the same info, but right now is not that good. You can collect probably more info profiling an execution.. but.. you must execute the code. If it is not expensive to execute, maybe you should execute it, but it is not general enough right? Best. Santiago. 2012/7/18 Alexandre Bergel <alexandre.bergel@me.com>
So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number".
It uses abstract interpretation, if that answers your question?
Well... not really. The problem I have is the following: I would like to compare two techniques to get dependencies between classes. One using a type inferencer and another using a profiler we have done. The hypothesis I would like to verify is that statically you always know less than by profiling the execution.
However, it is difficult for me to use your type inferencer if I do not exactly know what is your algorithm. In a scientific publication, I cannot just put the url of the blog as a description of the algorithm.
Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <
alexandre.bergel@me.com> wrote:
Hi!
There is some work being done on inferring type ( http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Ok. How can I run the type inferencer? http://concretetypeinference.blogspot.com does not explicitly say it I remember you've said it in an email, but it has been some weeks ago Cheers, Alexandre On Jul 18, 2012, at 10:54 AM, Santiago Bragagnolo wrote:
The description of the algorithm is fully detailed in the Francisco Garau 's thesis.. you should read it.
In a fairy case, you have the same info, but right now is not that good. You can collect probably more info profiling an execution.. but.. you must execute the code. If it is not expensive to execute, maybe you should execute it, but it is not general enough right?
Best. Santiago.
2012/7/18 Alexandre Bergel <alexandre.bergel@me.com>
So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number".
It uses abstract interpretation, if that answers your question?
Well... not really. The problem I have is the following: I would like to compare two techniques to get dependencies between classes. One using a type inferencer and another using a profiler we have done. The hypothesis I would like to verify is that statically you always know less than by profiling the execution.
However, it is difficult for me to use your type inferencer if I do not exactly know what is your algorithm. In a scientific publication, I cannot just put the url of the blog as a description of the algorithm.
Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
did you tried roelTyper or the RBTypeGuesser? RoelTyper may have to be adapted to closure but the algorithm is documented in the DSL paper. Stef On Jul 18, 2012, at 4:23 PM, Alexandre Bergel wrote:
So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number".
It uses abstract interpretation, if that answers your question?
Well... not really. The problem I have is the following: I would like to compare two techniques to get dependencies between classes. One using a type inferencer and another using a profiler we have done. The hypothesis I would like to verify is that statically you always know less than by profiling the execution.
However, it is difficult for me to use your type inferencer if I do not exactly know what is your algorithm. In a scientific publication, I cannot just put the url of the blog as a description of the algorithm.
Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
RoelTyper may have to be adapted to closure but the algorithm is documented in the DSL paper.
Yes, this is an important piece of work that I will consider. I am looking for additional related work. Cheers, Alexandre
On Jul 18, 2012, at 4:23 PM, Alexandre Bergel wrote:
So running type inference over "1 + e" will say "e is a SmallInteger", rather than "e is a Number".
It uses abstract interpretation, if that answers your question?
Well... not really. The problem I have is the following: I would like to compare two techniques to get dependencies between classes. One using a type inferencer and another using a profiler we have done. The hypothesis I would like to verify is that statically you always know less than by profiling the execution.
However, it is difficult for me to use your type inferencer if I do not exactly know what is your algorithm. In a scientific publication, I cannot just put the url of the blog as a description of the algorithm.
Cheers, Alexandre
On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
How can I install and try the type inferencer? I could not immediately see that from http://concretetypeinference.blogspot.fr/ Cheers, Alexandre On Jul 17, 2012, at 12:08 PM, Guillermo Polito wrote:
It's in the same blog:
http://concretetypeinference.blogspot.fr/2012/05/about-how-i-got-here.html
Cheers, Guille
On Tue, Jul 17, 2012 at 6:03 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
There is some work being done on inferring type (http://concretetypeinference.blogspot.com). What is the theoretical background of this work? What is the algorithm used to infer the types?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (5)
-
Alexandre Bergel -
Frank Shearar -
Guillermo Polito -
Santiago Bragagnolo -
Stéphane Ducasse