2 ms·
This is (to respond to sibling comments) not the halting problem per se. It is the problem of not having any control over a runaway loop in the browser. You cou
by marijn 14y ago
This is (to respond to sibling comments) not the halting problem per se. It is the problem of not having any control over a runaway loop in the browser. You could parse and transform code to add a check on every backwards jump (end of loop body, continue statements) that increments a counter or checks the time and throws an exception when it decides the code has ran for too long.
(Of course, that'll slow the code down a lot.)