3 ms·
Isn't this just an example of the halting problem? As in, you can't prove that a program won't ever halt.
by chris_wot 11y ago
Isn't this just an example of the halting problem? As in, you can't prove that a program won't ever halt.
- veddan 11y agoFor many programs it's easy to decide whether they halt or not. int main(void) { for (;;); }
- icebraining 11y agoThe halting problem doesn't say that you can never prove that any given program won't ever halt, just that some programs (written in a Turing-complete language) are undecidable. You can write a program which can be proven will or won't ever halt. But the typical solution to this particular problem is to correctly employ a watchdog[1] that will restart your program if it halts. In fact, this wifi-monitoring plug is serving as a watchdog itself. [1] https://en.wikipedia.org/wiki/Watchdog_timer https://en.wikipedia.org/wiki/Watchdog_timer
- qb45 11y ago> Isn't this just an example of the halting problem? As in, you can't prove that a program won't ever halt. Not really, the HP is about writing a program which automatically proves halting/not-halting for every possible program you feed into it.