Closed chrismwendt closed 10 years ago
Since termination and looping is undecidable, just return a (potentially infinite) list of intermediate steps in reduction so that computation can be stopped at any step.
For example:
evaluate (K K K)
[K]
evaluate omega
[omega, omega, ... ]
omega = (\x.x x) (\x.x x) = (S I I) (S I I)
Since termination and looping is undecidable, just return a (potentially infinite) list of intermediate steps in reduction so that computation can be stopped at any step.
For example:
evaluate (K K K)
would return[K]
evaluate omega
would return[omega, omega, ... ]
omega = (\x.x x) (\x.x x) = (S I I) (S I I)