|
|
|
|
|
|
|
|
|
|
|
|
|
There
are some things computers
|
|
|
cannot
do … and we can prove it!
|
|
|
|
• |
No computer program can tell, give another
|
|
|
program P, if P loops forever … halting prob
|
|
|
|
• |
If possible, it would be handy for debugging
|
|
|
|
• |
In fact, it seems possible … look closely at the
|
|
program, check the for-statements (and
|
|
|
other looping structures we didn’t learn)
|
|
|
|
• |
Suppose Loop_Check (P, Q) tests pgm P on
|
|
|
input Q, answering “yes/no” to loops forever
|
|