Re: Self compiling compiler

Nils M Holm <nmh@t3x.org>
4 Apr 2016 12:54:15 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: Self compiling compiler nmh@t3x.org (Nils M Holm) (2016-03-31)
Re: Self compiling compiler rivers@dignus.com (Thomas David Rivers) (2016-03-31)
Re: Self compiling compiler alexfrunews@gmail.com (2016-03-31)
Re: Self compiling compiler jkallup@web.de (Jens Kallup) (2016-03-31)
Re: Self compiling compiler 545-066-4921@kylheku.com (Kaz Kylheku) (2016-04-03)
Re: Self compiling compiler ershc123@nyc.rr.com (ERSHC) (2016-04-02)
Re: Self compiling compiler nmh@t3x.org (Nils M Holm) (2016-04-04)
Re: Self compiling compiler federation2005@netzero.com (2016-05-25)
Re: Self compiling compiler federation2005@netzero.com (2016-05-28)
Re: Self compiling compiler rockbrentwood@gmail.com (2016-08-22)
| List of all articles for this month |

From: Nils M Holm <nmh@t3x.org>
Newsgroups: comp.compilers
Date: 4 Apr 2016 12:54:15 GMT
Organization: TARFU
References: 16-03-013 16-03-016 16-04-001
Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="70320"; mail-complaints-to="abuse@iecc.com"
Keywords: tools
Posted-Date: 04 Apr 2016 17:20:22 EDT

Kaz Kylheku <545-066-4921@kylheku.com> wrote:
> What matters here is not the compiler size but:
>
> - The compiler has to be self-bootstrapping.
> [...]
> - how easy is it, within the compiler's framework, to do this:
> - insert a piece of code which recognizes a static source
> code structure (perhaps as an abstract-syntax-tree-level pattern
> match) so that it can say "hey, I'm compiling myself: [...]
> - obtain the above AST-recognizing code not as C source, but as as a
> piece of AST material which the compiler itself can insert into a
> parse.
> - obtain, as an AST, some rogue code which the malicious compiler
> inserts into the parse of the target program such as login,
> as well as the rogue code which perpetuates all of this.


Right, I missed that point when suggesting Foogol! Most other compilers
on my page do fit that bill, and their design is quite clean and modular.
The T3X compiler even uses glue code to communicate between phases which,
I guess, would make it a good candidate for Thompson's stunt. SubC uses
an AST.


--
Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.