let's write a function to see if any other function will halt/crash. how hard could this be. has anyone worked on this problem
let's write a function to see if any other function will halt/crash. how hard could this be. has anyone worked on this problem
Oh some old people worked on it. What do they know.
It left me with a kind of dread hearing such CS positions, though I guess there was enough insights and knowhow to get over it.
I knew a fellow who had this conversation with someone in the Rand Corporation, in the 1960s perhaps.
The way he described it, there were two floors, and he worked on the first floor, but one day he went up to the second and asked what they were working on. He explained why it couldn't be done, and then went back down to the first floor.
(Another fellow worked for the Pentagon and got questions to answer in units of GDP. But nobody was reading the answers, fortunately.)
I'm not saying it's easy to write code to determine whether a function will halt, but if a human can use logic to make that determination, then a machine should be able to make that same determination by running the same algorithm.
I might start but I probably wouldn't finish. Have you tried AI?
(Well now my eye falls on Tina not much further down the page but let's just leave that as it is. Though I'd like my eye backj.)
Super simple. Let me ask all the AIs, I should have an answer for you in 15 minutes or so.
```php
function will_it_halt() {
the_function_to_check();
return true;
}
```
this function will never give the wrong answer and can always tell that a halting function halts. Implementing the non-halting-function-case is left as an exercise to the reader.
(From the German saying: "Unmögliches erledigen wir sofort. Wunder dauern etwas länger.)
Thinking about the time that @aeva said something like:
"Solved the halting problem: every program will halt (heat death of the universe)"
willItHalt(funcName):
while(True):
pass
return True
fun f => false
A space for Bonfire maintainers and contributors to communicate