previous chapterthe pico pagenext chapter


Interpretation of programs

We will first focus on the inner workings of a computer, that is a machine capable of simulating a computational process by interpreting a program that describes it. In order to separate the different concerns, we will view a computer as consisting of three collaborating components:


The core of the computer is the evaluator eval which maps expressions onto their values:

eval : { expression } Æ { value }

The evaluator is the actual embodiment of the meaning that must be attributed to a program. We will use the two terms expression and value to refer to the machine's internal representation of a program and to the result of its interpretation. In the next chapter we shall see that values are exactly those expressions that are neutral to the eval function. The read and print components map text onto expressions and values onto text:

read : { character } Æ { expression }

print : { value } Æ { character }

In doing so, we distinguish between how we as human beings represent information -using strings of characters from some alphabet- and how this is done by the machine performing the actual simulation.

In the real world, a computer is not an abstract concept but a physical entity that is itself -strangely enough- a computational process. A pocket calculator for instance contains a minuscule electronic device that is driven by a behaviour as laid down in some program. This leads us to the slightly surprising consideration that any computer that we are physically confronted with sits at the bottom of a tower of machines:


Every level consists of a read-eval-print machine (REP for short) capable of interpreting a program in a particular language. In modern personal computers we can easily distinguish a tower consisting of three tiers of processes:

Each of these three tiers has changed over time and will continue to do so. At one time a typical computer consisted of vacuum tubes wired together in an organised way and governed by how electrons behave in a vacuum when exposed to an electrical field. Future generations of computers will probably exploit the behaviour of photons inside optical conduits. These examples go to show that it is necessary to make abstraction of the physical implementation of computational devices and to concentrate on the computational processes themselves.


previous chapterthe pico pagenext chapter