ArticleslgStudy

computer science

Self-reference

Self-reference is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Self-reference rather than just read about it. In short: Self-reference is a concept that involves referring to oneself or one's own attributes, characteristics, or actions. It can occur in language, logic, mathematics, philosophy, and other fields.

Self-reference — main illustration
Self-reference — illustration

Key takeaways

  • Self-reference belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Self-reference to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Self-reference from memory before moving on to harder problems.

Reference excerpt

Self-reference is a concept that involves referring to oneself or one's own attributes, characteristics, or actions. It can occur in language, logic, mathematics, philosophy, and other fields. In natural or formal languages, self-reference occurs when a sentence, idea or formula refers to itself. The reference may be expressed either directly—through some intermediate sentence or formula—or by means of some encoding. In philosophy, self-reference also refers to the ability of a subject to speak of or refer to itself, that is, to have the kind of thought expressed by the first person nominative singular pronoun "I" in English. Self-reference is studied and has applications in mathematics, philosophy, computer programming, second-order cybernetics, and linguistics, as well as in humor. Self-referential statements are sometimes paradoxical, and can also be considered recursive.

Indirect self-reference Indirect self-reference describes an object referring to itself indirectly. For example, "this sentence is false." contains a direct self-reference, in which the phrase "this sentence" refers directly to the sentence as a whole. An indirectly self-referential sentence would replace the phrase "this sentence" with an indirect reference; an expression that effectively still referred to the sentence, but did not use the pronoun "this." Indirect self-reference can be defined rigorously in terms of cycles in a graph of reference relationships. An example of this is the postcard paradox, in which a sentence refers to another sentence which in turn references the original one. Indirect self-reference was studied in great depth by W. V. Quine and occupies a central place in the proof of Gödel's incompleteness theorems.

Uses

In logic, mathematics and computing In classical philosophy, paradoxes were created by self-referential concepts such as the omnipotence paradox of asking if it was possible for a being to exist that was so powerful that it could create a stone that it could not lift. The Epimenides paradox, 'All Cretans are liars' when uttered by an ancient Greek Cretan was one of the first recorded versions. Contemporary philosophy sometimes employs the same technique to demonstrate that a supposed concept is meaningless or ill-defined. In mathematics and computability theory, self-reference (also known as impredicativity) is the key concept in proving limitations of many systems. Gödel's theorem uses it to show that no formal consistent system of mathematics can ever contain all possible mathematical truths, because it cannot prove some truths about its own structure. The halting problem equivalent, in computation theory, shows that there is always some task that a computer cannot perform, namely reasoning about itself. These proofs relate to a long tradition of mathematical paradoxes such as Russell's paradox and Berry's paradox, and ultimately to classical philosophical paradoxes. In game theory, undefined behaviors can occur where two players must model each other's mental states and behaviors, leading to infinite regress. In computer programming, self-reference occurs in reflection, where a program can read or modify its own instructions like any other data. Numerous programming languages support reflection to some extent with varying degrees of expressiveness. Additionally, self-reference is seen in recursion (related to the mathematical recurrence relation) in functional programming, where a code structure refers back to itself during computation. 'Taming' self-reference from potentially paradoxical concepts into well-behaved recursions has been one of the great successes of computer science, and is now used routinely in, for example, writing compilers using the 'meta-language' ML. Using a compiler to compile itself is known as bootstrapping. Self-modifying code is possible to write (programs which operate on themselves), both with assembler and with functional languages such as Lisp, but is generally discouraged in real-world programming. Computing hardware makes fundamental use of self-reference in flip-flops, the basic units of digital memory, which convert potentially paradoxical logical self-relations into memory by expanding their terms over time. Thinking in terms of self-reference is a pervasive part of programmer culture, with many programs and acronyms named self-referentially as a form of humor, such as GNU ('GNU's not Unix') and PINE ('Pine is not Elm'). The GNU Hurd is named for a pair of mutually self-referential acronyms. Tupper's self-referential formula is a mathematical curiosity which plots an image of its own formula.

In the arts Self-reference in art is closely related to the concepts of breaking the fourth wall and meta-reference, which often involve self-reference.

In literature and film

… excerpt ends here. Continue reading the full article.

Illustrations

Self-reference: The ancient symbol Ouroboros, a dragon that continually consumes itself, denotes self-reference.[1]
The ancient symbol Ouroboros, a dragon that continually consumes itself, denotes self-reference.[1]
Self-reference: Drawloom, with drawboy above to control the harnesses, woven as a repeating pattern in an early-1800s piece of Japanese silk. The silk illustrates the means by which it was produced.
Drawloom, with drawboy above to control the harnesses, woven as a repeating pattern in an early-1800s piece of Japanese silk. The silk illustrates the means by which it was produced.
Self-reference: A self-referencing work of graffiti apologizing for its own existence
A self-referencing work of graffiti apologizing for its own existence
Self-reference: Self-referential graffiti. The painter drawn on a wall erases his own graffiti, and may be erased himself by the next facade cleaner.
Self-referential graffiti. The painter drawn on a wall erases his own graffiti, and may be erased himself by the next facade cleaner.

Worked examples

Example 1 — a first encounter with Self-reference

Start with the simplest possible case. Write down what Self-reference claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Self-reference before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Self-reference ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Self-reference

In research
Self-reference appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Self-reference in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Self-reference is common in secondary-school and first-year university syllabi. It links to neighbouring topics Grammar, Logic, Philosophy of language, so understanding it makes those chapters shorter.
In everyday life
Look for Self-reference outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Self-reference” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Self-reference in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Self-reference means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Self-reference out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Self-reference in simple terms?

Self-reference is a concept that involves referring to oneself or one's own attributes, characteristics, or actions. It can occur in language, logic, mathematics, philosophy, and other fields.

Why does Self-reference matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Self-reference?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Self-reference.

Tags

  • Grammar
  • Logic
  • Philosophy of language
  • Self-reference
  • Theoretical computer science
  • Theory of computation

Keep exploring