Hi Nuno, On Thu, Jun 25, 2009 at 9:08 PM, Nuno Lopes<nlop...@php.net> wrote: >> So we do whole program analysis. We start at the first statement in >> global scope, model it, then add all its successor to a queue, and >> keep modelling until we get to the end of the program. When we get to >> a method call, we start modelling the execution of the method. At the >> end of the method, we propagate the results back to the caller, model >> the return value, and carry on modelling the caller.
This is just an outline. I imagine this description can be applied to a lot of compilers and a lot of analysis algorithms. > it sounds like this algorithm: > Precise interprocedural dataflow analysis via graph reachability, POPL'95 > http://portal.acm.org/citation.cfm?id=199462 I'm not familiar with this paper. However, from the abstract, it looks like it wouldn't handle alias analysis (thats not to say it couldnt be extended to do it). More importantly though, PHP's semantics are truly special, so most analyses for "traditional" languages don't apply well. Of course, many of the techniques do. If you're looking for papers that describe the general approach, try http://portal.acm.org/citation.cfm?id=178264 and http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.52.2637. (FYI, people without ACM access can nearly always find those papers by googling the title). Paul > > Nuno > -- Paul Biggar paul.big...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php