>>>> Indeed, we had to patch it to not crash in Moose. But, still it does not >>>> seem to work properly. >> >> Maybe you should rather use RBRefactoryTyper? It is slower, because it >> needs to parse all the involved source code; but it works correctly >> and uses a similar (even more powerful) inferencing algorithm. > > This is true that roel only checked within a method (from my memory) so with > short method this is difficult to get > really good result.
RoelTyper and RBRefactoryTyper do essentially the same: For class- and inst-vars they look at all the compiled methods that refer to these variables. RoelType does an abstract byte-code interpretation to figure out the assignments and the messages sent to the variables; RBRefactoryTyper parses the methods and figures out the assignments and messages sent using the AST. Then they both run a very similar algorithm to figure out the most likely kind of object hold in the variables. They do not necessarily report the same classes in the end, because the heuristics are different. Also RBRefactoryTyper goes a step further and tries to figure out type of elements inside collection types. For method arguments and temporaries they both only look at a single method (there are obviously no other references to the temporaries and arguments). Consequently they both deliver bad results for arguments and temporaries. Lukas -- Lukas Renggli www.lukas-renggli.ch
