From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d495ab2e69ad1962 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!news.banetele.no!uio.no!fi.sn.net!newsfeed1.fi.sn.net!news.song.fi!not-for-mail Date: Sun, 09 Sep 2007 22:12:51 +0300 From: Niklas Holsti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ravenscar-compliant bounded buffer References: <1188914005.607732.277400@57g2000hsv.googlegroups.com> <1189194299.326741.151840@50g2000hsm.googlegroups.com> <46e28a6a$0$27847$39db0f71@news.song.fi> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <46e4454c$0$3198$39db0f71@news.song.fi> Organization: TDC Song Internet Services NNTP-Posting-Host: laku61.adsl.netsonic.fi X-Trace: 1189365068 news.song.fi 3198 81.17.205.61:33009 X-Complaints-To: abuse@song.fi Xref: g2news2.google.com comp.lang.ada:1847 Date: 2007-09-09T22:12:51+03:00 List-Id: anon wrote: > WHERE IS YOU PROOF!!! If your going to call a person a liar then you > should provide proof it. Your quoting style (top-posting) makes me unsure what you are shouting about, but I assume it is my reply to your claim that GNAT translates Ada to C. I see that others have already replied to your post, but as you call on me for proof I, too, answer. Firstly, according to Pascal Obry you did not make such a claim in the post to which I replied. If so, I withdraw my reply, apologise for my misunderstanding of what you wrote, and have nothing more to say on that point (because then I don't understand *what* you were saying). Secondly I did not call you a liar, I said your statement was nonsense. If you believe your own nonsense it does not make you a liar. > Read NYU GNAT (before Adacore) internal messages regarding > GNAT-RTS and GNU C compiling system. It is a direct internal C tree > structure of the C code. I gather from this that I did correctly understand that you claim that GNAT translates Ada to C. OK, I'll try to prove why that is not so. As the reference consider the paper "Integrating GNAT into GCC" by Richard Kenner, NYU, which was published in the Proceedings of Tri-Ada '94, Baltimore, Maryland, 1994 and is available in the ACM digital library (for subscribers). This paper very clearly describes the GNAT compilation process: from source to an Ada Abstract Syntax Tree (AST), then expansion of the AST to bring it closer to the GCC concepts (replacing some high-level Ada constructs with lower-level expansions), then Gigi that generates a GCC tree from the Ada AST, followed by the general GCC back-end. The main point to note is the term *GCC tree*, not *C tree*. Possibly the shorter term has been used elsewhere, but not in Kenner's paper. Since your posts describe the same compilation steps your claim reduces to the question: is the GCC tree a form of C? I'm sure that the concepts and structure of the GCC tree are closer to C than to Ada. That's natural because GCC originated as a C compiler. But Kenner describes important differences between the GCC tree and plain C. At the start of section 4 (page 86) Kenner says "The GCC tree is already more general than required for C, so relatively few additions to the type model had to be made to support Ada." Thus the GCC tree can express concepts that have no direct C equivalent. Two examples that Kenner brings up are integer types with dynamic ranges, and arrays with non-zero lower index bounds. In section 4.2 (page 86) Kenner explains that two new GCC node types were added to represent records with discriminants, and a new sort of GCC type was added to represent variant records. Moreover, some capabilities of the GCC tree that GNAT uses come from the GNU extensions to C, not from standard C (before C99, at least): nested procedures and dynamically sized arrays on the stack (automatic arrays). > That can be printed as a C program. I'm not surprised that the GCC tree can be printed out as something that looks like C -- most program representations can. If the tree is the result of compiling a C program it might even be real, standard C. But I doubt if this "C printout" is real C for a GCC tree that comes from an Ada program, because of the features in the GCC tree that go beyond standard C. > The XGC Ada which is based on GNAT and uses C for its Real Time > application and TLD contains C close sources files from DEC's Ada > libraries, which denote that both do not have an "Ada only > Run-Time System". Prove it, eh :-) >>Then there is the Open Ravenscar Kernel ORK for GNAT, > > The only problem with that one is that it is 4 years and gcc lib > are out dated. The two I gave are current. Good, the more the merrier. I believe the ORK work continues within or with the support of AdaCore, these days, but I may be mistaken on that. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .