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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: Colossus.Pike@worldnet.att.net (anon) Subject: Re: Ravenscar-compliant bounded buffer Reply-To: anon@anon.org (anon) References: <1188914005.607732.277400@57g2000hsv.googlegroups.com> <1189194299.326741.151840@50g2000hsm.googlegroups.com> <46e28a6a$0$27847$39db0f71@news.song.fi> <46e3d16e_5@news.bluewin.ch> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sun, 09 Sep 2007 14:49:09 GMT NNTP-Posting-Host: 12.64.102.231 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1189349349 12.64.102.231 (Sun, 09 Sep 2007 14:49:09 GMT) NNTP-Posting-Date: Sun, 09 Sep 2007 14:49:09 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:1835 Date: 2007-09-09T14:49:09+00:00 List-Id: TROLL! You can find this on the net. The second paragraph states that GNAT uses GIGI routine to transform the AST (Gnat internal trees) into an equivalent C tree. For figures do a search for the title and load the web page or pdf file. There are others papers but this is getting borring ! Extract Title page and first two paragraphs from Chapter 1.3: A Detailed Description of the GNU Ada Run Time (Version 1.0) Integrated with the GNAT 3.15p sources and the Annotated Ada Reference Manual (Technical Corrigendum 1) Copyright (c) Javier Miranda jmiranda@iuma.ulpgc.es Applied Microelectronics Reseach Institute University of Las Palmas de Gran Canaria Canary Islands Spain Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any latter published by the Free Software Foundation. 14th December 2002 1.3 The Compiler The compiler is composed of two main parts: the front-end and the back-end (cf. Figure 1.2). The front-end of the GNAT compiler is thus written in Ada95. The back-end of the compiler is the back-end of GCC proper, extended to meet the needs of Ada semantics [SGC94, Section 3.1]. The front-end comprises five phases (cf. Figure 1.3): lexical analysis, syntactic analysis (parsing), semantic analysis, AST expansion, and finally AST transformation into an equivalent C tree (this stage is labeled GiGi (GNAT to GNU transformation). These phases communicate by means of a rather compact Abstract Syntax Tree (AST). The implementation details of the AST are hidden by several procedural interfaces that provide access to syntactic and semantic attributes. The layering of the system, and the various levels of abstraction, are the obvious benefits of writing in Ada, in what one might call ``proper'' Ada style. It is worth mentioning that strictly speaking GNAT does not use a symbol table. Rather, all semantic information concerning program entities is stored in defining occurrences of these entities directly in the AST [SGC94, Section 3.1]. In <46e3d16e_5@news.bluewin.ch>, Gautier writes: >anon: > >> 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. That can be printed as a C program. Also there >> are a few web sites with doctoral thesis that states this as well as >> a few papers at ACM. And ACM group will verify the information before >> accepting thesis paper and this is where I learn of it. The paper include >> a program that will print internal C as a compilable C source code >> file. > >You could write a program that outputs the tree as a compilable Ada source code, >couldn't you ? > >> Now since, the mid 1980's most compiler are FRONT_END compilers aka >> a language translator that converts the source language to the system's >> main language, normal for today that's C with the exception of TI which >> used Pascal. Then the FRONT_END compiler calls a BACK_END compiler >> (for GNAT this is done by the compiler calling "gigi" (gnat-to-gcc)), >> which re-calls the gcc compiler for GNU system so that the internal C >> can be converted to a object module or assembly source file. >> {{ continue below }} > >Between the front-end and the back-end, a data tree is passed, not a C source >code. As discussed earlier, there is no intermediary C code - please re-read and >remember R. Dewar's explanation. As a mnemotechnic exercise, I cannot resist to >quote this from c.l.a. (~1998): > >"Repeat after me: GNAT does NOT produce C code. GNAT does NOT produce C code. > GNAT does NOT produce C code. GNAT does NOT produce C code. GNAT does NOT >produce C code. GNAT does NOT produce C code. GNAT does NOT produce C code. >GNAT does NOT produce C code. GNAT does NOT produce C code. GNAT does NOT >produce C code. GNAT does NOT produce C code. GNAT does NOT produce C code. >GNAT does NOT produce C code. >There. Feel better now? :-) >" >______________________________________________________________ >Gautier -- http://www.mysunrise.ch/users/gdm/index.htm >Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm > >NB: For a direct answer, e-mail address on the Web site!