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!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Ravenscar-compliant bounded buffer Reply-To: anon@anon.org (anon) References: <1188914005.607732.277400@57g2000hsv.googlegroups.com> <1189113180.100290.51880@50g2000hsm.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <70bEi.74312$ax1.41120@bgtnsc05-news.ops.worldnet.att.net> Date: Fri, 07 Sep 2007 11:56:51 GMT NNTP-Posting-Host: 12.65.72.166 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1189166211 12.65.72.166 (Fri, 07 Sep 2007 11:56:51 GMT) NNTP-Posting-Date: Fri, 07 Sep 2007 11:56:51 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:1801 Date: 2007-09-07T11:56:51+00:00 List-Id: >Does GNAT provide somewhat simpler (smaller? faster?) runtime for >programs that declare compliance with the Ravenscar profile? The simple answer is No. Mostly it included in the GNAT PRO version only. The GPL/GNU GNAT Ada system has three main operating environments. 1) Normal "run-time system" (RTS) which handles most non-mission critical partitions. Just compile/bind/link and execute the programs. 2) Is defined in the GNAT manual as an obsolete feature, that is using the "pragma No_Run_Time ;", but still works. In this version, the user must supply the RTS subsystem that the program requires. This does decrease the file size to about 25 % of the normal compile version and in some cases will increase the performance with other pragma used. But the programmer must write all procedures and functions for each RTS package that the program uses. A very simple example of this type of RTS version: --------------- -- Hello.adb -- --------------- -- File size: using Ada.Text_IO => 251 KB -- File size: using GNAT.IO => 192 KB -- File size: using "pragma No_Run_Time" -- with user create RTS package => 58 KB -- -- Note: size may differ between operating systems and -- GNAT versions but the concept is the same. -- -- And due to decrease packages requirements and code -- generated the performance will increase from using -- Ada.Text_IO to GNAT.IO to the user define RTS subsystem. -- -- compile => gcc -c put_line.c -- gnat compile hello.adb -- gnat bind hello.ali -- gnat link hello.ali put_line.o -- -- run => ./hello -- --------------- -- Hello.adb -- --------------- pragma No_Run_Time ; -- -- Ada.Text_IO aka Text_IO and GNAT.IO packages -- are illegal with the usage of "No_Run_Time" -- -- with Ada.Text_IO; use Ada.Text_IO; -- with GNAT.IO ; use GNAT.IO ; -- procedure Hello is -- -- External link for put_line RTS subsystem package -- Note: String needs to terminate with ascii.nul -- -- comment out to use GNAT packages -- procedure Put_Line ( Value : String ) ; pragma Import ( C, Put_Line, "put_line" ) ; begin Put_Line ( "Hello World. Welcome to GNAT" & ASCII.NUL ) ; end ; /* ----------- */ /* put_line.c */ /* ----------- */ #include /* put_line -- run-time subsystem procedure */ void put_line ( value ) char * value ; { printf ( "%s\n", value ) ; } /* --eof-- */ 3) Is the Ravenscar RTS. It can contains multiple packages each fine tuned for Real-Time operating environment (RTOE) and the full criteria of the DO-178B. The academic and GPL/GNU versions do not meet the DO-178B criteria or have RTOE packages for the Ravenscar profile. The compiler does set the correct restrictions when using the Ravenscar profile. And some of these restrictions will increase the performance in some case. But linking is still done with the Normal or "No Run Time" RTS, so the performance will be limited. Now, there are a few other pragmas that can decrease the program's file size or the amount its allocated during execution. Some of these might increase the programs performance but it is normally not enough to spend a great deal of time on. That is, unless your allocating large block of memory for vector or matrix project and need to speed up the allocation schemes. But you may have to write the allocation routines. Something you could try. The next time you write a program that you thinks meet the Ravenscar profile designed add either the "pragma Ravenscar ;" or some of the main Ravenscar profile restrictions to your code. If your in class this might turn into an extra assignment or it could be used in a later course. n <1189113180.100290.51880@50g2000hsm.googlegroups.com>, Maciej Sobczak writes: >On 6 Wrz, 16:06, Robert A Duff wrote: > >> the whole >> point is to be restrictive, so the run-time system can be simplified (as >> compared to a run-time system that supports full Ada). > >Does GNAT provide somewhat simpler (smaller? faster?) runtime for >programs that declare compliance with the Ravenscar profile? >I'm not asking about the high-integrity edition of GNAT, but the >"normal" one. > >-- >Maciej Sobczak >http://www.msobczak.com/ >