Self-modifying code
Henry Spencer
henry at utzoo.uucp
Sun Jul 24 08:17:43 AEST 1988
In article <473 at m3.mfci.UUCP> colwell at mfci.UUCP (Robert Colwell) writes:
>... The capability people argue that the same
>thing extends into all areas of computer systems. Recall the classic
>arguments about turning off runtime bounds checking to reclaim that
>lost performance -- why should a programmer, in the best of all
>possible worlds, have to worry about things like that? ...
My counterargument is that it is almost as much of an imposition on the
programmer to have such checks done at runtime as it is to have them not
done at all. Given the impossibility of complete testing, there is no
way to guarantee such tests will catch a bug during development. This
means that the programmer has to go through the same complicated exercise
of trying to assure himself that the problem will never happen. What is
really wanted is a way to check these properties at COMPILE TIME... in
which case the runtime checks become largely superfluous anyway.
Can it be done? Well, in one sense the answer is clearly yes, because a
proof of program correctness has to include it, and we know that automating
such proofs is possible (although seldom practical at the moment). The
question is whether it can be done with practical, affordable machinery
without crippling the language. My own long-held conjecture is that the
answer is "yes", but I don't have proof of that yet.
--
Anyone who buys Wisconsin cheese is| Henry Spencer at U of Toronto Zoology
a traitor to mankind. --Pournelle |uunet!mnetor!utzoo! henry @zoo.toronto.edu
More information about the Comp.lang.c
mailing list