Summary

How continuations lets us do goal-solving with backtracking and such!

This paper explains how continuations can be a useful tool in implementing the semantics of Prolog. Specifically, Prolog requires that in order to solve goals, we be able to backtrack: try out different solutions, give up, and go back and try other solutions. Instead of using explicit stacks and assignments to machine registers, we can use recursion, continuations, and parameter passing.

Note

The correspondence between machine registers and parameter passing is reminiscent of SSA is functional programming!