Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Delta: We're Amtrak with wings. -- David Letterman


devel / comp.compilers / Re: Are there "compiler generators"?

SubjectAuthor
* Re: Are there "compiler generators"?Roger L Costello
+- Re: Are there "compiler generators"?Anton Ertl
+- Re: Are there "compiler generators"?gah4
`* Re: Are there "compiler generators"?minf...@arcor.de
 `- Re: Are there "compiler generators"?Thomas Koenig

1
Re: Are there "compiler generators"?

<22-06-003@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=424&group=comp.compilers#424

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: coste...@mitre.org (Roger L Costello)
Newsgroups: comp.compilers
Subject: Re: Are there "compiler generators"?
Date: Wed, 1 Jun 2022 11:23:43 +0000
Organization: Compilers Central
Lines: 40
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-003@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="19522"; mail-complaints-to="abuse@iecc.com"
Keywords: design, comment
Posted-Date: 01 Jun 2022 13:24:47 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
Thread-Topic: Are there "compiler generators"?
Thread-Index: Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==
 by: Roger L Costello - Wed, 1 Jun 2022 11:23 UTC

Page 161 of the book "Introducing Compiling Techniques" by J.P. Bennett says:
---------------------
Code generator generators

Just as there are parser generators, so there are code generator
generators. In general they all use the same idea, to match patterns
of instructions generated by the front end to patterns of instructions
available to the target machine.

IBURG

Iburg generates a fast tree parser. It takes a grammar describing the
patterns to be matched, with actions that generate the target code.
The grammar is augmented by the 'cost' of the code generated, and is
in general ambiguous. The Iburg generated parser finds the lowest cost
parse of a given sentence. Typically the cost will be the execution
time of the code, but for a compiler concerned with compact code
generation, it could be code size.

The idea of using a grammar to describe target code, and finding the
lowest cost parse, in order to generate the best code predates Iburg.
An early system due to Susan Graham used YACC productions to achieve
the same end.

---------------------

Wow!

So a compiler can be generated declaratively by using a set of
declarative generator tools, e.g., Flex for lexical analysis, Bison
for syntax/semantic analysis, and Iburg for code generation.

Has anyone used this combination of tools to create a whole compiler?

/Roger
[I expect that someone has used lex, yacc, and iburg in the same
compiler sometime in the past 30 years. But that doesn't mean that
they combine into a compiler generator any more than a saw, a hammer,
and a paintbrush combine into a house generator. They're tools, each
does what it does. -John]

Re: Are there "compiler generators"?

<22-06-004@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=425&group=comp.compilers#425

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Subject: Re: Are there "compiler generators"?
Date: Wed, 01 Jun 2022 18:05:13 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 20
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-004@comp.compilers>
References: <22-06-003@comp.compilers>
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="96388"; mail-complaints-to="abuse@iecc.com"
Keywords: design
Posted-Date: 02 Jun 2022 18:01:58 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Anton Ertl - Wed, 1 Jun 2022 18:05 UTC

Roger L Costello <costello@mitre.org> writes:
>So a compiler can be generated declaratively by using a set of
>declarative generator tools, e.g., Flex for lexical analysis, Bison
>for syntax/semantic analysis, and Iburg for code generation.
>
>Has anyone used this combination of tools to create a whole compiler?

The students taking my compiler course build such compilers: one
compiler per student, implementing a different small programming
language every year. They also use Ox (an attribute grammar evaluator
generator) for getting more structure into the in-between part.
Instead of iburg, they can also use burg, which has the same
interface.

- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/

Re: Are there "compiler generators"?

<22-06-005@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=426&group=comp.compilers#426

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah...@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: Are there "compiler generators"?
Date: Wed, 1 Jun 2022 14:02:02 -0700 (PDT)
Organization: Compilers Central
Lines: 41
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-005@comp.compilers>
References: <Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==> <22-06-003@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="96736"; mail-complaints-to="abuse@iecc.com"
Keywords: tools
Posted-Date: 02 Jun 2022 18:02:42 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-06-003@comp.compilers>
 by: gah4 - Wed, 1 Jun 2022 21:02 UTC

On Wednesday, June 1, 2022 at 10:24:49 AM UTC-7, Roger L Costello wrote:

(snip)

> So a compiler can be generated declaratively by using a set of
> declarative generator tools, e.g., Flex for lexical analysis, Bison
> for syntax/semantic analysis, and Iburg for code generation.

(snip, our moderator mentioned)
> [I expect that someone has used lex, yacc, and iburg in the same
> compiler sometime in the past 30 years. But that doesn't mean that
> they combine into a compiler generator any more than a saw, a hammer,
> and a paintbrush combine into a house generator. They're tools, each
> does what it does. -John]

There are now 3D printed houses, such as using computer controlled
concrete pouring devices. One could accept a computerized design
for a house, and then generate it in concrete. (I think you still need
to do the interior finishing the old way.)

One could write a system around flex, bison, and iburg, that would
accept as input a description of the language, and the output
machine instructions, that would call flex, bison, and iburg as
needed. The description could be a slightly higher level,
or as flex/bison input with minimal wrapper.
(Maybe not so much optimization, as that tends to be more
specialized. It could be useful as a first compiler for
a new machine.)

Many imperative languages are similar enough in structure
that it might almost work. It might be especially interesting
for those wanting to make small changes to existing
languages.

Well, I would choose a higher level language than the usual C
for output of lexer and parser. A language with just the operations
needed for a target compiler.

One could, then, use the code generator not only for the output
from the generated compiler, but for the compiler itself.
(Assume it is for a new machine, with no compilers yet.)

Re: Are there "compiler generators"?

<22-06-017@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=438&group=comp.compilers#438

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!nntp.TheWorld.com!usenet.csail.mit.edu!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: minfo...@arcor.de (minf...@arcor.de)
Newsgroups: comp.compilers
Subject: Re: Are there "compiler generators"?
Date: Tue, 7 Jun 2022 07:22:53 -0700 (PDT)
Organization: Compilers Central
Lines: 17
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-017@comp.compilers>
References: <Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==> <22-06-003@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="28897"; mail-complaints-to="abuse@iecc.com"
Keywords: design
Posted-Date: 07 Jun 2022 10:53:37 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: minf...@arcor.de - Tue, 7 Jun 2022 14:22 UTC

Roger L Costello schrieb am Mittwoch, 1. Juni 2022 um 19:24:49 UTC+2:
> So a compiler can be generated declaratively by using a set of
> declarative generator tools, e.g., Flex for lexical analysis, Bison
> for syntax/semantic analysis, and Iburg for code generation.
>
> Has anyone used this combination of tools to create a whole compiler?

This is a hot AI research field. 'Deep compilers' touch topics like
least cost parsing and optimization of other compilation steps.
But AFAIU there is no such holistic thing like automatic complete
compiler construction a la
Compiler = f (grammar, software-infrastructure, target-hardware)

Some state of the art overview:
https://github.com/zwang4/awesome-machine-learning-in-compilers

OTOH code generators based on graphical input are already "old hats".

Re: Are there "compiler generators"?

<22-06-020@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=440&group=comp.compilers#440

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.compilers
Subject: Re: Are there "compiler generators"?
Date: Tue, 7 Jun 2022 18:34:12 -0000 (UTC)
Organization: news.netcologne.de
Lines: 8
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-06-020@comp.compilers>
References: <Adh1qBBaedSlU0KnQV6Jqmq0ocPhiA==> <22-06-003@comp.compilers> <22-06-017@comp.compilers>
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="65537"; mail-complaints-to="abuse@iecc.com"
Keywords: design
Posted-Date: 07 Jun 2022 14:41:53 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Thomas Koenig - Tue, 7 Jun 2022 18:34 UTC

minf...@arcor.de <minforth@arcor.de> schrieb:

> But AFAIU there is no such holistic thing like automatic complete
> compiler construction a la
> Compiler = f (grammar, software-infrastructure, target-hardware)

This function misses "semantics" as an argument, probably the
biggest hurdle.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor