Quine (computer program): Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Todd Coles
No edit summary
imported>Bruce M. Tindall
m (Use/reference quibble: The word "quine" is a term for a program, but a quine is not a term but a program)
Line 1: Line 1:
{{subpages}}
{{subpages}}
A '''quine''' is a term used in computer science to describe a program which produces its own source code.    Writing a Quine in various computer languages has been a popular challenge to computer programs; this problem has been posed to readers in various magazines such as Creative Computing and Byte.
A '''quine''' is a computer program which produces its own source code.    Writing a Quine in various computer languages has been a popular challenge to computer programmers; this problem has been posed to readers in various magazines such as Creative Computing and Byte.


The challenge is to write a program which prints out exactly its own source code, without 'cheating', that is, without accessing any memory location which was not populated by the program's execution (so this rules out printing the file from disk, or scanning RAM for a copy of the code in an editor.)
The challenge is to write a program which prints out exactly its own source code, without 'cheating', that is, without accessing any memory location which was not populated by the program's execution (so this rules out printing the file from disk, or scanning RAM for a copy of the code in an editor).


A Quine is no mere puzzle; using a Quine it is possible to produce rather direct and simple proofs of both the Church-Turing Thesis and Godel's Incompleteness Theorem, both of which are among the highest achievements of human thought in the twentieth century.
A Quine is no mere puzzle; using a Quine it is possible to produce rather direct and simple proofs of both the Church-Turing Thesis and Godel's Incompleteness Theorem, both of which are among the highest achievements of human thought in the twentieth century.

Revision as of 15:09, 12 May 2008

This article is a stub and thus not approved.
Main Article
Discussion
Definition [?]
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

A quine is a computer program which produces its own source code. Writing a Quine in various computer languages has been a popular challenge to computer programmers; this problem has been posed to readers in various magazines such as Creative Computing and Byte.

The challenge is to write a program which prints out exactly its own source code, without 'cheating', that is, without accessing any memory location which was not populated by the program's execution (so this rules out printing the file from disk, or scanning RAM for a copy of the code in an editor).

A Quine is no mere puzzle; using a Quine it is possible to produce rather direct and simple proofs of both the Church-Turing Thesis and Godel's Incompleteness Theorem, both of which are among the highest achievements of human thought in the twentieth century.