Jump to content

Talk:Self-interpreter

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Untitled, 2004-05

[edit]

Few details fixed.

A self-interpreter doesn't indicate a rich and powerful language; the definition below, by Oleg Mazonka and myself, is from a paper relating to a self-interpreter I wrote in the brainfuck programming language, a very poor and weak (though interesting and amusing) language. Incidentally, point three of that definition, though it makes sense in the context of that paper, would be hard to defend in general use against an outraged LISP partisan, and I wouldn't try; in fact I was a little surprised to find our definition here at all. Not that I object.

Two, a program that reads source code and builds a running program is a compiler, not an interpreter; and a self-compiler and a self-interpreter aren't the same thing at all (which is why I removed the parentheses around "or self-compiler"). In fact, though I know self-compilers have been "important steps", I don't know whether self-interpreters have been; if someone reading this knows they haven't, then that whole sentence should be cleared out (or moved to a new "self-compiler" article).

Three, I had to put "possible" into the bit about Turing-completeness; "any program" would include ones that could solve the halting problem etc.

-D. Cristofani.

Untitled, 2005-03

[edit]

The article contains several errors.

For example, Backus-Naur Form is used in grammars to specify the syntax but not the semantics of a language. Usual forms of (formal) language definitions include translations to abstract machines, structural operational semantics (big-step and small-step) and denotational semantics.

Also, the three points (1.,2.,3.) do not make much sense. It makes perfect sense to define a self-interpreter for a non-Turing complete language (1.). For observing the behavior of the interpreter, it is important to talk about the encoding of input and output. Given a proper encoding, any Turing-complete language has a self-interpreter (in contrast to what the article says). Third, it does not make sense to restrict the language features used to build an interpreter. Some language features can be implemented in terms of lower-level features, but sometimes a feature can only be implemented by using the same feature in the self-interpreter (e.g., function application in LISP).

The article should also talk about the notion of a meta-circular interpreter. The well-known book by Abelson and Sussman and also the new book by S. Krishnamurthi have good discussions about them.

- Klaus Ostermann

I rewrote large parts of the article because the old version was wrong or inaccurate in many respects.

- Klaus Ostermann

Page Title

[edit]

As far as I know, "Self-interpreter" is not in any way academic lingo, and it is very confusing as it is ambiguous with an "interpreter for the Self programming language". I suggest renaming to Meta-circular interpreter. Wouter Lievens 09:12, 24 Apr 2005 (UTC)

Anyone should feel free to add a #REDIRECT from Metacompiler to the article. 71.246.25.169 05:44, 17 January 2006 (UTC)[reply]

I agree, meta-circular interpreter or just meta-interpreter is much more common. - Klaus Ostermann

This is all old news to FORTH programmers, which has long since (1970s) termed this as a metacompiler.[1][2] 71.246.25.169 05:44, 17 January 2006 (UTC)[reply]

Untitled, 2006-02

[edit]

Somebody re-inserts quotes from a short, non-refereed article by Mazonka et al again and again where the author itself has stated below that the definition is not accurate. If you are this guy: Please refrain from inserting it again! I have written below why the quote is not quite right. In general, in such a scientific context I would strongly suggest to quote only sources from peer-reviewed papers. —Preceding unsigned comment added by 80.184.201.98 (talkcontribs)

I am the guy who reinserted 3-point definition from the non-refereed article. First, I believe that there is more harm to hide something relevant than presenting it even saying it is arguable and maybe incorrect. Second, I disagree with statements of Klaus Ostermann below.

It makes perfect sense to define a self-interpreter for a non-Turing complete language It does not make perfect sense to me. Can you give an example of such self-interpreter?

Given a proper encoding, any Turing-complete language has a self-interpreter (in contrast to what the article says) This is untrue. The article says that the language had to be slightly modified to allow self-interpreter. Try to write a self-interpreter in original Brainfuck! Although it is Turing-complete. If under ‘proper encoding’ you imply arbitrary modification to the abstract machine realizing the language, then everything has a self-interpreter ‘given a proper encoding’.

Third, it does not make sense to restrict the language features used to build an interpreter. Some language features can be implemented in terms of lower-level features, but sometimes a feature can only be implemented by using the same feature in the self-interpreter (e.g., function application in LISP) There are atomic language constructions which are not translatable inside the language itself. However, the process of interpretation implies conversion data into behavior, which is recognition. And LISP’s eval, for example, does not do recognition within the program (it is done by underlying interpreter or compiler), so it cannot be qualified as interpretation.

It is strange to say this is not how you define and this is not what you define.

- Oleg Mazonka 20.03.06

Self-interpreters versus meta-circular interpreters

[edit]

The article switches haphazardly between talking about meta-circular interpreters, and self-interpreters in general. The content related to the former should probably be reworked into the meta-circular evaluator article. --Piet Delport 07:46, 23 November 2006 (UTC)[reply]

There needs to be a list

[edit]

The article doesn't explain any particular example of a meta-interpreter in detail. It explains the basic overall concept, but it fails to mention any specific examples. I think a good place to start would be a list of existing meta-interpreters. 71.34.241.23 (talk) 04:34, 28 January 2013 (UTC)[reply]

Edit 2013-09

[edit]

Here is a brief justification of the changes I made this month.

  • found the first sentence not clear, reworded.
  • found the bootstrapping process not clearly described, reworded.
  • some minor editorial changes
  • added a table of languages known to have at least one self-interpreter
  • added Forth and Pascal to this table

Considered, but not changed:

  • Self-interpreter as interpreter for the [[Self_programming_language]Self programming language]: the article does not mention any interpreter, and stresses that [[Self_programming_language]Self] was used to pioneer compilation techniques. I decided there is no ambiquity in 'Self-interpreter'.
  • locating a reference to 'reflective interpreters' (perhaps later). — Preceding unsigned comment added by Rommelebom (talkcontribs) 06:55, 14 September 2013 (UTC)[reply]

Proposed deletion

[edit]

Regarding the proposed deletion of this article, I suggest that it be merged as a new section into the Interpreter (computing) article. — Loadmaster (talk) 18:17, 24 February 2014 (UTC)[reply]

Yes, that's a better alternative than deletion (although I'm still concerned about the OR). I'll remove the prod tag, start a discussion on Talk:Interpreter (computing) and tag both articles. All the best, Miniapolis 00:20, 25 February 2014 (UTC)[reply]