Computability and complexity
Mathematically, a computing device consists of
a finite table of instructions and a possible
infinite memory in which to store intermediate results.
In order to perform a computation the device also needs an input
and some means by which to display the results.
For now, we need not be concerned with the precise
mathematical details of our model of a computing device.
For a very much more precise and elaborate description
of the Turing machine, the interested reader is referred
to [Hopcroft].
What is important, however, is that this model captures
in a very precise sense the notion of computation,
in that it allows us to characterize what can be computed,
and also what a computation will cost,
in terms of computing time and memory usage.
An interesting, but perhaps somewhat distressing, feature
of the Turing machine model is that it is the strongest model
we have, which means that any other model
of computation is at best equivalent to it.
Parallel computation models in effect do extend the power
of (sequential) Turing machines, but only in a linear
relation with the number of processors.
In other words, the Turing machine defines what we may regard
as computable and establishes a measure
of the complexity of a computation, in space and time.
The awareness of the intrinsic limitations imposed
by a precise mathematical notion of computability
has, for example, led to regard the claims of artificial intelligence
with some caution (see Rabin, 1974).
However, the theoretical insight that a problem
may in the worst case not be solved in finite time
or space should not hinder us in looking for
an optimal, approximate solution that is reachable
with bounded resources.
An equally important feature of the Turing machine
model is that it gives us an illustration of what
it means to program a computing device,
that is to instruct the machine to perform actions
dependent on its input and state.
As an extension to the model, we can easily build a universal
computing device, into which we may feed the description of
some particular machine, in order to mimic the computation
of that machine.
Apparently, this gives us a more powerful machine.
However, this has proven not to be the case.
Neither does this universal device enlarge the class
of computable problems, nor does it affect
in any significant sense the computational complexity
of what we know to be computable.
See slide [2-devices].
Computing devices
- mathematical model -- Turing machine
- universal machine -- machines as programs
- computability \& complexity -- time/space bounded
Object-oriented programming does not enlarge the class
of computable problems, nor does it reduce the computational
complexity of the problems we can handle.
slide: Computing devices
Interestingly, there is an extension of the
(basic and universal) Turing machine model that allows
us to extend the narrow boundaries imposed by a mathematical
characterization of computability.
This extension is known as an oracle machine,
and as the name suggests, the solution to an
(otherwise) intractable problem must come from
some external source, be it human,
machine-like or divine (which is unlikely).
Partly, this explains why intelligent
systems (such as automatic translation systems)
are, to a certain extent, intrinsically interactive,
since only the human user can provide the (oracle) information
needed to arrive at a solution.
Our model of a computing device does quite
precisely delimit the domain of computable problems,
and gives us an indication of what we can expect the
machine to do for us, and what not.
Also, it illustrates what means we have available
to program such a device, in order to let it
act in the way we want.
Historically, the Turing machine model may be regarded
as a mathematical description of what is called the
Von Neumann machine architecture, on which most of our present
day computers are based.
The Von Neumann machine consists of a memory and
a processor that fetches data from the memory,
does some computation and stores the data back in memory.
This architecture has been heavily criticized,
but no other model has yet taken its place.
This criticism has been motivated strongly by its influence
on the practice of programming.
Traditionally, programs for the Von Neumann architecture
are conceived as
sequences of instructions that may modify the state
of the machine.
In opposition to this limited, machine oriented view of
programming a number of proposals have been made
that intended to arrive at a more abstract notion of programming,
where the machine is truly at the service of the programmer
and not the other way around.
One of these proposals to arrive at a more abstract notion of programming
is advocated as the object-oriented approach.
Before studying the intrinsics of the object-oriented approach,
however, it may be useful to reflect on what we may expect from it.
Do we hope to be able to solve more problems,
or to solve known problems better?
In other words, what precisely is the contribution of
an object-oriented approach?
Based on the characterization of a computing device,
some answers are quite straightforward.
We cannot expect to be able to solve more problems,
nor can we expect to reduce the computational complexity
of the problems that we can solve.
What an object-oriented approach can contribute to,
however, is simply in providing better means
with which to program the machine.
Better means, to reduce the chance of (human)
errors, better means, also, to manage the complexity
of the task of programming (but not to reduce
the computational complexity of the problem itself).
In other words, by providing abstractions that
are less machine oriented and more human oriented,
we may enlarge the class of problems that we can
tackle in the reality of software engineering.
However, we simply cannot expect that an object-oriented
approach may in any sense enlarge our notion
of what is computable.