Professional Documents
Culture Documents
Noncomputable Sets: Computable
Noncomputable Sets: Computable
Noncomputable Sets: Computable
MIT 6.042J/18.062J
An infinite string s in {0,1}ω is
computable iff some
Noncomputable procedure computes its digits.
Sets (Procedure applied to argument
n returns nth digit of s.)
Albert R Meyer, March 4, 2015 halting.1 Albert R Meyer, March 4, 2015 halting.2
1
The Halting Problem The Halting Problem
is not decidable
P("albert") returns "meyer"
by computational procedures
P("&&%99!!") causes an error
2
The Halting Problem The Halting Problem
Modify Q to Q': So
Q'(s) returns "yes”
s HALTS iff
if Q(s) returns "no"
Q'(s) returns nothing Q'(s) returns nothing
if Q(s) returns "yes”
Albert R Meyer, March 4, 2013 halting.9 Albert R Meyer, March 4, 2013 halting.10
3
The Type-checking Problem The Type-checking Problem
There is no string procedure that Use C to get a HALTS Tester H:
type-checks perfectly, because: to compute H(s), construct a
Suppose C was a type-checking new program text, s’, that
procedure: for program text s acts like a slightly modified
C(s) returns “yes” if s would cause interpreter for s. Namely:
a run-time type error
returns “ no” otherwise.
Albert R Meyer, March 4, 2013 halting.13 Albert R Meyer, March 4, 2013 halting.14
4
The Type-checking Problem No run-time properties
are decidable
Albert R Meyer, March 4, 2013 halting.18 Albert R Meyer, March 4, 2013 halting.19
5
MIT OpenCourseWare
https://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.