On Wed, Dec 18, 2013 at 9:00 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> what if we could examine the bytecode to see if it has any loops?
This sounds like the halting problem...
Heh, I was going to mention that too, but I forgot about it. The halting problem only concerns whether a loop will ever finish. Here it's enough to determine whether a loop exists at all. I think the only way they can exist is a backward branch (easy to detect) or a chain of functions that call eachother (not so easy, but we can disallow the creation of functions).