The self-reference of this sentence is achieved in a more direct way than in
the Epimenides paradox; less hidden processing is needed. By the way, it is
interesting to point out that the phrase "this sentence" appears in the
previous sentence; yet it is not there to cause self-reference; you probably
understood that its referent was the Quine sentence, rather than the
sentence in which it occurs. This just goes to show how pointer phrases
such as "this sentence" are interpreted according to context, and helps to
show that the processing of such phrases is indeed quite involved.
A Self-Reproducing Program
The notion of quining, and its usage in creating self-reference, have al-
ready been explained inside the Dialogue itself, so we need not dwell on
such matters here. Let us instead show how a computer program can use
precisely the same technique to reproduce itself. The following self-
reproducing program is written in a BlooP-like language and is based on
following a phrase by its own quotation (the opposite order from quining, so
I reverse the name "quine" to make "eniuq"):
DEfINE PROCEDURE "ENIUQ" [TEMPLATE): PRINT [TEMPLATE. LEfT-BRACKET.
QUOTE-MARK. TEMPLATE. QUOTE-MARK. RIGHT-BRACKET. PERIOD]'
ENIUQ
['DEFINE PROCEDURE "ENIUQ" [TEMPLATE]: PRINT [TEMPLATE. LEFT-BRACKET.
QUOTE-MARK. TEMPLATE. QUOTE-MARK. RIGHT-BRACKET. PERIOD]'
ENIUQ'].
ENIUQ is a procedure defined in the first two lines, and its input is called
"TEMPLATE". It is understood that when the procedure is called,
TEMPLATE's value will be some string of typographical characters. The
effect of ENIUQ is to carry out a printing operation, in which TEMPLATE
gets printed twice: the first time just plain; the second time wrapped in
(single) quotes and brackets, and garnished with a final period. Thus, if
TEMPLATE's value were the string DOUBLE-BUBBLE, then performing
ENIUQ on it would yield:
DOUBLE-BUBBLE ['DOUBLE-BUBBLE'].
Now in the last four lines of the program above, the procedure ENIUQ is
called with a specific value of TEMPLATE-namely the long string inside the
single quotes: DEFINE ... ENIUQ. That value has been carefully chosen; it
consists of the definition of ENIUQ, followed by the word ENIUQ. This makes
the program itself-or, if you prefer. a perfect copy of it-get printed out.
It is very similar to Quine'S version of the Epimenides sentence:
"yields falsehood when preceded by its quotation"
yields falsehood when preceded by its quotation.
It is very important to realize that the character string which appears in
quotes in the last three lines of the program above-that is, the value of
(^498) Self-Ref and Self-Rep