Re: Intermediate compiler output format

"Nick Roberts" <nick.roberts@acm.org>
23 Aug 2004 12:09:56 -0400

          From comp.compilers

Related articles
Intermediate compiler output format cdiggins@videotron.ca (christopher diggins) (2004-08-15)
Re: Intermediate compiler output format cdc@maxnet.co.nz (Carl Cerecke) (2004-08-23)
Re: Intermediate compiler output format kamalp@acm.org (2004-08-23)
Re: Intermediate compiler output format nick.roberts@acm.org (Nick Roberts) (2004-08-23)
Re: Intermediate compiler output format csy1032@nitc.ac.in (2004-08-23)
Re: Intermediate compiler output format cdiggins@videotron.ca (christopher diggins) (2004-08-25)
Re: Intermediate compiler output format cdiggins@videotron.ca (christopher diggins) (2004-08-25)
| List of all articles for this month |

From: "Nick Roberts" <nick.roberts@acm.org>
Newsgroups: comp.compilers
Date: 23 Aug 2004 12:09:56 -0400
Organization: Compilers Central
References: 04-08-100
Keywords: code
Posted-Date: 23 Aug 2004 12:09:56 EDT

On 15 Aug 2004 22:19:24 -0400, christopher diggins <cdiggins@videotron.ca>
wrote:


> I was wondering if there are any particularly well-known or
> standardized formats for compilers that anyone could point me to.


There are several de facto standards (none that are de jure, that I
know of). I could point you to SUIF:


        http://suif.stanford.edu/


but this is really only one of many.


I suggest that the higher-level intermediate codes tend to be specific
to a particular programming language (or group of similar languages),
and that lower-level intermendiate codes tend to be specific to a
particular target architecture (group).


> I am currently designing an XML DTD for my Heron compiler output
> and I want to make sure I am not reinventing the wheel.


I've never heard of an intermediate code being output (or input) in
XML format, but to me there seems to be some sense in this idea.


> Ideally the output format should be type checked,


Well, it depends on the level of the code, but it might not be
possible to do complete prior type checking for modular languages.
But, if so, this checking can be readily done by the compiler phase
reading the XML, so I don't see a problem.


> platform independant


Do mean independent of the target architecture?


> and relatively easily translated to languages like C or assembly.


Well, yes, that being the purpose of any compiler :-)


> I am planning on performing optimizations on this output.


May I ask, please, which is/are the source language or languages of
your Heron compiler? Is there a web site with any further
information? I might be interested in collaborating. Please see:


        http://sourceforge.net/projects/eclat


--
Good luck,
Nick Roberts
[Before anyone tries to invent a universal intermediate format, be
sure to learn about the unhappy history of UNCOLs. Formats for a
particular input language or set of similar ones (C, C++, Pascal,
say), or for a specific target or similar ones (32 bit byte addressed
machines, say) work, but when you try to generalize too far, it just
doesn't work. -John]



Post a followup to this message

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