Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1697

Re: Self compiling compiler

From Nils M Holm <nmh@t3x.org>
Newsgroups comp.compilers
Subject Re: Self compiling compiler
Date 2016-04-04 12:54 +0000
Organization TARFU
Message-ID <16-04-006@comp.compilers> (permalink)
References <16-03-013@comp.compilers> <16-03-016@comp.compilers> <16-04-001@comp.compilers>

Show all headers | View raw


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

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Self compiling compiler ERSHC <ershc123@nyc.rr.com> - 2016-03-31 03:54 +0000
  Re: Self compiling compiler Kaz Kylheku <545-066-4921@kylheku.com> - 2016-03-31 15:01 +0000
  Re: Self compiling compiler Thomas Goorden <thomas.goorden@gmail.com> - 2016-03-31 17:50 +0200
  Re: Self compiling compiler "Nils M Holm" <nmh@t3x.org> - 2016-03-31 19:41 +0200
    Re: Self compiling compiler Kaz Kylheku <545-066-4921@kylheku.com> - 2016-04-03 10:34 -0400
      Re: Self compiling compiler Nils M Holm <nmh@t3x.org> - 2016-04-04 12:54 +0000
  Re: Self compiling compiler Thomas David Rivers <rivers@dignus.com> - 2016-03-31 14:16 -0400
  Re: Self compiling compiler alexfrunews@gmail.com - 2016-03-31 12:27 -0700
  Re: Self compiling compiler Jens Kallup <jkallup@web.de> - 2016-03-31 21:29 +0200
  Re: Self compiling compiler ERSHC <ershc123@nyc.rr.com> - 2016-04-02 20:58 +0000
  Re: Self compiling compiler federation2005@netzero.com - 2016-05-25 16:41 -0700
    Re: Self compiling compiler federation2005@netzero.com - 2016-05-28 14:49 -0700
      Re: Self compiling compiler rockbrentwood@gmail.com - 2016-08-22 15:56 -0700

csiph-web