ADA Volume 27 USER Number 4 December 2006

JOURNAL Contents Page Editorial Policy for Ada User Journal 194 Editorial 195 News 197 Conference Calendar 232 Forthcoming Events 239 Articles J- Mahieux, B Maudry, A Foster “Using CORBA to Bring New Life to Legacy Ada : an Experience Report” 244 J Klein, D Sotirovski “The Publisher Framework” 248 Ada-Europe 2006 Sponsors 256 Ada-Europe Associate Members (National Ada Organizations) Inside Back Cover

Ada User Journal Volume 27, Number 4, December 2006 194 Editorial Policy for Ada User Journal

Publication Original Papers Commentaries Ada User Journal – The Journal for the Manuscripts should be submitted in We publish commentaries on Ada and international Ada Community – is accordance with the submission software engineering topics. These published by Ada-Europe. It appears guidelines (below). may represent the views either of four times a year, on the last days of individuals or of organisations. Such March, June, September and All original technical contributions are articles can be of any length – December. Copy date is the first of the submitted to refereeing by at least two inclusion is at the discretion of the month of publication. people. Names of referees will be kept Editor. confidential, but their comments will Opinions expressed within the Ada Aims be relayed to the authors at the discretion of the Editor. User Journal do not necessarily Ada User Journal aims to inform represent the views of the Editor, Ada- readers of developments in the Ada The first named author will receive a Europe or its directors. and its use, complimentary copy of the issue of the general Ada-related software Journal in which their paper appears. Announcements and Reports engineering issues and Ada-related We are happy to publicise and report activities in Europe and other parts of By submitting a manuscript, authors grant Ada-Europe an unlimited license on events that may be of interest to our the world. The language of the journal readers. is English. to publish (and, if appropriate, republish) it, if and when the article is Although the title of the Journal refers accepted for publication. We do not Reviews to the Ada language, any related topics require that authors assign copyright to Inclusion of any review in the Journal are welcome. In particular papers in the Journal. is at the discretion of the Editor. any of the areas related to reliable Unless the authors state explicitly A reviewer will be selected by the software technologies. otherwise, submission of an article is Editor to review any book or other taken to imply that it represents publication sent to us. We are also The Journal publishes the following prepared to print reviews submitted types of material: original, unpublished work, not under consideration for publication else- from elsewhere at the discretion of the • Refereed original articles on where. Editor. technical matters concerning Ada and related topics. News and Product Announcements Submission Guidelines Ada User Journal is one of the ways in All material for publication should be • News and miscellany of interest to which people find out what is going on sent to the Editor, preferably in the Ada community. in the Ada community. Since not all of electronic format. The Editor will only accept typed manuscripts by prior • Reprints of articles published our readers have access to resources arrangement. elsewhere that deserve a wider such as the World Wide Web and Prospective authors are encouraged to audience. Usenet, or have enough time to search through the information that can be contact the Editor by email to • Commentaries on matters relating found in those resources, we reprint or determine the best format for to Ada and software engineering. report on items that may be of interest submission. Contact details can be to them. found near the front of each edition. • Announcements and reports of Example papers conforming to conferences and workshops. Reprinted Articles formatting requirements as well as some word processor templates are • Reviews of publications in the While original material is our first available from the editor. There is no field of software engineering. priority, we are willing to reprint (with limitation on the length of papers, the permission of the copyright holder) though a paper longer than 10,000

• Announcements regarding material previously submitted words would be regarded as standards concerning Ada. elsewhere if it is appropriate to give it exceptional. a wider audience. This includes papers Further details on our approach to published in North America that are these are given below. not easily available in Europe. We have a reciprocal approach in granting permission for other publications to reprint papers originally published in Ada User Journal.

Volume 27, Number 4, December 2006 Ada User Journal 195 Editorial While this issue completes volume 27 of the Journal (gosh, what a long history the AUJ begins to have!) and the year 2006 comes to an end, I come to think that we have plentiful reasons to look forward to a new year 2007 reach with important achievements for the Ada community at large. Let me mention just a few, even before talking about the contents of this issue. To begin with, early in January 2007 we should be hearing the very final word from the ISO top-level governing bodies that the the Amendment to ISO/IEC 8652 (a.k.a. the Ada 2005 standard) has been definitely approved: that will be a great achievement, really, which lots of valuable people have contributed to, most of all the ARG team and editor. We have all reasons to expect very good news from that front. Secondly, in deftly planned sync with the progress of the ISO-related events, the “book” (a.k.a. the Springer LNCS edition of the Ada 2005 Reference Manual), generously produced by Ada- Europe, should be starting to arrive at your doorstep. That also is a jolly good news, and a nice gift too. Thirdly, the coming Spring will see a new edition of the IRTAW series, this time focused on drawing the early lessons learned from the use of the very rich set of novel real-time programming features that have come along in the Ada 2005 standard. Even those who are not too attracted to or familiar with real-time systems issues may look forward to the proceedings of IRTAW-13, which will expectedly position on solid ground, Ada 2005 as a leading language for that domain. It is a few years now that the Ada-Europe annual Conference has introduced the notion of “industrial track”. I am very happy that the proceedings of that session of the conference are published, in a staggered fashion, in successive issues of the Ada User Journal. In keeping with this plan, this issue includes two articles that draw from industrial-track presentations made at the 2006 Conference in Porto. One article, by J-C Mahieux, B Maudry, A Foster, all of PrismTech (a French company specializing in middleware products and solutions) report on a successful use of CORBA technology to migrate a sizeable Ada application to a new target platform. The other article, by J. Klein of Lockheed Martin, and D. Sotirovski of Raytheon Canada, presents the foundation of a distributed object-oriented framework used as the basis of the design of a critical Air Traffic Control application. Both presentations attracted consolidarable interest at the conference. The rest of the issue contains the usual wealth of news and events of relevance and interest to the Ada community. I am not quite sure the readers appreciate the level of effort that goes in the selection, weaving and editing of that information so that you can have on the journal. You would be surprised should you know the truth! For this reason I am (and you should too, trust me) truly grateful to Santiago Urueña and Dirk Craynest, our News and Calendar editors for their efforts and wish them both (and to all readers too, of course) the best for the new year 2007.

Tullio Vardanega Padova December 2006 Email: [email protected]

Ada User Journal Volume 27, Number 4, December 2006 197 News Santiago Urueña Technical University of Madrid (UPM). Email: [email protected] as you think worthy. One or more awards 2006 Conference in Albuquerque, New will be made in both categories. Mexico (US), on 15 November. This Please visit annual award is bestowed on individuals Contents “for broad, lasting contributions to Ada http://www.acm.org/sigada/exec/awards/a wards.html#Recipients and peruse the technology and usage”, and past Ada-related Events 197 names of past winners. This may help recipients from AdaCore are Robert Ada-related Resources 199 you think about the measure of Dewar (1995), Ed Schonberg (1997), Bob Ada-related Tools 199 accomplishment that is appropriate. You Duff (2002), and Matthew Heaney Ada-related Products 204 may be aware of people who have made (2005). Ada and GNU/ 208 substantial contributions that have not yet In honoring Ben, SIGAda noted his References to Publications 212 been acknowledged. Nominate them. numerous and significant contributions to Ada Inside 212 Consider what you believe to be the best the Ada effort, starting from the earliest Ada in Context 214 developments in the Ada community or days and continuing to the present. He

SIGAda in the last year; the last 5 years; worked on the “Red” language (the since Ada's inception. Who was runner-up in the original Ada language Ada-related Events responsible? Nominate them. design competition) and served as a Please note that anyone who has received Distinguished Reviewer for Ada 83 and as [To give an idea about the many Ada- a member of the language revision team related events organized by local groups, either of the two awards remains eligible for the other. Perhaps there is an for Ada 95. He has been conducting Ada some information is included here. If you courses for over 20 years, has presented are organizing such an event feel free to outstanding SIGAda volunteer who has won our Distinguished Service Award papers and tutorials at many Ada-Europe inform us as soon as possible. If you and SIGAda conferences, and is currently attended one please consider writing a and who has also made important contributions to the advance of Ada the President of the Ada Resource small report for the Ada User Journal. -- Association. su] technology, or visa versa. Nominate him or her! In 1998 Ben received SIGAda’s other 15 November — SIGAda The nomination form is available on the annual award, for distinguished service to Awards SIGAda website at SIGAda itself; he is one of only three http://www.acm.org/sigada/exec/awards/a individuals to have received both awards. From: John McCormick wards.html. (You need to visit this website to see past award winners' names, 12-16 November— SIGAda Subject: Call for SIGAda Award and also a picture of the statuette which is 2006 Conference Nominations the award among other things, so you Date: 11 Sep 2006 10:57:53 -0700 don't nominate someone who has already From: Ricky E. Sward Newsgroups: comp.lang.ada won an award in a category.) Submit Subject: Call for Participation SIGAda 2006 Dear Members of the Ada Community: your nomination as an e-mail or e-mail attachment to [email protected]. Date: 18 Sep 2006 12:39:07 -0700 On Wednesday, 15 November 2006, the Newsgroups: comp.lang.ada The ACM SIGAda Awards Committee, 2006 SIGAda Awards will be presented in Call for Participation a special morning plenary session at the comprised of volunteers who have SIGAda 2006 conference in Albuquerque, previously won an award, will determine ACM SIGAda's Annual International New Mexico. (See this year's recipients from your Conference nominations. http://www.acm.org/sigada/conf/sigada20 November 12–16, 2006 06/ if you have somehow missed Call our attention to the people who are announcements of this year's annual most deserving, by nominating them. Albuquerque, New Mexico, USA SIGAda international conference.) And please nominate by OCTOBER 15! Join us this year in Albuquerque, New We welcome your nominations of Your participation in the nominations Mexico from November 12th through the deserving recipients. process will help maintain the prestige 16th for the annual SIGAda Conference. and honor of these awards. This year's program includes two and a The ACM SIGAda Awards recognize half days of technical presentations from individuals and organizations who have Thank you, researchers, academia and industry. made outstanding contributions to the John McCormick, Chair ACM SIGAda Topics include the integration of Ada Ada community and to SIGAda. The two 2005 into Visual Studios 2005, issues for categories of awards are: [See also “Nov 12–16 — SIGAda 2006 safety critical and high-integrity systems, Conference” in this issue. —su] (1) Outstanding Ada Community using Ada in introductory Computer Contribution Award — For broad, lasting AdaCore’s Ben Brosgol receives Science courses, etc. Our conference also contributions to Ada technology & usage. SIGAda’s Outstanding Ada Community includes two days of outstanding tutorials Contribution Award led by some of the most respected (2) ACM SIGAda Distinguished Service Wednesday November 22, 2006 technical leaders in the industry. These Award — For exceptional contributions tutorials range from introductory topics in to SIGAda activities & products. Ben Brosgol, a senior member of Ada programming to advanced topics in Please consider who should be nominated AdaCore’s technical staff, received an the new Ada 2005 standard and .NET this year. You may nominate a person for Outstanding Ada Community programming. either or both awards, and as many people Contribution Award at the ACM SIGAda

Ada User Journal Volume 27, Number 4, December 2006 198 Ada-related Events

We have three outstanding keynote Besides speeches, we could also have: 80's. This is the 12th event in the speakers this year. - programming tutorials (e.g. have fun Reliable Software Technologies series, Judith Klein, Lockheed Martin with distributed systems) previous ones being held at Montreux, - Use of Ada in Lockheed Martin for Air - a programming contest ("obfuscated Switzerland ('96), London, UK ('97), Traffic Management and Beyond. Ada", perhaps? :) ) Uppsala, Sweden ('98), Santander, Spain ('99), Potsdam, Germany ('00), Leuven, Robert Dewar, AdaCore - hands-on demonstrations - unconstrained questions and answers Belgium ('01), Vienna, Austria ('02), - Ada 2005 & High Integrity Systems. Toulouse, France ('03), Palma de Tucker Taft, SofCheck At this point, I would like to have a "gut Mallorca, Spain ('04), York, UK ('05), - Why You Should be Using Ada 2005 feeling" on whether or not an "Ada day at Porto, Portugal ('06). now! FOSDEM" is feasible or desirable. This "gut feeling" should be sufficient for me General Information You can find more detailed information in to ask for a developer's room for 1/2 day, The 12th International Conference on the Advance Program on the conference 1 day, 3/2 days, or 2 days. It would be Reliable Software Technologies (Ada- web site: nice to have that by the end of October. Europe 2007) will take place in Geneva, http://www.acm.org/sigada/conf/ Later on we can agree on a precise Switzerland. Following the usual style, sigada2006/ schedule, which must be finalised by mid- the conference will span a full week, November. including a three-day technical program Greg Gicca and Ricky E. Sward, SIGAda and vendor exhibitions from Tuesday to Conference Co-Chairs If you would like to speak at FOSDEM, attend, or if you simply would like to Thursday, along with parallel workshops [See also “15 Nov — SIGAda Award know what's in the works, please and tutorials on Monday and Friday. Nominations” in AUJ 27-3 (Sep 2006), subscribe to the AdaFOSDEM mailing Topics p.134. —su] list. This list is not moderated, but only In the last decade the conference has Feb 24–25 — FOSDEM 2007 subscribers can post and browse the established itself as an international forum archives. for providers and practitioners of, and From: Ludovic Brenta brenta.org> technologies. The conference Subject: Ada at FOSDEM 2007 - call for Subject: Re: Ada at FOSDEM 2007 - call presentations will illustrate current work participants for participants in the theory and practice of the design, Date: 6 Oct 2006 03:45:42 -0700 Date: 24 Oct 2006 04:55:48 -0700 development and maintenance of long- Newsgroups: comp.lang.ada Newsgroups: comp.lang.ada lived, high-quality software systems for a variety of application domains. The The Ada day at FOSDEM 2006 was The dates for FOSDEM 2007 have just program will allow ample time for successful, how about doing something been announced on keynotes, Q&A sessions, panel similar in 2007 again? In particular, I http://www.fosdem.org. The site is now discussions and social events. think an introduction to Ada 2005 would back up on-line. As I suspected the dates Participants will include practitioners and be a good idea. are 24–25 February 2007 in Brussels, Belgium. researchers from industry, academia and http://www.fosdem.org is down due to government organizations interested in hardware failure (this happened to the Two people have already offered furthering the development of reliable Ada-France server this year, too), but the presentations; we need more! Please software technologies. To mark the mailing list still exists. No planning subscribe to the AdaFOSDEM mailing completion of the technical work for the seems to have taken place yet, so if we list if you are interested. Ada language standard revision process, want to reserve a room for our [See also “Feb 25–26 — FOSDEM 2006” contributions that present and discuss the presentations, now is a good time. I in AUJ 26-4 (Dec 2005), p.231. —su] potential of the revised language are assume that FOSDEM 2007 is still particularly sought after. planned for late February 2007, Jun 25–29 — Ada-Europe For papers, tutorials, and workshop presumably 24–25 February. As usual, proposals, the topics of interest include, this will be in Brussels, Belgium. 2007 but are not limited to: I could redo my classic "Ada in Debian" From: [email protected] (Dirk - Methods and Techniques for Software speech, but I do not have much more to Craeynest) Development and Maintenance: say than I did last year, so I will only Subject: Ada-Europe 2007 submission Requirements Engineering, Object- speak if there is popular demand for it. deadline approaching Oriented Technologies, Formal Methods, OTOH, Debian is due to be released on Date: 9 Nov 2006 21:15:13 +0100 Re-engineering and Reverse Engineering, Dec 4, so by February 2007 I'll be in the Organization: Ada-Europe Reuse, Software Management Issues planning phase for Etch+1, which might Newsgroups: lead to interesting discussions. comp.lang.ada,fr.comp.lang.ada,comp.la - Software Architectures: Patterns for and Composition, Let's assume that the traditional, slot- ng.misc Frameworks, Architecture-Centered based schedule will be applicable this 12th International Conference on Reliable Development, Component and Class year again, i.e. there are six one-hour slots Software Technologies — Ada-Europe Libraries, Component-Based Design in a day, and we need to allow for 10 2007 minutes of transition between slots. So, - Enabling Technology: CASE Tools, 25 – 29 June 2007, Geneva, Switzerland all presentations should be formatted to a Software Development Environments and 50-minute schedule including questions http://www.ada- Project Browsers, , Debuggers and answers. […] europe.org/conference2007.html and Run-time Systems Organised, on behalf of Ada-Europe, by In 2006, the "Ada day" was on Sunday. - Software Quality: Quality Management Ecole d'Ingénieurs de Genève in In 2007, if we're early enough we might and Assurance, Risk Analysis, Program cooperation with ACM SIGAda (approval get to choose between Saturday and Analysis, Verification, Validation, pending) Sunday, or even get a room for the whole Testing of Software Systems two days! (but this requires more Ada-Europe organizes annual speakers). international conferences since the early

Volume 27, Number 4, December 2006 Ada User Journal Ada-related Tools 199

- Critical Systems: Real-Time, Conference Chair 1. Doubly-linked webs and lists of items Distribution, Fault Tolerance, Information Nabil Abdennadher, University of with referential semantics were added. Technology, Safety, Security Applied Sciences, Geneva, Switzerland, Items can be of any type, including tasks, - Distributed Systems: Reliability, [email protected] protected objects, unconstrained strings etc; Security, Trust and Safety in Large Scale Program Co-Chairs Distributed Platforms 2. Get_Line procedure was added to the Nabil Abdennadher, University of - Mainstream and Emerging Applications: abstract source interface to improve Applied Sciences, Geneva, Switzerland, parser performance in the cases when Multimedia and Communications, [email protected] Manufacturing, Robotics, Avionics, optimization is poor; Space, Health Care, Transportation Fabrice Kordon, University Pierre & 3. Slicing and concatenation operations Marie Curie, France, were added to the package - Ada Language and Technology: [email protected] Programming Techniques, Object- Object.Handle.Generic_Bounded_Array; Oriented, Concurrent, Distributed Tutorial Chair 4. The code was slightly re-arranged to Programming, Bindings and Libraries, Dominik Madon, University of Applied circumvent bugs of GNAT 2006, GCC Evaluation & Comparative Assessments, Sciences, Geneva, Western Switzerland, 4.1.1 (20060525). Critical Review of Language [email protected] [See also same topic in AUJ 27-3 (Sep Enhancements, Novel Support 2006), pp.134–135. —su] Technology, HW/SW platforms Exhibition Chair - Experience Reports: Experience Neville Rowden, Siemens Switzerland, Ada Profilers Reports, Case Studies and Comparative [email protected] Assessments, Management Approaches, Publicity Chair From: Jeffrey Creem Qualitative and Quantitative Metrics, Ahlan Marriott, White-elephant, Date: Wed, 22 Nov 2006 10:42:59 -0500 Experience Reports on Education and Switzerland, [email protected] Training Activities with bearing on any of Subject: Re: Profiler? the conference topics Dirk Craeynest, Aubay Belgium & Newsgroups: comp.lang.ada K.U.Leuven, Belgium, > Does anyone know of a good profiler Proceedings [email protected] for programs written in Ada? The conference proceedings including all Local Chair accepted papers will be published in the I usually just select the profiling options Lecture Notes in Computer Science Régis Boesch, University of Applied from the menu in the builder after (LNCS) series by Springer Verlag, which Sciences, Geneva, Switzerland, ensuring the auxclock rate is what I will be available at the start of the [email protected] expected (using Greenhills AdaMULTI conference. The authors of accepted [See also “Jun 5–9 — Ada-Europe 2006” with a VxWorks target). papers shall prepare their camera-ready in AUJ 27-1 (Mar 2006), pp.6–7. —su] What compiler, OS, IDE, etc are you submissions in full conformance with the using? LNCS style, not exceeding 12 pages and strictly by *February 26, 2007*. Authors Ada-related Resources I can say that gprof is actually an "OK" should refer to: profiler. It is not great but it gets the job http://www.springer.de/comp/lncs/authors Ada & Software Engineering done. .html for format and style guidelines. If you use of Ada tasking, you will Failure to comply will prevent the paper Library and CD-ROM run into the well known issue with gprof from appearing in the conference September 7, 2006 and threads under Linux (only the main proceedings. program gets counted) but the A searchable on-line copy of the Ada and workaround here Awards Software Engineering Library, the on-line Ada-Europe will offer honorary awards version of the famous ASE CD-ROMs, http://sam.zoy.org/writings/programming/ for the best paper and the best has been created at the AdaIC. (The gprof.html presentation, which will be presented previous home of this material has gone works just fine (you build a shared library during the banquet and at the close of the off line.) The library is also available via and then use LD_PRELOAD to wrap conference respectively. FTP at Ada-Belgium's site. pthread_create as you execute your Exhibition http://archive.adaic.com/ase/ program. Commercial exhibitions will span the ftp://ftp.cs.kuleuven.ac.be/pub/Ada- From: Alex . Mosteo three days of the main conference. Belgium/ase/ Vendors and providers of software Subject: Re: Profiler? [See also same topic in AUJ 21-4 (Jan Date: Wed, 22 Nov 2006 17:34:32 +0100 products and services should contact the 2001), p.224. —su] Exhibition Chair Neville Rowden as soon Newsgroups: comp.lang.ada as possible for further information and for [With GNAT under Linux], I've used allowing suitable planning of the Ada-related Tools successfully Valgrind and kcachegrind exhibition space and time. with nice results, also for multitasking Reduced Fees for Students Simple components programs. Oprofile was in my list of things to look at that I never reached. A small number of grants are available for students who will (co-)author and present From: Dmitry A. Kazakov From: Jeffrey Creem papers at the conference. A reduction of 25% will be made to the conference fee. Subject: ANN: Simple components v2.4 Date: Wed, 22 Nov 2006 13:01:41 -0500 Contact the Conference Chair Nabil Date: Sun, 8 Oct 2006 14:53:09 +0200 Subject: Re: Profiler? Abdennadher for details. Newsgroups: comp.lang.ada Newsgroups: comp.lang.ada http://www.dmitry- The combination of Valgrind and kazakov.de/ada/components.htm kcachegrind is actually quite powerful Changes:

Ada User Journal Volume 27, Number 4, December 2006 200 Ada-related Tools

(though large programs do tend to run From: Martin Krischik GUI packages for Ada quite slowly under Valgrind). I also toyed with oprofile a while back Subject: Re: Finaly: GPS 4.0.0 available. From: Stephen Leake and did not find it as useful (in the case I Date: 12 Sep 2006 04:02:10 -0700 was working with) as Newsgroups: comp.lang.ada Subject: Re: GWindows Valgrind/kcachegrind but I did not spend There is no official announcement of GPS Date: Thu, 09 Nov 2006 02:04:25 -0500 enough time with it to be sure. 4.0 for non Pro customers — so if you Newsgroups: comp.lang.ada From: Emmanuel Briot like to read up on what GPS 4.0 can do > I've never seen any reference to a Linux better then your current GPS read the port of GWindows myself. Wikipedia article: Subject: Re: Profiler? I certainly hope not. Date: Thu, 23 Nov 2006 10:29:35 +0100 http://en.wikipedia.org/wiki/GNAT_Progr The original rational for GWindows was Newsgroups: comp.lang.ada amming_Studio to be a rational Ada binding to the One additional one which I find even From: Björn Persson Windows API. more convenient is sysprof on Linux, Changing that to some other OS/GUI since it will monitor the whole system, Subject: Re: [gnuada] Finaly: GPS 4.0.0 combination would be just wrong. you can start it whenever you want (i.e. available. you don't have to profile since the start up Date: Mon, 11 Sep 2006 17:57:56 GMT Which windowing API do you want on of your application), and has a nice GUI Newsgroups: comp.lang.ada GNU/Linux? to examine the results Alas, it looks like there won't be a GPS From: Jeffrey Creem [See also "Profiling GNAT programs with package for Fedora anytime soon. It just gprof" in AUJ 26-3 (Sep 2005), p.154. — displays the splash screen and then Date: Thu, 09 Nov 2006 07:38:26 -0500 su] crashes on a failed assertion. Subject: Re: GWindows Newsgroups: comp.lang.ada [See also same topic in AUJ 27-3 (Sep GNU Ada Compiler 2006), p.135. —su] David Botton had been looking into if Gwindows would work well when linked From: Martin Krischik to winelib under Linux. VAD 6.3 — Visual Ada Subject: [gnuada] SuSE 10.1 i686 released. Developer From: Dmitry A. Kazakov Date: Tue, 26 Sep 2006 20:02:15 +0200 Newsgroups: comp.lang.ada From: Stephane Richard Subject: Re: GWindows Date: Fri, 10 Nov 2006 09:56:00 +0100 The SuSE 10.1 i686 version of The GNU Subject: Announcement on behalf of Leonid Newsgroups: comp.lang.ada Ada Tool-chain has been released. You Dulman > Probably GTK+, because that's what I can find details here: Date: Thu, 07 Sep 2006 19:56:05 GMT know from GtkAda :-). More important Newsgroups: comp.lang.ada http://gnuada.sourceforge.net/pmwiki.php it is widely used and plain C, which /Install/SuSE [Leonid Dulman] announces the latest may make it easier to bind to than The 32bit version is late as the 32bit SuSE version of his VAD (Visual Ada something written in C++. But if there system is not as readily available to me. Developer) application. Version 6.6 has is a better choice I wouldn't object. now arrived and features some great As such I would welcome it if someone Though GTK+ performs quite poorly on things. would take the 32 bit release of me. It is Windows platform. And overall, when its not that much work once build Have a look for yourself, right here: documentation tells you that you environment has been set up. http://websamba.com/guibuilder fundamentally cannot save and restore the [See also same topic in AUJ 27-3 (Sep [See also "About VAD — Visual Ada position of a window, what could you 2006), p.135. —su] Developer" in AUJ 25-4 (Jun 2004), say? pp.192–193. —su] In my opinion it must be 100% Ada. I GNU Ada GPS don't believe in C. AutoIT — Automated GUI From: Martin Krischik From: Pascal Obry Testing Date: Fri, 10 Nov 2006 23:40:23 +0100 Subject: [gnuada] Finaly: GPS 4.0.0 Subject: Re: GWindows available. From: Per Sandberg Newsgroups: comp.lang.ada Date: Sat, 09 Sep 2006 20:19:11 +0200 GPS manages to work pretty well on Newsgroups: comp.lang.ada Subject: [ANN] ada-AutoIT 0.5.2 Released Date: Thu, 23 Nov 2006 06:49:34 +0100 Windows and it is using GtkAda. It uses Finally after many unsuccessful attempts Newsgroups: comp.lang.ada to perform poorly, but things have we have created a working GPS. And not improved a lot since a year or so. http://sourceforge.net/projects/ada-autoit/ any old one — the very current GPS 4.0.0 From: Stephen Leake with lots of new features. Release: 0.5.2 "GNAT/GPL SuSE 10.1 x86_64" and Date: 2006-11-22 Date: Fri, 10 Nov 2006 08:33:04 -0500 "GNAT/GPL Source" are uploaded and Changes since last release: Subject: Re: GWindows Newsgroups: comp.lang.ada others will follow when they become * Updated to autoIT 3.2 available. * Added HTML documentation > But not making the GUI lib portable Please note that can use the GPL version (Extracted from .chm file) to be used in makes it useless for projects targeting of GPS together with the GCC version of GPS more than just Windows. GNAT — just the setup is a bit more * Added GPS integration Obviously. tricky but you won't need to install two * Changed install method to make script GPS if you don't want to. * Included Release notes in Installation So if you require portability across platforms, don't use GWindows. http://gnuada.sourceforge.net/ AutoIT is a scripting-language/tool for GUI automation.

Volume 27, Number 4, December 2006 Ada User Journal Ada-related Products 201

On the other hand, making the GUI lib Subject: Announce: Avatox 1.3 now (relative to the smaller number in things portable means using only those features available like C and Python). common to all of the targeted platforms. Date: Sun, 19 Nov 2006 14:20:12 -0600 To my mind, an Open Source Ada wiki So if you want your application to be able Newsgroups: comp.lang.ada would be just as cross-platform now, to take full advantage of the Win32 API, The format of the XML in the document much safer to extend and much, much use GWindows. can be configured, and supplemental more robust. So it would be a good source annotation can be generated. project. The overall structure of wikis has Erlang/Ada Interface Changes since version 1.2: become clearer now, so to draw up a spec. based on the limits of current From: Samuel Tardieu - Fixed a bug that caused comments to implementation would be a useful job all Subject: Re: PolyORB - building and sometimes get skipped. on its own. applications - Added the ability to generate axfPoint From: Brian May Date: 21 Sep 2006 15:32:49 +0200 (AXF Points Of INformation for Newsgroups: comp.lang.ada Transformations) elements. These elements provide supplemental context- Subject: Re: Wiki written in Ada? > I recall someone mentioning an Ada dependent information about the element Date: Sat, 16 Sep 2006 09:17:27 +1000 program working as an Erlang node. So in which they're nested. Newsgroups: comp.lang.ada perhaps you could leave the > PHP seems to be the language of choice communication to an Erlang system? For this first release, axfPoint elements are used to provide language-independent these days for web applications. [...] http://www.rfc1149.net/devel/adaerl identifiers for operators, e.g. "/=" is I think the speed and robustness of a annotated as "axfNe", and "&" is would be ideal for SecurePolyORB — CORBA "axfConcat". For more information see any large scale web application. Not an Common Secure the AXF_XML_FORMAT file in the interpreted language like PHP. Interoperability v2 distribution and on the website. PHP is perceived as being quicker to Avatox 1.3 is available at write. From: [email protected] www.mckae.com/avatox.html. Maybe for small and very simple projects Subject: ANNONCE: SecurePolyORB this might be true. Date: 16 Oct 2006 02:05:06 -0700 Casbah — Ada Wikis Newsgroups: comp.lang.ada However, as the code size goes up, productivity goes down, and risk of From: [email protected] SecurePolyORB, an implementation of security problems goes up. After you Subject: Wiki written in Ada? CORBA Common Secure Interoperability factor in time wasted due to debugging Date: 10 Sep 2006 11:55:06 -0700 version 2, now available for download security breaches on a web server and not Newsgroups: comp.lang.ada from Ada-RU site: getting anywhere. What virtual host did http://www.ada-ru.org/files/ I know that there are wikis about Ada, I the attacker break into? How did an securepolyorb-0.2w.tar.gz just wondered (I can't find a reference) if attacker run wget on this system? How there's a project to produce a wiki that's For now it provides: did the attacker execute the IRC server written in Ada. after downloading it? Did the attacker do - support for SSL/TLS transport In particular, I'm interested to know if any other damage? mechanism (authentication, encryption there's a distributed wiki model being and integrity control); [...] I think it would be an interesting developed in Ada. - support for GSSUP (user/password) experiment to rewrite something like attribute layer authentication mechanism; From: Marius Amado-Alves Mediawiki in Ada + AWS. - identity assertion; From: Marius Amado-Alves - delegation with backward trust Subject: Re: Wiki written in Ada? evaluation. Date: Thu, 14 Sep 2006 14:28:20 +0100 Subject: Re: Wiki written in Ada? Newsgroups: comp.lang.ada Date: Tue, 19 Sep 2006 10:51:12 +0100 Avatox — Ada To XML That would be the Casbah, available at Newsgroups: comp.lang.ada Yes. This is not opposed to what I said. From: Marc A. Criley http://www.softdevelcoop.org/software/ The thing is code size goes up very Subject: Announce: Avatox 1.2 Now (still in the old "software" directory, quickly. For me 1000 lines is already an Available waiting for man-hours to update the site ;) indicator of "you should be coding in Date: Sun, 24 Sep 2006 20:09:02 -0500 Ada"—and not the large number Newsgroups: comp.lang.ada It's Miai Certified progressive software. (1000000?) seen on some ads. Of course A Casbah system is online at Avatox (Ada, Via Asis, To Xml) is an here we are using "code size" more as a application that traverses an Ada http://www.liacc.up.pt/cgi- symptom of reliability requirements and compilation unit and outputs the ASIS bin/casbah/casbah.cgi the corresponding code _complexity_. representation of that unit structured as an From: [email protected] Also efficiency requirements. Clearly XML document. Subject: Re: Wiki written in Ada? requirements for a good wiki. In my lab Version 1.2 now supports UTF-8 Date: 10 Sep 2006 18:31:25 -0700 sometimes we use Moodle (PHP) and the character encoding, as well as switches to Newsgroups: comp.lang.ada Casbah (Ada) for the same function (writing something or collecting data retain ASIS tree files that pre-existed or PHP is quick to write, fairly easy to are generated on the fly, and to "krunch" collectively). The Casbah beats Moodle in and has intuitive interfaces to speed hands down. the XML output into a continuous, non- the front and back ends. I'd say that it indented stream. really was the nature of PHP that brought EWS — Embedded Web Avatox 1.2 is available at about the idea of a wiki in the first place. Server www.mckae.com/avatox.html. A testimony to the ease of writing in PHP From: Marc A. Criley is the large number of separate wiki From: Simon Wright Organization: McKae Technologies engines that have been written in it Subject: Re: programming a web with Ada

Ada User Journal Volume 27, Number 4, December 2006 202 Ada-related Products

Date: Tue, 17 Oct 2006 19:55:24 +0100 thin binding, and then write a thick From: Jeffrey Creem Newsgroups: comp.lang.ada binding by hand, on top of the thin. > It would want to make a web page in > (considering a number of C libraries Subject: Re: Ada (GNAT) and GNU Ada that I would like to be able to access Scientific Library from Ada here but with no native Ada Date: Sat, 18 Nov 2006 08:48:40 -0500 You can create a web server in Ada using Newsgroups: comp.lang.ada AWS (at http://libre.adacore.com), which bindings yet). offers lots of standard protocols, or my There is an example of a few SWIG '' > There were also announcements of an embedded web server (at http://embed- bindings to the GNU Scientific Library ongoing effort to produce a SWIG web-srvr.sf.net/) which is very minimalist (GSL) at module, however my understanding is that is not yet finished (and IIRC it by comparison. May be (probably are) svn co svn://58.163.88.116/anvil/gsl others. aims at C++ bindings). Meanwhile you SWIG with the 'ada' & 'gnat' modules is can try throwing cbind at the task – it [As can be read in the home page "EWS available via may help produce some bindings at is a web server construction kit, designed least for the needed functions. for embedded applications using the svn co https://svn.sourceforge.net/ GNAT Ada compiler. The Embedded svnroot/gnuada/trunk/projects/swig-1.3.29 Actually, SWIG will bind to more than just C++. It really is a N-way language Web Server is designed for use in The repository code is a little out of date, embedded systems with limited resources binding generator. I've not checked the but recent changes should be committed progress recently (the work is being done (eg, no disk). It supports both static within the next few days. (converted from a standard web tree, in the SVN repository of of the GNUAda including graphics and class files) From: [email protected] project on SourceForge). and dynamic pages. It is written in GCC Subject: Re: C to Ada Ada." -—su] Date: 25 Nov 2006 15:52:47 -0800 Cbind Newsgroups: comp.lang.ada From: Simon Wright From: [email protected] > I am still not clear on the difference — Subject: Re: Ada (GNAT) and GNU what is the 'proxy' approach? Subject: Re: programming a web with Ada Scientific Library Date: Wed, 18 Oct 2006 05:59:11 +0100 With the 'proxy' approach, the Ada type Date: 18 Nov 2006 01:41:35 -0800 Newsgroups: comp.lang.ada holds only a pointer to the wrapped C++ Newsgroups: comp.lang.ada object. When an object of the the Ada > Simon, does it have a name? On a related note, I recently "resurrected" type is constructed, a corresponding C++ the cbind package. It was one of the EWS of course, but unfortunately object is created, and its pointer stored in packages we had in portage (that's someone on sf.net got there first! the Ada type object. All operations on the Gentoo) and which I did not, at the time, Ada object are then relayed to its internal update yet. The usual search however did SWIG — Simplified C++ object. not turn up any update information. In Wrapper and Interface The 'gnat' binary approach produces an fact all the references I found were Generator Ada record layout which is equivalent to pointing at the location which now look the C++ class layout. Operations act dead (If anybody can give me any From: [email protected] directly on the Ada object. pointers to anything "official" I'd be Subject: Re: C to Ada > Can I assume that the GNAT target uses grateful to hear of course). Fortunately we Date: 23 Nov 2006 18:28:46 -0800 GNAT specific features and won't work still had the sources on our mirrors, so I Newsgroups: comp.lang.ada without GNAT?? somewhat cleaned them up and > Are there any up-to-date utilities for repackaged (I don't remember all the Yes, the 'gnat' SWIG module produces converting a C *.h file into a Ada details right now, minor stuff mostly. bindings which require a GNAT compiler. wrapper package? Most notably, I converted some script Perhaps a similar approach (binary- from csh to bash, in order not to force tcsh You might try the prototype SWIG 'ada' compatible) for other compilers might be dependency just for one 20-liner. The rest and 'gnat' modules. attempted, after the existing modules have was trivial IIRC (not that even that was These attempt to generate Ada bindings to matured a little more. hard :))) both C and C++ libraries. The 'ada' From: Jeffrey Creem If anybody is interested to have it you can module is for any Ada compiler, and get the repackaged sources here: produces bindings based on a 'proxy' Date: Sun, 26 Nov 2006 13:12:21 -0500 approach. The 'gnat' compiler targets the http://dev.gentoo.org/~george/src/cbind- Subject: Re: C to Ada GNAT family of compilers, and produces 6.0.tar.bz2 Newsgroups: comp.lang.ada Ada types and objects which are the or on any of our mirrors. Just run make to binary equivalent of their corresponding > What's the status of the Ada SWIG build, it only needs GCC and make C/C++ types. support, and where can I find it? I tried AFAICT. I intend to keep it for as long as Google, but it wasn't clear to me from > I don't care if it requires cleaning up by I can "maintain" it. I briefly tested it on what I found whether such support is hand afterwards. some .c file - incidentally that was my available yet. attempt to test some gsl function :), and it The generated bindings are pretty rough, It is currently being worked outside of the seemed to spit some reasonably looking and generally need to be 'pretty print' SWIG tree. The GNUAda project at code for some gsl header file. Although I formatted, by gnatpp or another tool. SourceForge setup an area in the SVN did not test this further at the time. There are also many style 'warts', which tree so that if the current people working should eventually be cleared up. on it abandon it, we don't loose the Cairo Ada binding > Or is it considered better to write the progress. entire wrapper by hand? From: Damien Carbonne The hope is that it will soon be mature Bindings done by hand tend to be better enough that it can be accepted into the Date: Wed, 25 Oct 2006 23:46:28 +0200 than the auto-generated ones. SWIG SWIG tree. Subject: Cairo Ada binding produces very thin bindings. A decent http://gnuada.svn.sourceforge.net/viewvc/ Newsgroups: comp.lang.ada compromise is to use SWIG to build a gnuada/trunk/projects/swig-1.3.29/

Volume 27, Number 4, December 2006 Ada User Journal Ada-related Products 203

I have a working (at least for all tests I - tool: level-to-Ada translator for Doom 3, [See also same topic in AUJ 27-3 (Sep have done with it !) Cairo Ada 95 Quake 4 and other games 2006), pp.139-140. —su] binding. As soon as Cairo people are OK GLOBE_3D is an open-source software. with it (from Cairo's viewpoint), I expect It allows an easy and fast real-time Regular Expressions in Ada to publish it completely on Cairo site. display of objects, of any kind, or groups From: Matthias Kistler Till then, I have put its user API here: of connected objects like a series of rooms with open doors. http://damien.carbonne.free.fr/cairoada/in Subject: Regular Expressions in Ada 2005? dex.html One single source set – without any Date: 8 Nov 2006 12:53:02 -0800 All comments would be welcome. conditional compilation – for all target Newsgroups: comp.lang.ada platforms and compilers. Works on From: Seth Brutzman Does anybody know, if it's possible to use - operating systems: Windows, Linux, regular expressions in Ada 2005? I come Subject: Re: Cairo Ada binding Mac OS X from Perl and I'm very interested in Ada Date: 26 Oct 2006 12:12:00 -0700 - compilers: GNAT, ObjectAda but it's useless for me without the Newsgroups: comp.lang.ada More details here: possibility of using regular expressions similar to Perl. > What's Cairo? http://homepage.sunrise.ch/mysunrise/ gdm/g3d.htm I found a GNAT-package providing only Cairo is a slick 2D graphics library (not a a regex-matcher. But I also need a GUI toolkit). Information can be had at Newsletter on demand. replacer. Otherwise it'd be useless for me. http://www.cairographics.org. [See also same topic in AUJ 27-2 (Jun Does anybody know about regular Interesting things to note are that it is 2006), p.72. —su] expressions in Ada 2005? Is there any cross-platform, can output to several tutorial? Is there at least an Ada-library? different formats including SVG and Ada-Mode Or can just anybody explain to me, how PDF, and is well on its way to being to use regexes in Ada? hardware accelerated through OpenGL. From: Martin Krischik From: Georg Bauhaus Downside? It's written in C. ;) Subject: [Vim] Ada language Mode. From: Damien Carbonne Date: Sun, 08 Oct 2006 17:55:34 +0200 Date: Wed, 08 Nov 2006 22:14:51 +0100 Newsgroups: comp.editors,comp.lang.ada Subject: Re: Regular Expressions in Ada Date: Thu, 26 Oct 2006 23:14:20 +0200 2005? I have created a new language mode for Subject: Re: Cairo Ada binding Newsgroups: comp.lang.ada Ada and would like anybody who Newsgroups: comp.lang.ada interested in Ada and Vim to comment Ada comes with a rich set of string > Providing a .tar.gz would be good; it's on. manipulation packages, Ada.Strings.*, far easier to browse code on my Ada.Characters.*, Ada.*Text_IO.Editing. The new mode offers: computer than on the web. Especially if They cover a fair bit of what you would it compiles. * Support for Ada 2005 keywords. do using Perl's expressions and translation * Improved syntax highlight (Including You can download current version of the operators in a sane way. all standard Pragmas and Attributes). binding here : * User completion (Keyword, Pragmas, The GNAT packages do provide scanning http://damien.carbonne.free.fr/download/ Attributes) and replacement. There is a tutorial in the package specifications. Some of the possible changes I could * Omni completions (using ctags or gnat make are listed in the TODO file. Using xref). Example programs: * Tag search (using ctags or gnat xref). Cairo with GtkAda needs the addition of a http://shootout.alioth.debian.org/gp4/benc small package (Gdk.Cairo) that needs to * Unified on-line help (One ada.txt for all). hmark.?test=regexdna&lang=gnat&id be written. I expect to put everything soon =3 on Cairo official site. * Compiler support for GNAT and Dec Ada (using an extensible OO-Design). http://shootout.alioth.debian.org/gp4/benc GLOBE_3D — 3D Engine * Three different folding mechanisms. hmark.php?test=regexdna&lang=gnat&id * All function are autoloaded. =4 From: Gautier de Montmollin * Optimised for Vim 7 #3 uses Unix style regular expressions. The aim is to replace the Ada language #4 uses SPITBOL regular expressions. Subject: Ann: GLOBE_3D, Upload: 14-Oct- mode, which is currently part of the 2006 standard run-time, with this new mode. SPITBOL patterns are quite powerful and Date: Sat, 14 Oct 2006 21:35:05 +0200 fast, in fact you can write an entire Newsgroups: comp.lang.ada http://www.vim.org/scripts/script.php?scri program just as a pattern. But don't do pt_id=1609 GLOBE_3D means "GL Object Based that. Engine for 3D". From: Martin Krischik From: Pascal Obry News Date: Wed, 08 Nov 2006 22:49:50 +0100 Subject: Vim Ada Mode: first upstream step Subject: Re: Regular Expressions in Ada - GLOBE_3D is now independent of CPU Date: Sun, 12 Nov 2006 19:51:00 +0100 2005? architecture; runs on (Mac OS Newsgroups: comp.lang.ada Newsgroups: comp.lang.ada X - PPC) To keep you updated: The new Vim Ada You have seen GNAT.Regexp but - binary Input-Output of 3D objects or mode did its first upstream step – that is linked groups of objects implemented probably not GNAT.Regpat. The later Bram accepted the patches and uploaded does support replacement. As noted by - Binary Space Partition (BSP), for them to the ftp server. quickly locating a point in a group of others there is also GNAT.Spitbol. objects ftp://ftp.vim.org/pub/vim/runtime/

Ada User Journal Volume 27, Number 4, December 2006 204 Ada-related Products

From: Jeffrey R. Carter http://playerstage.sourceforge.net/doc/Pla interfaces as well. CARMEN comes to yer-cvs/player/supported_hardware.html mind). Subject: Re: Regular Expressions in Ada I have used it with Pioneer3 DX/AT http://carmen.sourceforge.net/ 2005? robots equipped with sonar and SICK200 hardware.html Date: Thu, 09 Nov 2006 00:13:38 GMT lasers. Newsgroups: comp.lang.ada From: Alex R. Mosteo You can also look at Ada-related Products PragmARC.Regular_Expression_Matcher Subject: Re: [ANN] Player-Ada 2.0.3.0 (and its instantiation for Character and released AdaCore Launches Remote String, PragmARC. Date: Fri, 27 Oct 2006 12:03:10 +0200 Programming Solution Character_Regular_Expression_Matcher). Newsgroups: comp.lang.ada The demo program, strm_sub, is a URL: matching and replacing filter. > If I correctly understood it is not http://www.adacore.com/2006/10/11/ada embedded, the thingy is controlled by a http://pragmada.home.mchsi.com/ core-launches-remote-programming- PC. solution/ Player-Ada — Robotic Well, no and yes. In our case, the Pioneer Wednesday October 11, 2006 robots have an embedded board with Platform Binding PC/104 socket that allows to have a AdaCore Launches Remote Programming Solution From: Alex R. Mosteo platform running linux. Player connects to the hardware via RS232. But I suppose Advanced IDE facility brings significant Subject: [ANN] Player-Ada 2.0.3.0 released you refer to more exotic platforms? productivity benefits to software Date: Thu, 26 Oct 2006 19:51:01 +0200 You can check more details here: developers Newsgroups: comp.lang.ada http://mobilerobots.com/ PARIS / NEW YORK, October 11, 2006 Player-Ada is a binding for the From: Alex R. Mosteo – AdaCore, the leading provider of Player/Stage robotic platform. commercial Ada development tools, is Subject: Re: Player-Ada 2.0.3.0 released pleased to announce the launch of its Player-Ada is a not-so-thin binding to the Remote Programming solution, an libplayerc client library that is distributed Date: 28 Oct 2006 02:53:08 -0700 Newsgroups: comp.lang.ada advanced feature of the company’s as part of the Player/Stage multi-robot GNAT Programming Studio (GPS) 4.0 interface/simulator software. > Does the robot have to be connected to Integrated Development Environment It currently implements the following the PC (RS232) in order to function? (IDE). The GPS Remote Programming interfaces: blobfinder, gps, laser, localize, If your question is if you can flash some facility provides a secure, efficient, and planner, position2d, simulation. program inside the robot microcontroller flexible way for software development Binding homepage: http://ada-player.sf. and completely forget about the serial and teams to reduce costs by taking full net/ external things, I think the answer is no, advantage of their desktop computers and or not easily. The robot's microcontroller networks. Player homepage: is documented and its OS is upgradeable. http://playerstage.sf.net/ “Many of our customers have I don't think the documentation says development teams that use client desktop From: Alex R. Mosteo enough to replace the OS with something PCs connected to a central server,” said else, but certainly this is not the use the Robert Dewar, CEO, AdaCore. “With Subject: Re: [ANN] Player-Ada 2.0.3.0 manufacturer has in mind. The intended Remote Programming, project members released use for the robot is via serial. You'd also can utilise their PCs’ full processing and Date: Fri, 27 Oct 2006 10:42:27 +0200 have other problems: the microcontroller graphical power to run the GPS IDE, with Newsgroups: comp.lang.ada has access to wheels and sonars, but not program builds launched on the server to laser that is a completely isolated > Hardware? and with files automatically synchronised entity. Maybe you could use the now between client and server.” The binding has only been tested in Linux unused serial to link these two. How it Works with GNAT, but it's supposed to be pure In the other hand, nothing mandates that Ada 95 without using GNAT extensions. the client (user) side of the serial is a PC. In traditional software development Quoting Player FAQ: The protocol is documented so you could scenarios, operations are executed on a "Player runs on pretty much any POSIX use whatever you want. In fact the robot central server. Developers either use an platform, including embedded systems can be purchased with or without IDE displayed via an X Window system, (Player has been cross-compiled to run on embedded PC. Without it, you need either or abandon the IDE all together and resort several ARM- and PPC-based Linux a radio serial, a laptop to put on the robot, to using a text editor and terminal. When systems). Specifically, Player's or something else. The advantage of a PC using an IDE, all functions are carried out requirements are: is that you have out-of-the box the on the central server, which requires large provided, and Player network and power resources, thus * POSIX development environment, with increasing infrastructure costs. threads (pthreads) as an open source option. * TCP stack If you're concerned with a full real-time By contrast, AdaCore’s GPS Remote * A compiler with both C and C++ (we solution, this is doable: the Programming facility separates the have only tested GCC, but other microcontroller OS is RT and the periods software development project into a compilers may work) of wheel encoders and sonars feedback multiple client, single/multiple server * A bash shell, to run the configure script; are documented. So nothing precludes environment. It makes all project sources this implies that Player will not build using some RT-Linux or other RTOS in available on both the desktop PC and the natively in Windows, though some users the client side. server, which allows IDE-related operations to be carried out on the local have it running under Cygwin, and there (Actually, these Pioneer robots are are rumors of MinGW builds as well." desktop computer using the local CPU, popular within the robotic community. display, and memory. As soon as a remote If you refer to what robots can be You can probably find other PC software action is required, such as compilation, controlled with player: debugging or execution, the IDE

Volume 27, Number 4, December 2006 Ada User Journal Ada-related Products 205 automatically connects to the remote GNATstack is an important component of allow python scripts that use PyGTK’s machine, synchronises the files when AdaCore’s High-Integrity solution interface to the GTK+ toolkit to interact necessary, and performs the action. (GNAT Pro HIE), which is an enhanced with it. Limiting the number of operations carried Ada development environment used for GPS architecture allows the user to out on the remote server significantly building safety-critical, embedded interact with the GUI by means of scripts reduces the amount of required network software applications that require written in either the simple GPS script and power usage. certification. The tool is targeted at language or in python. Current versions of Features/Benefits system designers creating high integrity GPS offer the possibility, for example, to and high reliability embedded open a new source editor and move the AdaCore’s GPS Remote Programming applications. feature offers the major benefits of the cursor to the end of the buffer by writing: “one server/multiple clients” solution, “Manually calculating the amount of * ed = GPS.EditorBuffer.get (GPS.File including: memory that should be allocated to a (”src.adb”)) memory stack increases the risk that an * Greater control of the development embedded application will use more * ed.current_view().goto environment, ensuring that the code that memory on the stack than is available, (ed.end_of_buffer()) is tested will be exactly the production which can result in memory corruption, What PyGTK brings is the ability to code that will run. unpredictable execution, or a fatal system simulate user-level actions such as mouse * Easier installation of node-locked crash,“ said AdaCore senior software clicks or key strokes, to manipulate software, and easier sharing of project engineer Jose Ruiz. “GNATstack uses complex widgets such as GTK’s sources and builds. data generated by the compiler to TextView and TreeView, to activate * Ability to develop software that is determine the worst-case stack contextual menus, etc. portable from desktop PCs to several requirements. This output is used to platforms. ensure that sufficient memory is reserved This is a revolution as far as GPS testing is concerned because it allows most Pricing and Availability for the stack(s), and to guarantee that the software application executes safely.” actions that previously required human Remote Programming is available in interaction to be completely automated. GNAT Programming Studio (GPS) 4.0 About GNATstack For example, let’s assume an action opens that accompanies the GNAT Pro GNATstack calculates the worst-case a dialog containing an OK button. development toolset. Contact AdaCore for stack requirements for every stack entry Simulating a mouse click on it is as the latest information on pricing and point by performing per-subprogram stack simple writing: supported configurations. usage as well as control flow analysis. * ok_button.clicked() ([email protected]) The tool provides an audit trail for the PyGTK allows automatic testing of About AdaCore certification of high integrity and high reliability applications, and can detect and everything including the most complex Founded in 1994, AdaCore is the leading display a list of potential problems when GUI aspects such as focus issues, signal provider of solutions calculating the stack requirements, handling, etc. for Ada, a modern programming language including: designed for large, long-lived applications AdaCore — Transition to where reliability, efficiency and safety are - Indirect (including dispatching) calls: GCC 4.1 backend critical. AdaCore’s flagship product is the tool will indicate the number of GNAT Pro, which comes with expert indirect calls made from any subprogram. New stage in the transition to GNAT Pro online support and is available on more - External calls: the tool displays all the based on gcc 4.1 backend platforms than any other Ada technology. subprograms that are reachable from any Friday November 17, 2006 AdaCore has customers worldwide; see entry point that does not have a stack or http://www.adacore.com/home/company/ call graph information. We are in the process of transitioning the customers/ for more information. Use of GNAT Pro technology to a new compiler Ada and GNAT Pro continues to grow in - Unbounded frames: the tool displays back-end based on GCC 4.1 which we high-integrity and safety-critical each reachable subprogram that has an expect to bring significant performance applications, including commercial and unbounded stack requirement. The improvements to user applications. Our defence aircraft avionics, air traffic required stack size depends on the goal is to have several of our supported control, railroad systems, financial arguments passed to the subprogram. configurations on this back-end for the services and medical devices. AdaCore - Cycles: the tool can detect all the cycles next major GNAT Pro release scheduled has North American headquarters in New in the call graph. early 2007. We have been able to make York and European headquarters in Paris. Availability and Pricing significant progress in the areas of general www.adacore.com stability and in the support for numerous GNATstack is available in the GNAT Pro platforms thanks to invaluable input AdaCore — GNATstack HIE package and as an add-on for GNAT provided by our customers. This latest Pro. For more information on GNATstack beta version includes support for most of Tuesday October 31, 2006 features, please visit the new Ada 2005 features and is our http://www.adacore.com or contact AdaCore Announces New Software Stack most advanced Ada 2005 technology. AdaCore ([email protected]). Analysis Tool Please do not hesitate to contact us if you GNATstack ensures safe stack calibration AdaCore — PyGTK have any questions concerning this in software systems; creates audit trail for program. certified applications URL: AdaCore — Ada 2005 NEW YORK and PARIS, October 31, http://www.adacore.com/2006/11/22/pyg 2006 – AdaCore today launched tk-a-testing-solution-for-gps/ support in gnatpp GNATstack, a software analysis tool that PyGTK: A testing solution for GPS Partial support for Ada 2005 features in enables software development teams to Wednesday November 22, 2006 gnatpp accurately predict the maximum size of the memory stack required to host an The GNAT Programming Studio, Tuesday November 7, 2006 embedded software application. AdaCore’s IDE, has been enhanced to

Ada User Journal Volume 27, Number 4, December 2006 206 Ada-related Products

A new -gnat05 option is added to gnatpp. Usually, this kind of announcement lists Aivosto has updated Visustin, an When called with this option, gnatpp can the improvements over the previous automated software diagramming utility. process Ada sources containing some Ada version, but we won't do it this time; there With Visustin, software developers can 2005 features: are too many! reverse engineer their into - overriding indicators Suffice it to say that AdaControl features flow charts and UML activity diagrams, - null subprograms now 45 rules, with many sub-rules, saving their manual drawing efforts. - interface types making a grand total of 156 different Users can print the diagrams or export to - generalized anonymous access types checks available! Visio, PowerPoint and Word. - null exclusion Usability has improved a lot too, with a The new Visustin v4 visualizes programs - tagged incomplete types complete integration into GPS. at three levels: a detailed flow chart, a - limited aggregates (’<>‘ in component "bird's eye" overview and a codeless associations) To learn more about AdaControl, (and mode showing program structure only. - subprogram calls given in download it), go to Recent improvements include flow chart Object.Operation notation http://www.adalog.fr/adacontrol2.htm metrics, UML activity diagrams and - limited and private with clauses Parts of the new developments have been support for 29 programming languages. - raise with string message supported by EuroControl, BelgoControl "Visustin makes flowcharting painless", - formal abstract subprograms and CSEE-Transport. said Tuomas Salste, President of Aivosto. - partial parameter lists for formal "With the click of a button, you diagram packages As always, AdaControl is provided under the GMGPL license, which allows you to an entire class or a module. Developers A future gnatpp version will fully support use it, or any part of it, without can spend their time developing, not Ada 2005. restrictions. drawing. Automated diagramming ensures documents will be up-to-date AdaCore — New Version Adalog provides commercial support for rather than lagging behind development." AdaControl and can develop new rules Numbering for GNAT Pro that fit your particular needs; it also Visustin v4 supports a total of 29 provides consultancy about coding programming languages: Ada, ASP, New Version Numbering for GNAT Pro standard. If you are interested, please BASIC, C/C++, C#, Clipper, COBOL, Friday November 10, 2006 write to [email protected] Fortran, Java, JSP, JavaScript, LotusScript, MASM, MSP430, NASM, In 2007 AdaCore will be moving to a new From: Jean-Pierre Rosen Pascal/, Perl, PHP, PL/SQL, numbering scheme for product releases. PowerScript, PureBasic, Python, Instead of two-part version numbers such Subject: AdaControl V1.6 released QuickBASIC, REALbasic, T-SQL, VB, as 3.15a or 5.04a1, we will be using the Date: Wed, 06 Dec 2006 16:44:39 +0100 VBA, VB.NET and Visual FoxPro. more common convention of three Organization: Adalog numbers separated by dots. The first Newsgroups: comp.lang.ada Supported operating systems: number, as at present, will identify a Adalog is pleased to announce the release Windows major release and will thus indicate the of version 1.6r8 of AdaControl, the free 95/98/ME/NT/2000/XP/2003/Vista. introduction of significant new rule checker for Ada. Supports DOS and Mac code. functionality. The second number will correspond to the digits after the dot in the Thanks to the support of our new Visustin home page: current scheme. And the third number customer SAGEM-DS and contributions http://www.aivosto.com/visustin.html from R. Toy, AdaControl now offers 216 will replace the suffix (such as “a” or About Aivosto: “a1”) used at present. “0” as the third possible checks. number will be used for a beta version, Of special interest are rules to check that Aivosto Oy is an innovative producer of “1” for an initial release, and higher header comments match a given pattern, software development tools. Established numbers for subsequent releases. indication of possible false positive and in 1997 in Helsinki, Finland, Aivosto specializes in utilities for software In order to acknowledge the full support false negative due to non-statically analyzable constructs, fine definition of documentation, optimization, quality for the new Ada 2005 features, the GNAT assurance and productivity. Pro major version number is moving to constructs allowed in entry barriers the 6 series. More specifically, the version (including the one of the Ravenscar [See also “Aivosto — Visustin v3.1 scheduled for Q1 2007 will be 6.0.1, and profile), even better integration into GPS, connects with Project Analyzer” in AUJ the follow-up release scheduled for later and much much more. 27-1 (Mar 2006), p.12. —su] in the year will be 6.0.2. The planned As usual, AdaControl is provided under releases in 2008, incorporating the GMGPL license, and can be Aonix — AonixADT enhancements to be made during 2007, downloaded from Toolkit will then be 6.1.1 and 6.1.2. http://www.adalog.fr/adacontrol2.htm. Customers can find more information in From: Tom Grosman AdaControl is a commercial product of Subject: ANN- AonixADT Ada Development the “Our support policy” on GNAT Adalog; for information about support Tracker. Toolkit for Eclipse v. 3.11 and assistance with AdaControl or more Date: Fri, 15 Sep 2006 17:36:38 +0200 generally issues related to coding rules Adalog — AdaControl Organization: Aonix enforcement, please write to Newsgroups: comp.lang.ada [email protected] From: Jean-Pierre Rosen Aonix is pleased to announce the release [See also “AdaControl” in AUJ 26-4 (Dec of AonixADT 3.11, the first publicly Subject: AdaControl V1.5 released 2005), p.239. —su] available version of our commercial Date: Wed, 11 Oct 2006 19:03:44 +0200 quality Ada Development Toolkit for Organization: Adalog Aivosto — Visustin v4 Eclipse. Newsgroups: comp.lang.ada Visustin v4 Automates Flowcharting and AonixADT is a freely available plugin for Adalog is pleased to announce the release UML Diagramming Ada language development in Eclipse. In of a new version of AdaControl, the free addition to supporting standard Eclipse tool for checking Ada programming rules. November 30, 2006

Volume 27, Number 4, December 2006 Ada User Journal Ada-related Products 207 functionality and views, AonixADT also Configurable Toolchains Unless you're talking about Eclipse provides: * Support for configuration of multiple running in a Windows on the Support for Multiple Ada Compilers and Ada toolchains. MAC, then I'm afraid the answer is no. Tools While AonixADT is of course written Multi-language Graphical Debugger mostly in Java, there are some bits that * ObjectAda toolchain support * Support for configuring and debugging are system dependant, including pre-built * GNAT toolchain support of executables and attaching to already executables. Ada Project Navigator running processes. From: Tom Grosman * Ada-specific navigation of project files AonixADT v311 is available at Subject: Re: ANN- AonixADT Ada and folders with expansion of files to http://www.aonix.com/adt.html. Development Toolkit for Eclipse v. 3.11 show internal constructs (variables, Date: Mon, 9 Oct 2006 17:47:08 +0200 Aonix is an Add-in Provider Member of Organization: Aonix subprograms, types, etc.) the Eclipse Foundation. * Navigation to and from source code in Newsgroups: comp.lang.ada the Ada Editor. From: Tom Grosman > I don't understand is why a Java plugin Subject: Re: ANN- AonixADT Ada Ada 95 Colorizing Editor for an IDE written in Java wouldn't run Development Toolkit for Eclipse v. 3.11 on all platforms automatically. I * Customizable colorization of Ada Date: Fri, 15 Sep 2006 17:44:33 +0200 understand that the SWT GUI stuff is source code Organization: Aonix platform specific, but I would think that * Editor support for configurable code Newsgroups: comp.lang.ada would mean just recompiling. indentation while new code is written. Our website currently has FWIW, JDT and CDT (in addition to * Automatic parenthesis matching, block AonixADTv311 for Windows 2000 and matching, etc. Eclipse itself) also have separate plugins XP, with Linux and Solaris versions to be for different platforms. * Semantic, project-wide navigation of made available shortly. Ada objects (variables, units, etc.) from editor including opening of the spec and ObjectAda 8.2+ as well as various Aonix — ObjectAda for body declaration and searching for flavors/versions of GNAT are supported. Windows 8.2 references. The Quickstart guide available in pdf * Syntactic and Semantic Code Assist for from the ADT download page will should From: Owner-Intel-ObjectAda objects such as variables, packages, and look and feel of ADT. To: [email protected] procedures, functions, types, exceptions, Date: Thu, 12 Oct 2006 17:25:24 -0700 and tasks. From: Tom Grosman Subject: Intel-OA: New ObjectAda 8.2 Subject: [ANN]- AonixADT for Eclipse now Update available for Intel/Linux and * Automatic, incremental builds of Sparc/Solaris for GNAT A new update for Aonix ObjectAda for projects. Date: Mon, 30 Oct 2006 18:19:06 +0100 Windows 8.2, 1102V82-U5, is now Organization: Aonix available at Configuration File Newsgroups: comp.lang.ada http://www.aonix.com/ada_patches.html. * Storage of all project build properties in Aonix is pleased to announce AonixADT Please see the Release Notes for further ASCII text files which can be put under v311, the first publicly available release details on the corrections made and CM control along with source files. of our Eclipse Ada Development plugin installation instructions. The release Navigation to Compilation Errors for Intel Linux and Sparc Solaris. In notes can be viewed at addition to introducing support for Linux ftp://ftp.aonix.com/pub/adats/outgoing/11 * Build errors are displayed in Problems 02/8.2/U5/1102V82-U5.Release_Notes. view with navigation to errors in source and Solaris, version 3111 updates code. AonixADT for Windows by adding Downloading ObjectAda updates requires support for low-level debugging a password which can be obtained from Navigation to ARM operations and other enhancements. your local Aonix Customer Support * Build errors allow easy navigation to AonixADT supports GNAT and department. Please note that a current relevant section of hypertext Ada 95 ObjectAda toolchains and includes maintenance agreement is required to Reference Manual for ObjectAda. support for obtain the password. Pretty Printing Ada Project Navigation For information on obtaining or renewing * Whole file source code reformatting to Ada Semantic Browsing a maintenance agreement, please contact match project-customizable preferred Ada 95 Colorizing Editor your nearest Aonix Sales office. For format. Ada Semantic Code Assist contact information see * Support for gnatpp pretty printer. Multilanguage Development http://www.aonix.com/contact_us.html. Multiple Build Configurations Multiple Partitions [See also same topic in AUJ 27-3 (Sep File Creation Wizards 2006), p.143. —su] * Support projects that contain software Code Formatting for more than one partition. This means Native Debugging from within Eclipse DDC-I — SCORE for Texas the ability to build more than one More information about AonixADT and Instrument's DSP executable in one project space. downloads are available at Eclipse Wizards http://www.aonix.com/adt.html. DDC-I Announces Availability of SCORE * Ada Project Wizards Integrated Development Environment for From: Tom Grosman" TMS320C40 DSP * File, Package, Procedure, Function Subject: Re: Eclipse Plug-In creation wizards. Date: Thu, 17 Aug 2006 13:18:22 +0200 Provides seamless upward migration path Compatibility with Other Languages Organization: Aonix from Ada 83 to mixed Ada 95/Embedded C++ for legacy C40 code. * Support for multi-language projects Newsgroups: comp.lang.ada using CDT and other Eclipse plugins. > Any chance of it working on Mac OS X?

Ada User Journal Volume 27, Number 4, December 2006 208 Ada and GNU/Linux

Phoenix, AZ. December 4, 2006. DDC-I, time system for simulated and emulated Organization: McKae Technologies a leading supplier of development tools environments. Subject: Re: ubuntu gcc for safety-critical applications, today The SCORE IDE is available immediately Date: Sat, 11 Nov 2006 09:06:44 -0600 announced the availability of its for the TMS320C40. Pricing starts at $ Newsgroups: comp.lang.ada SCORE® Integrated Development 5000. > Does the GCC that comes with Ubuntu Environment (IDE) for Texas Instrument's About DDC-I, Inc. GNU/Linux support Ada (with TMS320C40. The SCORE IDE makes it appropriate packages installed)? easy for C40 developers to take existing DDC-I, Inc. is a global supplier of Ada 83 programs developed for the C40, software development tools, custom Yes, "gnatmake -v" for Ubuntu 6.06 upgrade them using a mixture of Ada 95 software development services, and shows: and Embedded C++, and deploy them on legacy software system modernization GNATMAKE 4.0.3 (Ubuntu 4.0.3- a royalty-free Ada 95 run-time system. solutions, with a primary focus on safety- 1ubuntu5) The SCORE IDE also makes it easy for critical applications. DDC-I's customer From: Ludovic Brenta commercial, military, aerospace, and Subject: Re: ubuntu gcc X86, with the unique ability to debug safety-critical industries. DDC-I offers multiple targets and languages at the same Date: Sat, 11 Nov 2006 17:01:28 +0100 compilers, integrated development Newsgroups: comp.lang.ada time. environments and run-time systems for C, "There has been a lot of Ada 83 code Embedded C++, Ada, JOVIAL and I recommend against it; in Ubuntu 6.06 developed for the C40, particularly in FORTRAN application development. "Dapper Drake" I recommend using the defence applications," said Bob Morris, "gnat" package from universe instead. president and CEO of DDC-I. "SCORE McKae Technologies — This is GNAT 3.15p and it comes with provides a modern, best-in-class mixed XML EZ Out the full complement of libraries, like in language development environment that Debian. makes it easy for C40 developers to From: Marc A. Criley Ubuntu 6.10 "Edgy Eft" contains all the upgrade their Ada 83 code and take Date: Sun, 24 Sep 2006 13:54:26 -0500 Ada packages transitioned to GCC 4.1.1, advantage of the latest Ada 95 and Subject: Announce: XML EZ Out 1.05 also by means of package "gnat", also in Embedded C++ technology. SCORE also Available universe. makes it easy for developers to migrate Newsgroups: comp.lang.ada existing C40 code to new processors." XML EZ Out is a small set of packages AdaControl Linux package To support the C40, DDC-I has developed intended to aid the creation of XML- From: Ludovic Brenta disassembler. The SCORE IDE provides programs. It basically wraps the tags and Subject: Re: AdaControl V1.5 released full JTAG multiprocessor debugging for data provided to it with XML syntax and Date: 25 Oct 2006 08:11:20 -0700 the C40, including trace and the ability to writes them to a user-supplied medium. Newsgroups: comp.lang.ada monitor all registers. SCORE also This medium can be any sort of writable > Adalog is pleased to announce the provides a PC-based C40 instruction set entity, such as a file, a memory buffer, or release of a new version of AdaControl, simulator. even a communications link, such as a the free tool for checking Ada SCORE® is a mixed-language, object- socket. The only functionality required of programming rules. oriented IDE for developing and the medium is that it supply a meaningful deploying safety-critical applications. "Put" (for writing a string) and And AdaControl 1.5 has now reached SCORE provides optimizing compilers "New_Line" procedure. testing in Debian, meaning it will be in the next stable release, Etch. for Ada, C, Embedded C ++, and Simply "with" the desired package, Fortran77, all of which pass the instantiate it if necessary, and then "use" Do other distributions carry AdaControl? applicable ACATS, PlumHall, Perennial, it. The XML EZ_Out packages are and FCVS compiler validation suites. From: Ludovic Brenta The SCORE® IDE features an intuitive applied. Subject: Re: AdaControl V1.5 released GUI with industry leading features such Version 1.05 adds a couple features, one Date: 26 Oct 2006 01:50:58 -0700 as a color-coded source editor, project to let applications set and change the style Newsgroups: comp.lang.ada management support, and automated of the generated XML, either as indented build/make utilities. SCORE's mixed- > Ubuntu Edgy Eft have version 1.4 in or continuous, during run-time instead of Universe. language, multi-window, symbolic as a parameter of the instantiation. debugger recognizes C/EC++, Ada and Well that's my package, since Ubuntu is a Fortran syntax and expressions, and can The other addition controls the presence derivative of Debian. In fact, the Ubuntu view objects, expressions, call chains, of attributes that have no content, i.e, an folks asked me to provide gnade 1.6.1 and execution traces, interspersed machine empty string. By default the attribute is gnat-glade 2006-3 before it became code, machine registers, and program not output in this situation, but setting available in Debian so they could include stacks. The debugger supports full Ada- Default_Output_Null_Attributes to True it in Edgy Eft, which will be frozen Real level debugging, including constraints, forces those attributes having empty Soon Now. attributes, tasking, exceptions, break-on- content to be output. [Suggested by exception and break-on-tasking events. Niklas Holsti.] Debian build scripts The debugger is non intrusive, can debug Licensing is GMGPL. at the source or machine level, and can be From: Ludovic Brenta code. Subject: Announce: Debian build scripts on SCORE provides versatile run-time target Ada and GNU/Linux a public Monotone server options, including a bare run-time system Date: Mon, 25 Sep 2006 22:18:15 +0200 certifiable to Level A of the FCC DO- Ada support in Ubuntu Newsgroups: comp.lang.ada 178B standard, and an enhanced bare run- As most of you know, all Debian build From: Marc A. Criley scripts are public; you can download them

Volume 27, Number 4, December 2006 Ada User Journal Ada and GNU/Linux 209 from Debian's many mirrors, change like to encourage people to look at the model is inherently broken, IMHO. A them, and run them to build binary scripts and propose improvements; maybe branch is NOT a directory, and a tag is packages. Now, you can also follow their even form a team and benefit from each NEITHER a branch NOR a directory. development almost in real-time thanks to other's experience? [...] And Subversion does not even try to keep Monotone, a powerful distributed version [See also “Monotone — A Distributed track of merges; just like C++ does not control system. Revision Control System” in this issue — even try to multitask.) About Debian source packages su] What's in the Ada-France database? A Debian source package consists of three The database that I just published on Ada- files: Monotone — A Distributed France is a replica of the one I work on * {package}_{version}.orig.tar.gz — the Revision Control System every day. It contains one branch (sometimes a couple of branches, pristine upstream sources. The directory From: Ludovic Brenta Each published upload of each package {package}-{version}.orig (note: '_' in the Subject: Announce: Debian build scripts on tarball name but '-' in the directory name). also has a tag. You can browse the whole a public Monotone server history of all changes, with comments. * {package}_{version}-{revision}.diff.gz Date: Mon, 25 Sep 2006 22:18:15 +0200 The size of the database is about 1.7 Mb. — a compressed patch which applies to Newsgroups: comp.lang.ada As of today, "mtn list branches" says: the above directory tree extracted from [See also “Debian build scripts” in this the tarball. This patch brings in all of the issue —su] org.debian.adacontrol Debian build scripts, Debian-specific org.debian.asis files, and patches. The {revision} is [...] Many Debian packages have project org.debian.asis-doc specific to Debian, too, and changes with pages on Alioth[1], and use one of org.debian.asis.2005 every upload. The most important file Subversion, GNU Arch, Bazaar-NG or org.debian.gnat-gdb brought by the patch is debian/rules, as their system. org.debian.gnat-glade which is executable and builds the Since I do most of my Debian work on org.debian.gnat-gps package. Usually (and always for the Ada the train and without any network org.debian.libaunit packages), debian/rules is a Makefile. connection, I require a _distributed_ org.debian.libaws * {package}_{version}-{revision}.dsc — version control system. After evaluating org.debian.libflorist a short text file containing the MD5 sums several candidates, I settled on Monotone org.debian.libgtkada2 of the two above files, and which is several months ago. org.debian.libopentoken org.debian.libtemplates-parser signed with the maintainer's private GPG http://www.ada- key. org.debian.libtexttools france.org/debian/distributed-version- org.debian.libxmlada1 In order to build the set of binary control-systems.html org.debian.libxmlada2 packages for a source package, one must Why Monotone? therefore: The list of tags ("mtn list tags") would be I believe that Monotone is the Ada of too boring for this post. $ tar xzf {package}_{version}.orig.tar.gz version control systems, so it is only Each branch contains a "debian" directory $ zcat {package}_{version}- appropriate that I use it for my Ada work. {revision}.diff.gz | patch -p0 and, in most cases, a "patches" directory. Monotone is safe, correct and powerful I use Quilt to manage the patches. $ mv {package}-{version}.orig _by design_. It uses cryptographic keys {package}-{version} to authenticate changes. It is written by http://savannah.nongnu.org/projects/quilt $ cd {package}-{version} elite who, despite using If you extract an upstream source tarball, $ debian/rules binary C++, have the "Ada attitude": no pointers, and checkout from Monotone into the All these steps, and then some, are one assert() every 9 lines of code, massive source tree, you're ready to build the automated by apt-get: use of generics (templates), and not a package. single critical bug in 3 years. The slides $ apt-get source --build {package} at [its web page] and my own tests The database does not contain the So, what's the problem? convinced me to switch from Meta-CVS upstream tarballs (.orig.tar.gz); these are available from Debian mirrors anyway or, With the above system, you can download several months ago for my Debian packages, as well as for other work. if not yet published in the Debian archive, and rebuild from source any Debian from http://www.ada- package from your current distribution A Monotone database consists of one france.org/debian/pool . (stable, testing, unstable, or single file; this is very convenient for experimental). You can change the maintenance. A Monotone database takes How to use Ada-France's Monotone package itself, or the build scripts. But only a fraction of the disk space required database you cannot: for an equivalent database in any other If you want to *read* from the database: - use older versions of the build scripts system I've tried (Subversion, Bazaar-NG, 1. Install Monotone, version 0.26 or later Mercurial, CVS), which is also an (the server is currently running 0.28). - use newer build scripts that have not yet important consideration for me. been published to the Debian archives 2. Create a key pair: (I like to think that CVS is the "C" of - submit your changes to the maintainer in version control systems, Subversion is the $ mtn genkey [email protected] a clean, efficient and automated way (the "C++" designed to replace the "C", GIT is 3. Create a new, local database: official way is by opening a bug report). the "assembly language" who needs $ mtn --db=debian.mtn db init These problems become critical for the cogito to be useable, Bazaar-NG is the many packages that are maintained by "perl", grossly inefficient and completely (I like to keep all my databases in teams rather than individuals. baroque, Mercurial is the "Eiffel" i.e the /var/lib/monotone, but you can place your second best, Monotone is the "Ada", i.e. database anywhere; remember: it's a A version control system allows the in- the best, even if not perfect) single file anyway. You can, of course, development build scripts to become have as many databases as you want.) public, so that team maintenance is (I particularly dislike Subversion and its possible. For the Ada packages, I would distributed derivative, SVK. I do not 4. Pull all branches starting with recommend them because their working "org.debian":

Ada User Journal Volume 27, Number 4, December 2006 210 Ada and GNU/Linux

$ mtn --db=debian.mtn pull www.ada- with your recommendation), is going to tampered with some trial databases using france.org 'org.debian.*' make me quit thinking of Subversion as SQL commands. That's the almost only 5. Create a working copy: the "successor" to CVS. way one can delete data, BTW. A quick glance at Monotone's change $ tar xzf Now Monotone is not perfect, and not 1.0 control history looks like they try to yet. The areas where perhaps it might be {package}_{version}.orig.tar.gz ensure that existing projects can move $ mv {package}-{version}.orig weak is scalability and performance. In forward through their improvements. my experience, it shines both for small {package}-{version} Do you consider Monotone as "safe" $ cd {package}-{version} projects and for large projects with short for production environments, even histories ( few revisions). But, apparently, $ mtn --db=../debian.mtn checkout -- though they're not at "release 1.0" yet? branch=org.debian.{package} . as the number of revisions grows, Would you recommend them as an Monotone scales less than linearly. 6. Now you can build the package, change alternative to CVS for new projects They're working on it at the moment, with the scripts, add new patches and whatnot. needing a version control system, but the first notable scalability improvements More importantly, you can *check in* wanting to be comfortable that they'll in the latest version, 0.30. into your local database, keeping track of not regret entrusting their project to your own changes. You can even create Monotone? From: Pascal Obry Date: Tue, 26 Sep 2006 19:33:50 +0200 sub-branches at will, if you wish your Yes, definitely. They've had zero data- changes to remain separate. Subject: Re: ANN: Debian build scripts on a loss bugs in their entire history, despite public Monotone server (the above commands have abbreviations, changing the database schema a couple of Newsgroups: comp.lang.ada e.g. -d for --db=, -b for --branch=, etc.. times, and the netsync protocol another Also, --db= and --branch= are couple of times. So, yes. > (I particularly dislike Subversion and its unnecessary in a working copy, because distributed derivative, SVK. I do not > Comparing Monotone to Ada to me is recommend them because their working the working copy remembers the database high praise. If I understood you and branch it was checked out of.) model is inherently broken, IMHO. A correctly, you seem to be saying that branch is NOT a directory, and a tag is If you want to *write* into Ada-France's even though Monotone is only at NEITHER a branch NOR a directory. database: version 0.30, Monotone's "standards" And Subversion does not even try to and professionalism make their v0.30 You can "push" your changes directly to keep track of merges; just like C++ "better" than a lesser tools' 1.0+ does not even try to multitask.) the Ada-France database, too. But I will version. Is that true? allow you to do so only if you identify Tracking merges is planed for version 2.0. yourself :-) You will need a GPG keypair, Yes, it is true. Their emphasis on We need to give time to Subversion. It signed and part of the Debian Web of correctness is simply astounding. It's the used to be a CVS "like" project for Trust, in addition to your Monotone attitude, man :) compatibility issued. Subversion 2.0 is on keypair. You need not be a Debian > Bringing us back to Ada: Is Monotone the way and the developers are going to Developer; you only need to be relatively Ada friendly? Does it handle do things as it should have been done authenticated. (The recent debates about Ada "projects" and source code now. So Subversion 2.0 will probably copyright law made it plain that naturally? break compatibility with current version anonymous contributions are quite for good! dangerous in fact). Yes; it handles renames and complex directory structures well, even across Let's not dismiss such a nice tool so easily 1. Extract your public key from your merges. It also handles file attributes (e.g. ;) Monotone database: executable), and there is even a From: Samuel Tardieu $ mtn --db=debian.mtn pubkey monotone.el for us fans. Subject: Re: Announce: Debian build scripts {[email protected]} > From: Ludovic Brenta Date: 27 Sep 2006 16:23:49 +0200 (your_public_key will be a short plain- Subject: Re: Announce: Debian build scripts Newsgroups: comp.lang.ada text file). on a public Monotone server > Mercurial is second best after Date: 26 Sep 2006 00:32:44 -0700 Monotone, IMHO. And a worthy 2. Send me your public key in a GPG- Newsgroups: comp.lang.ada signed email (signed with your public runner-up at that. The reason is that I GPG key, that is). I'd like to add that my confidence in dislike its model of "a repository is a Monotone is not just because I like the branch is a working copy". I insist on 3. Wait until I reply to tell you you're developers' attitude; it is also because: having my repository separate from my good to go. - Monotone stores the SHA1 sum of working copies, and I insist on having 4. Push your changes: everything in the database, and verifies as many branches as I need in one $ mtn --db=debian.mtn push the sum when checking out, updating, repository. (the database remembers where it was merging, or syncing between databases. When I started using GNU Arch and "pulled" from, so by default Monotone Any data corruption _will_ be detected, Darcs, I thought like you that a separate will "push" there. You can change that if and Monotone _will_ crash rather than repository was best for backups purpose. you wish). corrupt data (never happened to me As the time went, I started to like the though). (indeed, revision IDs are SHA1 "repository = branch = working copy" From: Ludovic Brenta would make no sense in the context of a a repository on any machine I'm working Subject: Re: Announce: Debian build scripts distributed version control system). on without having to create a db, get the on a public Monotone server keys and so on. Date: Tue, 26 Sep 2006 07:13:25 +0200 - all commits to a database are signed by a Newsgroups: comp.lang.ada crypto key, and so authenticated in a > It scales performance-wise, yes, but not tamper-proof way. in terms of disk space requirements. > Thanks for the access to the Debian Branches are expensive, especially if scripts AND the information on - the database is an SQLite database; one can always retrieve the data using SQL you change many files in the working Monotone. Just looking at Monotone's copy. By contrast, Monotone does that web site and how organized it is (along commands, if things came to worst. In fact, I have already, and successfully, very well.

Volume 27, Number 4, December 2006 Ada User Journal Ada and GNU/Linux 211

What version did you test? Mercurial uses try to elaborate. Brace yourself though — The numbers in brackets are SLOT hard links when you work on the same it is not going to be short. versions. file system, making cloning a very cheap I'll start with the past situation with gnat The situation with GNAT was somewhat operation. Moreover, since Mercurial 0.9 in Gentoo, which was pretty complicated by the fact that we now have is out, the disk usage has been cut by straightforward. We had gnat-3.15p and two upstream groups that provide gnat: 40%. some work was done on newer gnat ACT and FSF. Therefore, upon discussing From: Ludovic Brenta were added to the tree, they were not split it into two packages: gnat-gcc for Subject: Re: Announce: Debian build scripts considered "stable". Incidentally this was FSF's versions and gnat-gpl for ACT's. It on a public Monotone server during the period of Ada "stagnation" — is possible to add more. For example, Date: Wed, 27 Sep 2006 16:56:16 +0200 when FSF did not yet pick up on active should ACT desire to have the package Newsgroups: comp.lang.ada Ada maintainership. Correspondingly for gnat-pro we can add it to the tree The advantage disappears as soon as you single gnat package was enough and the (since we do not distribute binaries – modify a file: Mercurial then breaks the libs could be built against it in a normal strictly speaking we only provide hard link and duplicates the entire history manner, pretty much the way you have it installation instructions, – we have the for the file. In my trials with GCC, many in Debian. Later, when I picked up Ada ability to provide ebuilds for commercial files were changed between each version, maintainership again (after the developer packages (there are mechanisms to restrict so the space advantage was almost I recruited has gone MIA :), at least on access to sources (force manual completely lost, even if the changes to Ada packages) the situation with gnat was download) or just mirroring)). each file were actually small. much better — FSF was issuing working When I was speaking about "split" I was and frequently updated versions and ACT primarily referring to this situation, The use of hard links is a poor kludge to just produced gnat-2005. Therefore I took minimise the impact of unshared histories. however this is only half of the story. The a plunge and decided to implement the other half (and the one really requiring > Moreover, since Mercurial 0.9 is out, idea we have been discussing for a long "transition") concerns how the Ada libs the disk usage has been cut by 40%. time before, — automating parallel are dealt with. Apparently, having the installs of different gnats and making Ada ability to switch gnat compiler on the fly I tried 0.8.1 and my test consumed 686 libs play nicely with the compilers. megabytes. If I take your word and is great of itself, however this can screw reduce it by 40%, I get 411.6 Mb, which Now I need to do a little explanation of a your compiled libs if you just keep the is still much, much more than Monotone's few features unique to Gentoo. The original ebuilds. To resolve this situation I 183 megabytes (in Monotone 0.24) or 166 situation when we provide multiple major created gnat.eclass (eclasses are our way megabytes (in 0.26). versions of some package (meaning to do OOP in bash :)) that handles all the change in API, — being primarily "from major parts of lib installation. Basically I stand by my opinion that Mercurial is source" we do not worry about ABI as libs are compiled for all the installed only second best, after Monotone. much) is not uncommon in Gentoo. In gnats (different SLOTs or variants, thus if fact we have a well established you have gnat-gcc-3.4.6, gnat-gcc-4.1.1 GNAT Split in Gentoo mechanism of dealing with different and gnat-gpl-3.4.6.2006 installed you will major versions of the same package. We get your lib compiled three times) and From: Ludovic Brenta API version which is taken into the name regulated locations. Common files Subject: "Split GNAT compilers" in Gentoo consideration by our package manager, so (sourced, docs, etc) are of course shared. Date: 31 Oct 2006 03:48:03 -0800 all the dependencies can be resolved The same eselect-gnat module that Newsgroups: comp.lang.ada correctly for the packages that depend on switches compilers also activates the I am intrigued by what you just said in a particular version of some lib (e.g. gtk1 corresponding version of the libs. Thus another thread: vs gtk2 or kdelibs-3.4 vs kdelibs-3.5, etc). you have a consistent system at any point > I need to finish with the transition to The package itself is installed in a way to in time (as long as you use Gentoo split GNAT compilers (should be soon avoid collisions between different provided tools of course) but can easily finally — only a few libs left): in SLOTted variants (usually not an issue switch between the installed variants. One Gentoo you have the ability to have with shared libs that are done right, but "exception" is ASIS — it is built once for multiple gnat implementation installed may require some installation trickery for a corresponding compiler only and is side-by-side and switch them on the fly. the packages providing executables or installed at the compiler location. some data files) and, if necessary, some Could you please elaborate on this? I Now I am at the point of having switcher app is provided (nowadays this is transitioned the compilers, ASIS and understand how you can install several standardized via providing a new module versions side by side, but what do you roughly half of the libs (packages under for an eselect package). For example we dev-ada category). I still need to finish the mean by "split[ting]" the compilers? What had a SLOTted GCC for ages now. To is the impact on libraries? Also, could you few libs that are left. There is also one give you an idea, here is an output of the unresolved (well, postponed but that explain why you need a "transition", i.e. query for the provided GCC versions: what is the current state in Gentoo? needs eventual resolution) issue. Looks [I] sys-devel/gcc like we even have it easy with Ada, as Also, what in your opinion is the benefit Available versions: compared to other languages. You may of being able to switch compilers on the take a look at this bug if you are fly if they're binary-incompatible? (2.95) [P]2.95.3-r9 (3.1) [P]3.1.1-r2 interested: From: [email protected] (3.2) [P]3.2.2 [P]3.2.3-r4 https://bugs.gentoo.org/show_bug.cgi?id= Subject: Re: "Split GNAT compilers" in (3.3) [P]3.3.2-r7 [P]3.3.5-r1 151343 Gentoo [P]3.3.5.20050130-r1 [P]3.3.6 [P]3.3.6-r1 Date: 31 Oct 2006 14:33:11 -0800 I would like to hear any input you may be (3.4) [P]3.4.1-r3 3.4.4-r1 3.4.5 willing to provide ;). Newsgroups: comp.lang.ada 3.4.5-r1 3.4.6 3.4.6-r1 3.4.6-r2 Well, I think I mentioned this shortly once (4.0) *4.0.2-r3 *4.0.3 The binary incompatibility is taken care here already, but at that time it was in a (4.1) 4.1.0-r1 4.1.1 4.1.1-r1 of as described above, now on to the long thread on some hot topic :). So, I'll (4.2) [M]4.2.0_alpha20061014 benefits :). The most obvious one (to me at least) is "following the Gentoo spirit"

Ada User Journal Volume 27, Number 4, December 2006 212 Ada Inside

— that is providing as much choice as AdaCore — Ada 2005 for The Register — practical. High-Integrity Real Time Mathematical Approaches to You can quickly test various compilers Systems Managing Defects (given general adherence to ARM of Ada packages it even may be possible to add Ada 2005 for High-Integrity Real Time September 20, 2006 non-gnat compilers to this mix) and how Systems (Video) the libs behave when built with, say, gnat- SPARK is featured in the article gcc-4.1.1 vs gnat-gpl-3.4.6.2006. Now Monday September 25, 2006 Mathematical Approaches to Managing that the infrastructure is in place you can An in-depth presentation by AdaCore Defects on The Register's developer site. even easily create the ebuild for your own senior software engineer, José F Ruiz, on package and enjoy this automation. Ada for embedded high-integrity real- Embedded Systems Design OK, this is already quite long, so I'll stop time systems. — Programming Real-Time here. You may also take a look at The talk covers: with Ada 2005 https://bugs.gentoo.org/show_bug.cgi?id= * The Ravenscar tasking profile September 19, 2006 111340 * Flexible real-time scheduling The article Programming Real-Time with this is the bug where most of the design algorithms * CPU clocks and timers Ada 2005 appears in Embedded Systems discussion took place. Beware — it is Design. quite a bit longer than even this * Timing events description :). * Flexible object-oriented features Safety-Critical Systems Oh, one more thing (to avoid possible Ada-Belgium — UML2 Symposium 2006 misconceptions). That long list of profile enforcing the different gcc SLOTs I cited above does URL: http://www.adacore.com/2006/10/24/ not mean that you can mix and match gcc Ravenscar Computational safety-critical-systems-symposium-2006/ version like the gnat ones — there is no Model Gentoo-wide setup like I just described Tuesday October 24, 2006 for gnat (and it would not make sense URL: http://www.cs.kuleuven.ac.be/~dirk/ Safety-Critical Systems Symposium 2006 system-wide). So, practically speaking ada-belgium/whatsnew.html AdaCore will present the following with gcc you do have the flexibility of 2006-11-08 papers at this event: building your system with any of them, but you pretty much have to stick to a The slides of the technical presentation at Ada 2005 for High-Integrity Systems particular version. Although you *can* the previous Ada-Belgium event are now By Jose F. Ruiz. occasionally use some other version for a available: "Correctness by construction: particular package. UML2 profile enforcing the Ravenscar Embedded Systems Computational Model", June 2006 Conference (Adobe Portable Document Format, pdf, References to 1520 KB). Updated the main page for the URL: http://www.adacore.com/2006/10/24/ 2006 Ada-Belgium General Assembly + embedded-systems-conference-2/ Publications technical presentation and the full Tuesday October 24, 2006 announcement of the technical AdaCore — GNAT Pro presentation as well as the Ada-Belgium Embedded Systems Conference Insider Meetings and Conferences page. AdaCore’s CEO, Dr. Robert B.K. Dewar will present a 90 minute class on: RSS Feed: AdaCore Developer Center CrossTalk — AdaCore Safety-Critical Design Techniques for GNAT Pro Insider Nov 2006 issue Quality Process Secure and Reliable Systems available AdaCore will be exhibiting at DSO world Thursday November 30, 2006 http://www.adacore.com/2006/10/31/ada core-quality-process/ (station #3 in the DSO Pavilion) April 6 The November 2006 issue of the GNAT AdaCore Quality Process Franco Gasperoni will be presenting the Pro Insider newsletter is available for following paper at the 12th IEEE Real- Tuesday October 31, 2006 download. Contents: Time and Embedded Technology and * GNAT Pro and Ada 2005 Coming to The Nov 2006 online issue of CrossTalk Applications Symposium (taking place in .NET sees an interesting article on AdaCore’s parallel to ESC) April 4–7, 2006, * GNATstack Tool Available quality assurance processes and tools: Fairmont Hotel, San Jose, CA: * New GCC Technology “A software product is rarely a static Safety, Security and Object Oriented * What’s Coming in GNAT Pro 6.0.1 artefact resulting from a one-time effort; it Programming * New Version of gprmake needs to evolve via periodic updates, to http://www.embedded.com/esc/sv/ * New Version of GNAT Tracker correct defects or meet new requirements, * Spotlighting a GAP Member and it may need to be ported to multiple * AdaCore at Conferences machines and/or operating systems. The * Interview with Bob Duff development team might be distributed Ada Inside * Public Courses at AdaCore New York geographically, requiring careful * New Target Platforms for GNAT Pro coordination. A software producer must BAE Systems uses * More Ada 2005 Features Available in have well-defined processes for dealing VectorCAST for testing GNAT Pro with these issues, to ensure that its To download the newsletter please [go to products successfully meet users’ needs.” http://www.vectors.com/pdf/bae_pr.pdf http://www.adacore.com/home/company/ The full article is available here BAE Systems uses VectorCAST for press-center —su] testing [http://www.stsc.hill.af.mil/crosstalk/2006 /11/0611dewar.html] Mission critical Software

Volume 27, Number 4, December 2006 Ada User Journal Ada Inside 213

North Kingstown, RI – September 2006 – line of products, reduce the burden placed “It is an honor to be selected by Wind Vector Software Inc., a leading provider on individual developers by automating River as a Platform Partner,” stated Gary of software test tools for embedded and standardizing application component Cato, Aonix manager of strategic systems, today announced that BAE level testing. This innovative technology alliances. “Plans are already underway for Systems has successfully used its developed by Vector represents the "next a joint safety-critical Java solution. VectorCAST product for testing safety generation" of intelligent embedded Current Ada customers are enquiring critical software applications for the software test tools. The tools support Ada about the potential of PERC, and C/C++ Hawk and Eurofighter aircraft. 83/95, C/C++ and Embedded C++ developers are eager for a better solution BAE Systems has been using (EC++). for their mission- and safety-critical VectorCAST since July 2003, for module The market focus of Vector is on applications as well. We look forward to and SW-integration testing. The software companies performing embedded systems expanding this interest to the larger Wind tested with VectorCAST is primarily development for aerospace, military, River audience.” written in Ada and Ada 95, and runs on medical, telecom, and process control “Safety critical expertise and ability to PowerPC targets. related projects. address customers with large or complex According to Bill McCaffrey, Director of Vector Software’s Product Family projects sets Aonix apart from other Sales for Vector Software, Inc., “We are vendors,” said Chip Downing, aerospace VectorCAST/Ada & defence industry marketing manager at extremely proud of our role as a VectorCAST/C technology supplier to BAE Systems. Wind River. “Aonix’ development tools, VectorCAST/RSP especially the newer PERC real-time and VectorCAST was specifically designed to VectorCAST/Cover support testing of complex avionics safety-critical products, offer significant MC/DC add-on capabilities help to VxWorks platform users wanting projects. Our robust integration with the DO-178B Qualification Packages Green Hills crossdevelopment tools, and to move up to a more modern, cost- effective development solution for ever- the uniquely position VectorCAST to Aonix Listed With Top support projects such as Hawk and increasing levels of complexity.” Eurofighter." Wind River Software PERC Ultra is the ideal solution for About Hawk Partners embedded applications of high complexity, thanks to PERC Ultra’s The Hawk aircraft, is an advanced two- http://www.aonix.com/pr_09.25.06a.html predictable performance and its extensive seat weapons systems trainer with Aonix Advances to Wind River Platform support of off-the-shelf J2SE libraries and enhanced ground attack capability. The Partner Status components. Its sister product, PERC aircraft provides fighter lead-in training Pico, meets the needs of resource- and navigator and weapons systems Aonix Listed With Top Wind River constrained hard real-time applications, operator training. Software Partners featuring performance and footprint About Eurofighter Typhoon San Diego, CA, September 25, 2006 characteristics comparable to C. PERC Pico is smaller and faster than any other Aonix®, today announced a decision to Eurofighter Typhoon is the world’s most real-time virtual machine, yet it preserves strengthen its long-time partnership with capable and dynamic -role combat key virtues of Java™ such as portability, Wind River Systems, Inc. (NASDAQ: aircraft. Developed by Germany, Italy, reliability, and scalability. Spain and the UK, the Eurofighter WIND), the global leader in Device Typhoon will fulfill European Air Force Software Optimization (DSO). Aonix is PERC Ultra and PERC Pico are requirements well into the mid-21st the provider of the PERC® real-time interoperable within a single application. Century. The aircraft is in full production virtual machines and ObjectAda® real- For the first time, it is now possible for and has been in service with all partner time and safety-critical solutions for Java developers to create complete Air Forces since 2004. 638 aircraft are embedded targets. After years of serving complex applications from infrastructure under contract for the four Nations and as a Community Partner, Aonix will to the device level, without resorting to Austria, the first export customer. become a Wind River Platform Partner, the use of other languages with less the highest level of corporate partnership portability and robust memory use for About BAE Systems that Wind River extends to software specialized components. BAE Systems is an international company companies. The Platform Partner level of Shipping and Availability engaged in the development, delivery, and participation is by invitation only, and support of advanced defence and requires Platform Partners' technologies to PERC Ultra for VxWorks 6.x is shipping aerospace systems in the air, on land, at be aligned with Wind River products from now for Windows and Solaris hosts and sea, and in space. The company designs, roadmap through development, QA, and PowerPC targets with AOT and JIT manufactures, and supports military test to ensure seamless integration. compilation. PERC development tools are aircraft, surface ships, submarines, radar, available at no charge in combination Platform Partnership strategically avionics, communications, electronics, with a maintenance contract. Target positions Aonix with select upper-tier and guided weapon systems. It is a execution and deployment license pricing partners focused on driving joint business pioneer in technology with a heritage is based on projected volume. ObjectAda through one or more of Wind River’s stretching back hundreds of years and is Real-Time for VxWorks is shipping now. vertical market segments. Aonix at the forefront of innovation, working to addresses Wind River’s Aerospace and About ObjectAda® develop the next generation of intelligent Defence segment and offers years of defence systems. ObjectAda provides an extremely servicing many customers with Ada real- effective solution for developing portable, About Vector Software time and DO-178B certified development highly reliable, and efficient applications. Vector Software, Inc. is a leading solutions. Now, as a Platform Partner, Based on Ada 95, the first and only independent provider of automated test Aonix is closely aligned with Wind River internationally standardized object- tools for software developers. Established strategic direction for Java developers, oriented programming language in 1989 as a consulting and service providing industry-leading real-time (ANSI/ISO), ObjectAda is a truly multi- organization, Vector's product focus is to virtual machines and tools tightly coupled lingual environment. ObjectAda allows empower software professionals to deliver with the Wind River development and you to easily integrate Ada components the highest quality software in the least execution environment. with components written in Java, C, C++, amount of time. Vector's "VectorCAST" FORTRAN, and other languages for

Ada User Journal Volume 27, Number 4, December 2006 214 Ada in Context multi-lingual development. And for running Java™ programs deployed attractive treatment and various ObjectAda works directly with today and has the largest number of advantages which include a company car, commercial off-the-shelf libraries, certified Ada applications at the highest a GSM and standard benefits such as components, and . level of criticality. Aonix also offers the luncheon vouchers, Group insurance, For any platform, ObjectAda features a TeleUSE line of Motif graphical user extra legal medical insurance, fast, open library model that is fully interface development solutions. supplementary days off. compatible with other languages, high- Headquartered in San Diego, CA and Paris, France, Aonix operates sales offices Several developers are needed to increase speed intelligent compilation, hyperlinked staffing levels on an air traffic control semantic browsers, syntax-directed throughout North America and Europe in addition to offering a network of program in development (planned to go editors, integration with configuration operational in the USA in 2009). The managers, and instant access to standard international distributors. For more information, visit www.aonix.com. software is primarily written in Ada but APIs. On all platforms, application also has interfaces with C++ components. generation is optimized for reliable, The work consists of a mix of debugging seamless execution of thread-aware Indirect Information on Ada and fixing problems, and new applications within a safe and secure Usage development. At least 6 months of Ada operational environment. experience is essential. [Extracts from and translations of job-ads About PERC® and other postings illustrating Ada usage From: jtg First introduced nine years ago, PERC is around the world. —su] Subject: Some Ada jobs statistics the most widely used real-time Virtual Date: Sat, 04 Nov 2006 10:42:43 +0100 [...] Advanced /analyst Newsgroups: comp.lang.ada Machine available for Java developers, needed who will perform software with fielded installations in development or software development Some interesting Ada statistics gathered telecommunications, telematics, avionics, support activities using the Ada from job advertisements with "Ada" deep space exploration, and office programming language. requirement. automation applications. PERC supports most major real-time operating systems Needs to be an experienced user of UNIX http://www.itjobswatch.co.uk/contracts/ and a variety of target processors and Ada, and have solid programming uk/ada.do including PowerPC, XScale, ARM, and experience in large scale development. http://www.itjobswatch.co.uk/jobs/ Intel x86 architectures. Knowledge of air traffic control systems uk/ada.do PERC Ultra is a virtual machine and development a plus. toolset expressly created for demanding Candidate must have experience Ada in Context embedded and real-time systems requiring developing large systems and be able to J2SE™ support. PERC Ultra delivers the work with a large team of developers. ease and efficiency of Java™ Standard Consolidated Ada 2005 Edition support without sacrificing Candidate must have knowledge of Standard integrity, performance, or real-time software development methodologies. behavior. It offers AOT and JIT BS degree in Computer Science, IT, or URL: http://adaic.com/whatsnew.html compilation, remote debug support, other technical field required. November 10, 2006 deterministic garbage collection, standard graphics and extended commercial RTOS Within our aeronautics skills centre, we The final version of the consolidated support. The PERC product line also need Ada 83 or 95 software engineers standards for Ada 2005 was posted. These features PERC Pico, a virtual machine specialised in Ada design and documents combine the Ada 95 Standard, designed for hard real-time applications development. Technical Corrigendum 1, and requiring fast execution, small footprint, Projects are varied and could reach Amendment 1. and access to low-level devices. managerial responsibilities depending on When was Ada first PERC Ultra is available for Wind River your experience. VxWorks 6.x. PERC Ultra is the industry- You will be part of engineers team standardized? leading real-time virtual machine, designing and developing new From: "Jeffrey R. Carter" featuring the predictable performance architectures, or working on others critically needed for complex embedded projects involving methodology and Subject: Re: Basic Explaination of OO in applications. PERC Ultra offers the quality. Ada predictable performance and high levels Experienced in Ada design, we propose Date: Tue, 19 Sep 2006 20:33:14 GMT of reliability fundamental to the military you to join our team working on most Newsgroups: comp.lang.ada and aerospace markets where the challenging projects, in the highest speed > C was invented 1973 and Ada 1983 VxWorks device software platform area (space and avionics) and the railway dominates. The high productivity required sector. Knowledge in aeronautic or MIL-STD-1815: The Ada Programming for these markets is supported by broad military standards or railway standards is Language; 1980 Dec 10. off-the-shelf Java™ component access a plus. made possible with PERC Ultra. From: Randy Brukardt Profile: About Aonix Subject: Re: Basic Explaination of OO in You are Industrial Engineer (Ing) or Civil Aonix is a leading global supplier of Ada Engineer (IR) with good knowledge & Date: Wed, 20 Sep 2006 20:37:46 -0500 technologies supporting the development experience in Ada 83/95 (min 3 years). of sophisticated applications primarily in Newsgroups: comp.lang.ada the real-time and embedded domains. Our Very good communication skills and > Well that makes it 3 years for Ada to mission- and safety-critical solutions English speaking are mandatory as the move from the it's beginnings to ISO- serve industries such as development is done on a very Standard — and 16 years for C. telecommunications, military and international and multi-site basis, with aerospace, and transportation. Aonix frequent meetings and close interactions. The ISO standard for Ada was approved delivers the leading high-reliability, real- in 1987; it was the MIL-STD-1815A that Besides a personalised career plan with was approved in 1983. While the content time embedded virtual machine solution real evolution prospects, we offer you an

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 215 was identical, it took 4 extra years for ISO Subject: Re: GNAT compiler switches and From: Gautier de Montmollin approval. optimization Date: 20 Oct 2006 14:09:45 +0200 Subject: Re: GNAT compiler switches and About the Abs operator Newsgroups: comp.lang.ada optimization > Running them on 800×800 matrices (on Date: Fri, 20 Oct 2006 21:51:13 +0200 From: Robert A Duff my 2GHz laptop) for Ada: "tst_array Newsgroups: comp.lang.ada Subject: Re: Why is abs an operator, not a 800" runs in 18 seconds for Fortran Just a detail (should not make much, but function? "tst_array 800" runs in 6 seconds who knows with Ada.Text_IO): the timer Date: Wed, 18 Oct 2006 21:45:24 -0400 (if I use the fortran "matmul" intrinsic should be stopped just after the Newsgroups: comp.lang.ada the fortran time drops to 2.5 seconds). multiplication and before any output. This > Why is abs an operator and not a Note, I tried reordering the loops, little bug is in both Fortran and Ada code function? Just wondering. removing the random calls, etc. none (in the Ada code the finish time is even An operator _is_ a function. So the of which made huge changes. There is taken twice). question really is, why is the name of the something killing performance and/or a From: Gautier de Montmollin abs function an operator symbol (a switch or two that I'm missing, but I reserved word) rather than an identifier? can't seem to find it. Any thoughts? Date: Fri, 20 Oct 2006 21:32:26 +0200 In early (pre-1983) versions of Ada, Abs First of all, what you measure is not only Subject: Re: GNAT compiler switches and was not an operator — just a normal the matrix multiplication time but also the optimization function with identifier Abs as its name. I operation of filling the matrices with Newsgroups: comp.lang.ada think it was changed to make random numbers. I've moved the "start" > In some cases, -O3 is slower than -O2. implementations easier — initialization after the matrices You could try that experiment. implementations usually special-case the initialization. Is the Fortran compiler generating overloading resolution for operator The following optimizations make the array-bounds checks? If not, pragma symbols, since they are so heavily difference smaller (9.47 seconds for Suppress(All_Checks) in the Ada overloaded. Maybe the fact that all Fortran vs. 11.90 seconds for Ada on my version will make the test more fair. predefined functions are operators machine): Thomas mentioned the -gnatp option, that simplifies that. Not a big deal, but it does - use -fomit-frame-pointer on gnatmake has the same effect as "pragma have a certain uniformity — e.g. "not" is command line (this doesn't change Suppress(All_Checks)" in the source. an operator symbol, too, and works the anything in the Fortran case) same way as "abs". From: Samuel Tardieu - add: pragma Convention (Fortran, Subject: Re: GNAT compiler switches and Ada vs. Fortran Real_Matrix) to invert the storage method optimization performance (line vs. column); I guess this helps Date: 20 Oct 2006 14:18:14 +0200 maintaining more data in the cache Newsgroups: comp.lang.ada From: Duncan Sands - use 1 .. N as loop indices instead of Oh, also this one lowers the Ada Subject: Re: GNAT compiler switches and A'Range (1) and friends; this is more execution time by around 10%: do not use optimization equivalent to the Fortran code you posted an unconstrained type and do not use Date: Fri, 20 Oct 2006 13:42:23 +0200 Still, this is a huge penalty for Ada. pointers. Newsgroups: comp.lang.ada Unfortunately, I don't have the time to N: constant Positive := > I'm a bit stuck trying to figure out how investigate further right now. However, I Positive'Value (Argument (1)); to coax more performance out of some would be interested in other people Ada code. I suspect there is something findings. G : Ada.Numerics.Float_Random. simple (like compiler switches) but I'm Generator; From: Gautier de Montmollin missing it. As an example I'm using a type Real_Matrix is array simple matrix multiply and comparing Date: Fri, 20 Oct 2006 14:12:26 +0200 (1 .. N, 1 .. N) of Float; it to similar code in Fortran. Subject: Re: GNAT compiler switches and pragma Convention (Fortran, Unfortunately the Ada code takes 3–4 optimization times as long. Real_Matrix); Newsgroups: comp.lang.ada A,B,C : Real_Matrix; GNAT GPL 2006 is based on gcc 3.4.6. One thing is already that you start the For fortran you are using gcc 4.2.0. Try timer at the wrong place. You should start And as Duncan says, you should try with using comparable compiler versions, eg: it after filling your array with random a newer backend for Ada. an Ada aware gcc 4.2.0 (several linux numbers. In the present state you compare From: Jeffrey Creem distributions provide this) or a gcc 3.4.6 the random generator, then your matrix version of fortran (i.e. some version of multiplication. It is possible that Date: Fri, 20 Oct 2006 11:56:50 -0400 g77). Ada.Numerics.Float_Random.Random Subject: Re: GNAT compiler switches and From: Martin Krischik takes significantly more time due to Ada's optimization quality requirements in the random Newsgroups: comp.lang.ada Subject: Re: GNAT compiler switches and generation. I built the gcc "head" from gcc SVN with optimization On the other hand, switches you can try GNAT and Fortran to compare the same Date: Fri, 20 Oct 2006 17:41:12 +0200 are: versions (at least as much as possible). Newsgroups: comp.lang.ada -O2 instead of -O3, -funroll-loops I moved the start timing calls after the Indeed: (usually good) -ffast-math, for both Ada array allocation and filling so we just GNAT/GPL: 12.265258000 sec. and Fortran -gnatn, for Ada timing the matrix multiplication GNAT/GCC: 10.631787000 sec. Since you are measuring real time and not I moved the timing calls to make sure we So who said the 4.1.x compiler are CPU time, you might want also to take a were not timing IO in either case (both slower. bit larger matrices in order to have disk original versions were timing part of the From: Samuel Tardieu swaps and rests of initializations effects "put"). statistically small.

Ada User Journal Volume 27, Number 4, December 2006 216 Ada in Context

I replaced the "random" data with some uglier and more verbose so it is not with the output of GNAT as well but in fixed sane data just to be sure there was surprising that the optimizer is unable to this case it is not great. no funky "denormal" stuff happening that fully clean things up resulting in the Further, I tried playing a bit with the new changed the speed. explosion of instructions at the assembly autovectorization capability of the near Very little change in the order of level. 4.X series of GCC (has to be specifically magnitude that the original poster was From: Jeffrey Creem enabled) and found that even very very seeing (I pretty much get results with trivial cases would refuse to vectorize GNAT running about 2.6 times slower) so Date: Sat, 21 Oct 2006 12:35:54 -0400 under Ada (though after I submitted the it was time to look at the assembly. Subject: Re: GNAT compiler switches and bug report to GCC, I found that Fortran I find it easier to read ass.embly using sse optimization fails to vectorize these too). math so building Gnat via Newsgroups: comp.lang.ada One thing everyone needs to remember is gnatmake -g -f -gnatp -O3 > There is something strange. Martin that this example was (probably) not -march=pentium4 -fomit-frame-pointer Krischik was able to trim the overall "Find the way to get the smallest value -mfpmath=sse tst_array time for the Ada code down to 24% of out of this test program" because there are the first version (GNAT/GCC 4.1.1). always ways of doing some tweaks to a and Fortran via: This should make the Ada program as small enough region of code to make it gfortran -O3 -g -march=pentium4 -fomit- fast as the Fortran one, shouldn't it ? better. If there is a 2-4x global slowdown frame-pointer -mfpmath=sse –c Maybe it's because the test is done on a in your 100KLOC program, you will tst_array.f95 64 bit machine ? It needs some never "get there" following the reconciliation. A good thing in that conventional wisdom of profiling and and then using discussion would be that everybody looking for the problems. objdump -D -S tst_array.o shows each time Now, I am not suggesting that GNAT is to look at them, you pretty quickly can - which GCC version globally 2–4x slower than GFortran or see the problem. - which machine anything like that (since that does not line - the execution time of the up with what I have generally seen on The "inner loop" of the sse math [is 28 multiplication for both Ada and Fortran Instructions] vs. 8 for Fortran. [...] larger code bases), but, if I were a - which version of the Ada code (matrix manager picking a new language based on The GNAT version never stood a chance. on stack/heap, Fortran or Ada a set of long term goals for a project and It really seems like GNAT is dropping the convention) saw that GNAT was running 2–4x slower ball here. I'd certainly be willing to run a few and was still running 1.X to 3X slower Granted small benchmarks can really lead benchmarks but the important thing here after 2 days of Ada guru's looking at it, I'd one to believe things are better or worse is that rather innocent looking code is probably jettison Ada (I know, I am than the truth but I don't think there is running 2-4x slower than it "should". mixing compilers and languages here, but really an excuse in this case for this sort There are things that I think we can really in reality, that is what happens in the real of performance. rule out as being "the" factor. world) and go with something else. From: Jeffrey Creem 1) Random number generator — I did And before the chorus of "processors are timings (for both the Ada and Fortran) so fast that performance does not matter Date: Fri, 20 Oct 2006 19:52:54 -0400 with timing moved to only cover matrix as much as safety and correctness" crowd Subject: Re: GNAT compiler switches and multiply. starts getting too loud, let me point out optimization that there are still many segments of the Newsgroups: comp.lang.ada 2) Difference GCC versions — I built a industry where performance does still fresh GCC from the GCC trunk for both indeed matter. Especially when one is Note, I am the first one to jump to the Ada and Fortran trading adding a second processor to an defence of "Ada" in general but in this embedded box against a vague promise of case, GNAT just plain sucks compared to 3) The Machine — I am running both on the same machine, though I suppose there "betterness" in terms of safety down the GNU Fortran as it does a poor job on (at road. Ok …Off the soapbox. least) the inner loop (verified by looking could be differences in 32 bit v.s. 64 bit at the output assembly) comparisons. So, in closing, if someone thinks they have "the best" version of that program Jeff's (the other jeff :) modified version 4) Runtime checks — both the original author (and I) ran with checks suppressed they want timed against gfortran, post it looks a little cleaner and actually runs here and I'll run them. faster (than even old "fixed version" that 5) O2/O3 — Actually, I could look at this did not time the IO and made sure to just some more with some other versions but a From: Jeffrey Creem time the matrix multiply in both versions) quick look when I first started seemed to but it does not time the zeroing of the indicate this was not the issue. Date: Sat, 21 Oct 2006 17:22:05 -0400 Subject: Re: GNAT compiler switches and elements of C which would be required if A few other thoughts. this were a real matrix multiply routine optimization and not some test driver. Once the timing is limited to just the Newsgroups: comp.lang.ada matrix multiply the stack/heap thing > The first thing is to be sure that we are However, even having said that, this not 'should' generally not matter. running the same program. really equivalent version runs about 2x Running your program with the slower than the Fortran (with the same Some of the changes made to the Ada following changes (as done in Fortran): version of GCC) version make it not really the same 1. Using Sum tmp var for the program as the Fortran version and the computation I don't see any meaningful excuse for why same changes made to the Fortran one for I in A'range (1) loop GNAT should be slower in this case but it for J in A'range (2) loop would also cause it to speed up (e.g. not Sum := 0.0; clearly is. counting the the zeroing of the target for R in A'range (2) loop I tried looking at the tree dump generated array during the accumulation phase). Sum := Sum + A (I, R) * B (R, J); end loop; by the front ends prior to going to the I have certainly seen some amazing C (I, J) := Sum; optimizer step (not something I have a lot performance from some Ada compilers in end loop; of experience at) . One thing is clear is the end loop; the past and in general, on non-trivial 2. Using Long_Float instead of Float (I trees generated by GNAT is quite a bit benchmarks I am usually pretty happy

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 217

think Fortran float is a Long_Float, to the same thing with the same memory, sparing the reading of C(I,J) (must cost be checked). I went from 7.8s to 4.8s (with 1) and to access violations, etc.) I remembered that much time). If you are luckier, the 4.2s (with 2). Ada had tasking built in so I started optimizer will do playing with that. Now, as you can Sum:=0.0; Actually, the original poster's Ada probably tell from my code, I haven't for R in A'range (2) loop program had the temp var and all of my touched Ada in a _very_ long time, but it Sum := Sum + A (I, R) * B (R, J); comparisons of programs that I have end loop; was surprisingly easy set up a simple two- C (I, J):= C (I, J) + Sum; asserted were "the same" used the task test program. temporary. Anyway, using the latest code from But still, it won't spare the time lost to fill As for Long_Float v.s. Short_Float, Jeffrey Creem it looks like the execution the C matrix with zeros. If you want to do gfortran is using 32 bit floats (as verified time (on my machine) has been cut in a benchmark with Fortran, it's really not a by dumping the tree representation and half (9 seconds). The threaded version good idea to begin with "pessimizing" the assembly language). runs in nearly the same time for smaller Ada code. Since we are all getting a bit confused by problems but dies with a stack overflow From: Jeffrey R. Carter specific versions and numbers I thought for larger. I see a comment in the I'd post a summary and create a way of Bugzilla recommending a similar Date: Sun, 22 Oct 2006 20:26:41 GMT tracking more global performance issues construct Subject: Re: GNAT compiler switches and at the gnuada.sf.net wiki. type Real_Matrix is array optimization The direct link to these test results are (1 .. N, 1 .. N) of Float; Newsgroups: comp.lang.ada here: That takes the memory from the stack I did that in my 1st version. I wanted to http://gnuada.sourceforge.net/pmwiki.php rather than the heap though, no? I assume see if the optimizer would result in /Main/Oct2006CLAGFORTRANCompari there is a compiler switch to increase the equivalent code. No such luck. [...] son stack size so the code wouldn't die, but is The initialization of C is static, so a good that the "normal" way of allocating From: Jeffrey Creem optimizer could. They're hard to find, memory? I'm trying to not look like though. [...] _too_ much of an Ada neophyte :) Date: Sat, 21 Oct 2006 23:03:14 -0400 I'm more interested in seeing what makes Subject: Re: GNAT compiler switches and From: Gautier de Montmollin a difference in the Ada. In this case, the optimization high-level features that let you write less Newsgroups: comp.lang.ada Date: Sun, 22 Oct 2006 14:31:05 +0200 code. Subject: Re: GNAT compiler switches and Actually, as a result of this, I submitted a optimization From: Tom Moran bug report to the GCC bugzilla list. You Newsgroups: comp.lang.ada Date: Sun, 22 Oct 2006 13:01:53 -0500 can follow progress on it here: Subject: Re: GNAT compiler switches and > Adding the Sum variable makes an http://gcc.gnu.org/bugzilla/show_bug.cgi? optimization important difference, as others have Newsgroups: comp.lang.ada id=29543 reported, in my case from 5.82 to 4.38 Interesting initial feedback is that s. Hoisting the indexing calculation for Each 800×800 Float matrix is about 2.5 the result (C) matrix location is a megabytes so I would expect two threads 1) Not an Ada bug. to be fighting each other over the cache. 2) Is a Fortran bug optimization, and I would be surprised if it isn't done. The only thing I can What are the single vs. dual threaded 3) Is a backend limitation of the times for, say, 250x250 arrays and a 1 optimizer. think of is that it's a cache issue: that all 3 matrices can't be kept in cache at MB cache on your machine, and on the Of course, the Fortran one still runs once. Perhaps compiler writers would dual Xeon machine? correctly so I don't think most users will be able to make sense of this. Curiously, on a 3 GHz Pentium 4 with 1 care that it is because of a bug :) The Sum variable was *removed* by MB cache and compiling with -O2 -gnatp From: Thomas Krauss someone at some point of the discussion using the venerable gnat 3.15p, I get in order to challenge a bit more the Ada Time: 8.511855190 800 1 thread Date: 22 Oct 2006 04:48:36 -0700 compiler's optimizer. If you replace a Time: 5.682686332 800 2 threads Subject: Re: GNAT compiler switches and good algorithm by a bad one, don't be for a speedup of 33% optimization surprised that the program is slow. At Newsgroups: comp.lang.ada some point of bad coding the best code Time: 0.092724434 200 1 thread > If I inline the inner Multiply, or put optimizer won't be able to help you. Time: 0.059209520 200 2 threads equivalent code in the task and the Eventually the optimizer will transform for a speedup of 36% this: outer Multiply, the time is much more From: Jeffrey Creem than for the sequential version, for R in A'range (2) loop presumably due to cache effects. C (I, J) := C (I, J) + A (I, R) * B (R, J); Date: Sun, 22 Oct 2006 11:57:16 -0400 Since it appears you have 2 physical end loop; Subject: Re: GNAT compiler switches and processors ("Dual Xeon 2.8 Ghz"), I optimization would be interested in seeing what into something like: Newsgroups: comp.lang.ada effect this concurrent version has on Sum:= C (I, J); -- hopefully a Sum is that platform. I also wonder how easy --+ mapped to a register Followup on the bug report. such a version would be to create in for R in A'range (2) loop Sum := Sum + A (I, R) * B (R, J); One of the comments asserted that the Fortran. end loop; two programs were not equivalent though It's funny that you mention tasking since C (I, J):= Sum; I am not yet 100% convinced that I believe it yet. that's what got me started on this in the but in that case it probably won't be able first place. I was introduced to OpenMP to guess that the C(I,J) was zeroed before His recommendation was to remove a as a simple method of parallelizing code and replace the first line by: level of indirection by changing the way in fortran. Unfortunately it seems to be the array is declared. Sum:= 0.0; "tricky" to really get things in parallel N : Positive := Positive'Value (what data is shared, multiple tasks doing (Argument (1));

Ada User Journal Volume 27, Number 4, December 2006 218 Ada in Context

G : Ada.Numerics.Float_Random. Newsgroups: comp.lang.ada > What Ada 2005 language update(s) will Generator; type Real_Matrix is array When I started using Ada, I found exactly turn out to have the biggest impact on (1..N, 1..N) of Float; the same thing. Programs ran slower. programmer productivity? type Matrix_Access is access Real_Matrix; Sometimes much slower. Perhaps this is Depends on the field in which the A,B,C : Matrix_Access; the biggest single disadvantage of Ada programmer works. My top three with a Start, Finish : Ada.Calendar.Time; (GNAT) in practice, particularly for target desktop applications would be: Sum : Float := 0.0; heavy numerical codes (compared to begin 1) Interfaces A := new Real_Matrix; Fortran or C). 2) Container Classes Library B := new Real_Matrix; Looking closer, I found the assembly 3) Anonymous Access Types C := new Real_Matrix; output was sometimes littered with But if you do i.e. real-time work it will be This does indeed substantially improve apparently redundant or unintended something else. Ada is designed as a multi the performance (still not quite to Fortran function calls, extra checks and other paradigm language from the beginning levels). The reason I question the baggage. and as far as I know only Oz supports equivalence is that in the original version, The prevailing claims at the time were more paradigms as language feature (as the array could have been passed to a that Ada was roughly as fast as C, opposed to library features). So in every procedure that took in an unconstrained sometimes faster (because of deeper domain programmers will choose their array (which is pretty much what I think semantics). Whenever logically identical favourite new feature. the Fortran version would allow) while code was compared, however, the output this new version would not do that. From: Randy Brukardt assembly code was often identical, giving A quick check shows the Fortran is now the same performance. Subject: Re: Ada 2005 language update(s) only 1.2 times faster (did not do the In real code, I found big differences when & programmer productivity multiple run thing yet). Perhaps tonight. using enumerations instead of integers, Date: Mon, 6 Nov 2006 20:47:50 -0600 I'll also attempt to take one of the multi-dimensional arrays etc. And Newsgroups: comp.lang.ada threaded ones and include that as well. language-defined maths libraries, random I agree with this; real-time programmers number generators, I/O etc. all risked have very different requirements than Can someone that understands Fortran major slow-downs. better make an argument about the those on desktops or even soft-real time "closeness" of this approach vs. the other? The only solution I found was to examine servers. the output code, and modify the source From: Jeffrey Creem I would probably say "limited with" until I got code that was acceptable. (because it allows a natural structuring of Sometimes this meant dropping useful Date: Mon, 23 Oct 2006 07:55:49 -0400 interrelated packages that wasn't possible language features, or using less clear in Ada 95) and the containers library Subject: Re: GNAT compiler switches and constructs. optimization (because it makes something powerful Newsgroups: comp.lang.ada This is a real problem with the language available to everyone in a standard way). (Ada using GNAT). For a lot of > I doubt if anything will beat matmul But it's probably a little early to say (for applications, the optimisation effort isn't instance, I haven't used any new Ada (short of 640_000 processors). But Ada worth it. And even for performance with explicit loops and Fortran with features in programs yet). The biggest critical applications, most code is outside value may be in something that appears matmul are hardly equivalent. You of any hot-spots. need to convention-Fortran the Ada less critical now. array type, import matmul, and call it to I get the impression that Fortran is an get a fair comparison. There shouldn't excellent language for getting efficient About Ada Object- be much difference. code easily. C is also quite good. But Orientation features C++ and Ada both seem to "hand- I looked at the gcc Fortran matmul. holding" to keep them efficient. Perl is From: Jeffrey R. Carter Unless there some additional trickery the worst I know(!) going on behind the scenes, it is not anything magical. It looks like a matmul If you really care about performance, Subject: Re: Basic Explanation of OO in implemented in C with manual array you'll check the assembly code or Ada subscripting logic (i.e. uses a single compare against expectations. As you fix Date: Mon, 18 Sep 2006 20:25:44 GMT dimensional array overlay). unexpected bottlenecks, you'll find out Newsgroups: comp.lang.ada what type of code compiles well with > I'm new to Ada, having to learn it for In any case, it is not so much matmul I am your compiler, and write future code trying to make faster here but rather just work, and I am beginning to understand avoiding the problem areas. Of course, the language, I think. However, coming the nature of 2d array traversals in native when the compiler changes, you may find language structures. from C (and family) and Java and other the rules change and your old code "modern" languages, I can't seem to I just included the Fortran matmul to be appears quaint or idiosyncratic. wrap my head around Ada's OO "more than fair" to Fortran as I am in no The other posters to this thread have methods. Is it that there is simply way trying to bash Fortran. given some useful optimisations to your nothing like a class in C++ or Java? The speedup for the tasks is quite odd original code. Let us know whether this You should realize that what you're though. I'll need to disassemble it tonight. bridges the performance gap for you! asking about is not OO, but programming I also just finished a 4.0.2 install last night by extension. Because "OO" became a so I'll get those numbers to see if all of Programmer productivity in synonym for "good", and early examples this mess is simply a regression Ada 2005 of OO were shown in languages that someplace in the compiler. supported (or required) programming by From: Martin Krischik extension, programming by extension got From: Dr. Adrian Wrigley called OOP, but that is a misnomer. Subject: Re: Ada 2005 language update(s) Date: Sat, 21 Oct 2006 12:39:30 GMT Programming by extension does not & programmer productivity necessarily have anything to do with Subject: Re: GNAT compiler switches and Date: Sat, 04 Nov 2006 19:12:20 +0100 optimization object orientation. Programming by Newsgroups: comp.lang.ada extension is an implementation technique.

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 219

Object orientation is a design attribute and type Pointer_To_T is access for J in V'Range loop all T'Class; if V (J) /= null then may be implemented without using type Reference_To_T is access Pak.P (V (J).all); programming by extension. all T'Class; -- dispatches on the end P; --+ specific type of the object From: Lucretia end if; Subject: Re: Basic Explanation of OO in Programming by extension does not end loop; Ada necessarily involve inheritance. Consider: end Traverse; end Collection; Date: 18 Sep 2006 20:32:15 -0700 package Pak2 is Newsgroups: comp.lang.ada type T is private; From: Maciej Sobczak -- not necessarily tagged This is very true and a lot of programmers procedure Proc (Object : in T); don't realise they can develop in an OO private Subject: Re: Basic Explaination of OO in way in asm or C (or any procedural type T is ... Ada language). end Pak2; Date: Wed, 20 Sep 2006 09:16:22 +0200 package Pak2.Extensions is From: Jeffrey R. Carter procedure Additional_Operation Newsgroups: comp.lang.ada (Object : in out T); > Here's another interesting tip for C++ type Extended is record Subject: Re: Basic Explanation of OO in Base : T; programmers. In C++, once you declare Ada Additional_Data : ...; a member function to be "virtual", all Date: Tue, 19 Sep 2006 20:45:56 GMT end record; calls to that member function dispatch Newsgroups: comp.lang.ada end Pak2.Extensions; dynamically, across the entire program. OO is encapsulation of data and the This is extension by composition, as Except when you ask it otherwise by operations on those data. In Ada 83, this opposed to inheritance. Of course, you qualifying the function name at the call was done through abstract state machines already understand how to program by site, see below. (package as object) or abstract data types extension by means of inheritance. there > Conversely, if a member function lacks ([limited] private type and corresponding are still other ways, like "mix-ins", which the "virtual" keyword, calls to it are operations). In assembler or C it's done combines composition and inheritance. always static. The only way you can through discipline. > One thing I'm still confused on is the determine whether calls dispatch Programming by extension is the use of use of access objects versus/with the statically or dynamically is by looking type extension (type X is new use of object'Class. I understand using at the declaration of the member Tagged_Type with ...;), also called object'Class for polymorphism and function. Things can become quite inheritance. Dispatching (also called inheritance, but can access objects be nasty if a class overrides an inherited, polymorphism) can also be part of this, used in a similar manner? non-virtual member function, and but in Ada, much of what would be I think about it this way. An object of a makes it virtual. dispatching calls in other languages are class-wide type is indefinite; we do not Yes, it becomes nasty. It's a classical no- static. know its size, because its specific type no for C++ programmers. Ada also has package extension (child may be anywhere in the inheritance tree. > I'm not even sure what the language packages) as a form of programming by In contrast, an access-to-class-wide-object rules are in this case. extension. has a known size (usually just that of an address). As a consequence, you can The static type used to call determines From: Ludovic Brenta create arrays of access values, but not arrays of class-wide objects. the static type (of the pointer or reference) Subject: Re: Basic Explanation of OO in that allows to check whether the function Ada So, access types are not necessary to is virtual. Date: 19 Sep 2006 08:31:20 -0700 achieve polymorphism; the following Newsgroups: comp.lang.ada achieves polymorphism without an access > In contrast, in Ada, you do not declare type: primitive operations as "virtual", or > So basically, OO is the principles: "dynamic" or whatever. Instead, you * polymorph, package Pak is type T is tagged private; choose *at the point of call* whether or * encaps, procedure P (Object : in out T); not the call dispatches. Consider: * inheritance. -- primitive operation with Pak; use Pak; And Programming by extension is the end Pak; -- body omitted procedure Test way to do it in Ada, as class something: with Pak; procedure Test (Object : in out T'Class) is {} (Object : in out Pak.T'Class) is begin would be in C++? begin P (Object); -- dynamic dispatch Pak.P (Object); Not exactly. That construct in C++ -- dynamic dispatch P (T (Object)); -- view conversion to corresponds to several of Ada's --+ achieves polymorphism --+ a specific type => constructs: end Test; --+ static dispatch end Test; - a class in C++ is a unit of encapsulation, Access types come in handy if you want a since it has public, private and protected collection of class-wide objects; the Similar for C++: parts. In Ada, packages, not types, are the collection is said to be polymorphic: p->fun(); // dynamic dispatch if in *p fun units of encapsulation; they have public, with Pak; // is virtual body and private parts (respectively). package Collection is p->BaseClass::fun(); // no dynamic - a class T in C++ corresponds to a tagged type Ref is access Pak.T'Class; -- access-to-class-wide-objects // dispatch type in Ada, but it also implicitly declares type Vector is array a pointer type (T*) and a reference type (Positive range <>) of Ref; > Consequences: (T&) which correspond to Ada's class- -- polymorphic vector - you always know whether or not the wide access types; thus: procedure Traverse call dispatches dynamically by just (V : in Vector); looking at the call class T {}; end Collection; package body Collection is - you can choose how to dispatch based is equivalent to procedure Traverse on your requirements package P is (V : in Vector) is - a primitive operation cannot be type T is tagged null record; begin "virtual" in some contexts and "non-

Ada User Journal Volume 27, Number 4, December 2006 220 Ada in Context

virtual" in others. It is always a replacement for these packages that will to Linux. It is just a totally different "potentially virtual". make the compiler AND the linker architecture. Firstly you need Windows From: Ludovic Brenta know about in our effort to complete this don't have it. This makes the chances even Subject: Re: Basic Explanation of OO in port? lower than zero. So, probably, as others Ada From: Howard have proposed, you should redesign the Date: 19 Sep 2006 09:06:33 -0700 program with OS-portability in mind. Ada Newsgroups: comp.lang.ada Subject: Re: Porting Ada code to Linux offers you an excellent support here. > Although you can only have vanilla Date: 31 Oct 2006 09:38:14 -0800 There is another option, not mentioned arrays of definite types, you can have Newsgroups: comp.lang.ada before. I can't tell how realistic it is, but more sophisticated containers (for I work with Bill, and I wanted to provide anyway, there are Windows for example a more detailed expansion of our Linux. Wine is one. I never used Wine, Ada.Containers.Indefinite_Vectors) situation; but it looks that apart from its main that store class-wide types in Ada 2005: purpose of being a Windows emulator, We are porting from a Windows-95 Wine also supports porting [for lazy ones package Pak_Vectors is new "legacy" system to a new Linux one. The Ada.Containers.Indefinite_Vectors (:-))]. I'd suggest you to take a look at code we are re-writing is , Winelib (Positive, Pak.T'Class); and we are translating it into C++. But, In this case, however, you store copies the VB code had a dependency on a http://www.winehq.org/site/docs/winelib- so some overhead can occur, but in considerable amount of Ada 95 code that guide/index many cases it can be more convenient the VB code interfaced with via DLLs. From: Gautier de Montmollin than starting to play with pointers. We need to port this Ada code over, also. Doesn't We have decided, given that there is Date: Tue, 31 Oct 2006 21:29:06 +0100 Ada.Containers.Indefinite_Vectors have between 45 and 55 thousand lines of Ada Subject: Re: Porting Ada code to Linux to declare a class-wide access type for its code, with its attendant complexity, to Newsgroups: comp.lang.ada internal use? I'd guess so. But, it hides the simply use the Ada code as is without re- > They are not Ada libraries but Ada access type from the user, and that's writing it into C++. This Ada code bindings. And the real problem you are encapsulation at its best. depends on some files, also written in going to have is to find a replacement In Ada, one rarely needs access types at Ada, that then have some pragmas to a for the Libraries those binding are all. The only justification for declaring Visual C++ library, "winbase.h"... binding to. one is because you're doing some kind of The Ada libs are; i.e. for Win32* you will need a Linux dynamic data structure and allocating replacement for "win32.dll". dynamically on the heap. With the Win32 I like to point out that you would have standard Ada.Containers, you'd need Win32-Utils the same problem if the code was access types even less often. Win32-Winbase (pragmas to VCPP written in C (so it would be unfair to winbase.h lib) say "damn you Ada") in which case you That's why in my examples I did not Win32-Windef declare an access type along with the would look for a replacement of Win32-Winnt "windows.h" and it's friend. It's low tagged type (in package P); instead, I Stdarg declared an access type in another level access and it just Stdarg-Impl isn't there in Linux. package (package Collection) because Stdarg-Inst that package absolutely needed one. The bad news is: You need to replace it Stdarg-Machine all with low level Linux access. Porting Ada code to Linux These are all Ada packages, and these And also to be mentioned, the good news name represent specs, and bodies, so are: most of the code (the parts not bound From: Bill named. to Win32) will be very easy to port, and Subject: Porting Ada code to Linux So, we are going to have to compile the that is because it is in Ada. Date: 31 Oct 2006 06:17:46 -0800 Ada code, then link it with the new C++ From: Steve Newsgroups: comp.lang.ada code. We are using the GNU-G++ Subject: Re: Porting Ada code to Linux We have some code (about 60K lines) compiler linker, and we will need to be Date: Tue, 31 Oct 2006 19:28:41 -0800 that was written for use on the Win95 able to link in the Ada object files with Newsgroups: comp.lang.ada platform as a collection of DLLs. We are our C++ files. We have to find a way to My first response is: it is unfortunate that now in the process of porting the parent replace, or port, the mentioned Ada libs. the Ada code was programmed with direct application to Linux and would like to The "Winbase" dependency on the Visual dependencies to these interface modules reuse the Ada code. The legacy code was C++ files is problematic, at best. (apparently) scattered about the system. written using the Aonix ObjectAda A better approach is to create a more compiler/IDE and references packages So, again, any insight that can be generic binding to the system dependent like Win32 and Win32.Windef. provided would be greatly appreciated. You can write me directly. interfaces to ease porting. We have been able to move the code over Given that you are talking about tens of to the Linux side and compile using the From: Dmitry A. Kazakov thousands of lines of code, I would GNU Ada compiler. However, to get this suggest attempting to create such an far we also had to copy the Subject: Re: Porting Ada code to Linux interface module with the existing code. aforementioned "Win" packages over too. Date: Wed, 1 Nov 2006 10:03:24 +0100 Remove all references to the existing Clearly, this seems like the wrong thing to Newsgroups: comp.lang.ada Win32 and Stdarg stuff. The compiler do, but it did get the compile to work. OK, that's Windows API interface. It is no will help by telling you where things need The problem is that we are receiving a fair language issue. to be "fixed up". number of linker errors that seem to point Depending on what was used in the to the file winbase.h. While this may sound like a daunting application, there might be no chance to approach, in my experience this approach So, it seems like there should be a Linux port it at all. It is not Ada, but an OS- is not as bad as it sounds. It's a bit equivalent of Win32, but we have not specific problem. Honestly, I know no tedious, but really doesn't take that long. been able find it. Can anyone point us to way to port, say, Window's SendMessage

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 221

For example eliminating the "With" thoroughly confusing and so I have In part, that follows from my opinion that statements will immediately identify never attempted to do so.) there should be no access types in the vast things that need to be re-defined in an OS Yes of course: majority of reusable Ada packages (if the independent manner. The first compile user needs dynamic allocation, they can may give you a LOT of errors, but often C : access Integer; provide it). Of course, the implementation fixing one error fixes many. When a ... of the such a package might have some problem is identified, similar problems C := new Integer'(12); access types, but those might as well be may often be corrected with a search and > With anonymous access types the named (there is no need for implicit replace in an editor. programmer must maintain the conversions there). From: Dr. Adrian Wrigley association between allocated instance One of the reasons I feel this way that and its pool. You can only allocate access types are inherently less safe than Subject: Re: Porting Ada code to Linux from a pool, and you must deallocate to direct use of objects (because of the Date: Tue, 31 Oct 2006 20:21:36 GMT the same pool from which you possibility of dangling pointers). And they Newsgroups: comp.lang.ada allocated, so at some point there needs force the customer of an abstraction to do to be a conversion between the memory management (or unsafe Rather than trying to convert the VB into anonymous access type and the named C++, keep the Ada, convert the Ada into programming with very ugly calls) even access type (with which the storage when an stack-based allocation is fine. Linux and glue the C++ to the Ada, why pool is associated). don't you convert the VB into Ada? The reason anonymous access parameters I do not follow. The conversion will were invented was because some people You don't seem to have a strong technical change nothing: reason to combine C++ and Ada, since wanted to copy dubious OO designs from C++ isn't a current implementation 1. you allocate an anonymous access from C++ directly into Ada without appropriate language. Because C++ and Ada have a "compiler specific pool A" conversion. Which just brings the flaws of similar capabilities ("modern" compiled those designs into Ada — yuck. And, yes, 2. you convert the anonymous access type I was against the expansion of the uses of OO languages), the technical advantages to a named access type : NAT of mixing them in new code are minimal. anonymous access types in Ada 2007. I Mixing languages always has a cost – 3. you deallocate NAT from a "compiler lost that discussion primarily because I staff training, reduced compiler support, specific pool B" didn't have a reasonable alternative for the tricky interfaces, whatever. This will allocate and deallocate on second bullet above. Since you plan to convert to C++, you different pool. And AFAIK there is no From: Randy Brukardt must have good reasons. Political? Skills way to specify the anonymous access type sets? Anyone well skilled in both C++ pool. Subject: Re: generic question and Ada would keep it all in the same I don't see a solution to that problem at Date: Tue, 28 Nov 2006 15:23:07 -0600 language (Ada), or have a really good the moment ... or I'm confused :) Newsgroups: comp.lang.ada justification already for mixing From: Pascal Obry > Was it so important to compensate for (interfacing to existing, complex C++ Date: Tue, 21 Nov 2006 18:12:54 +0100 all disadvantages access types bring libraries without Ada bindings, perhaps). Subject: Re: generic question with? But since you haven't chosen the Linux Newsgroups: comp.lang.ada I guess so. The second bullet is about libraries yet, this can't be why. [...] You are saying that for every cases where an access type needed to be I suspect you want to move to C++ for a anonymous access type you need to exported anyway; there's no expansion in mixture of political and skills reasons, but declare a named access type from which use implied. Limited with doesn't allow this really warrants planning to rewrite allocate/deallocate. One point of the exporting an access type (and we tried a *all* the Ada, in due course. History anonymous access type was to avoid number of ways to allow that, but they suggests this is an unsound approach proliferation of named access type. didn't work without causing when existing code works broadly as implementation and use problems — for needed. If politics is absent, do it all in I find anonymous access type less useful instance, it wasn't possible to determine Ada, getting necessary skills from this way. Why even bother with them? the appropriate storage pool). One could outside. From: Randy Brukardt argue that programmers shouldn't be exporting access types in the first place, How to use anonymous Subject: Re: generic question but that would not reflect the way many access types Date: Wed, 22 Nov 2006 17:58:24 -0600 programmers use Ada. And efforts to Newsgroups: comp.lang.ada force people to do the right thing tend to be doomed – better to avoid hamstringing From: Pascal Obry > Because you can derive pointers Date: Sun, 19 Nov 2006 23:07:58 +0100 people (which might cause them to without allocation. change to a less well-designed language). Subject: Re: generic question E.g. self references of limited types. Newsgroups: comp.lang.ada From: Randy Brukardt Well, that's one use. There are three [...] There is no way to instantiate others, IMHO: Unchecked_Conversion with an Subject: Re: generic question anonymous access type. This is something * To stand in for the lack of "in out" Date: Wed, 22 Nov 2006 18:02:55 -0600 I found quite irritating in Ada 2005. parameters on functions; Newsgroups: comp.lang.ada From: Pascal Obry * To avoid unnecessary type conversions > The factory function (called by a user of Date: Tue, 21 Nov 2006 08:04:56 +0100 between access-to-declared-in-limited- the package to create instances of this Subject: Re: generic question with; specific type) should return an Newsgroups: comp.lang.ada * To stand in for the lack of subprogram anonymous access type as its return type. > Storage pools are associated with types (anonymous access-to-subprogram named access types. (I think it's parameters). I don't think a factory function should possible to allocate using an That's it. All other uses (especially ever return an access-to-object: it should anonymous access type, but to me that's controlling access parameters) are junk return the object itself. If the client needs and should be avoided. to allocate that dynamically, it can; else it

Ada User Journal Volume 27, Number 4, December 2006 222 Ada in Context can use the function for an appropriate something like AWS or my EWS do not overlap. John Barnes static initialization. (http://embed-web-srvr.sourceforge.net). ("Programming in Ada 2005") suggests It has been argued that sometimes you It does mean programming your GUI in that in order to (for example) read from don't want those constructors to be HTML/JavaScript which I can agree is the same container, the operations need to inherited. In that case, it should return a less than pleasant, but I'm not at all sure be protected "by using the normal classwide type, because even access-to- that GUI programming in Ada is any less techniques such as protected objects". object is considered primitive and thus tedious, and it certainly makes you think But reading from the protected object is inherited. about separation of concerns! not mutually exclusive (many readers are But, of course, YMMV. I have yet to get to grips with XML- allowed) — so where's the gain? What's formatted (i.e., structured) responses. the difference between concurrent reads User interfaces in AJAX Perhaps I'm reading the wrong book of, say, a Vector via a protected object vs. (Professional AJAX from Wrox). direct access? From: Lucretia From: Pascal Obry From: Matthew Heaney Subject: Should a GUI be separated from Date: Thu, 28 Sep 2006 18:52:10 +0200 the application? Subject: Re: Should a GUI be separated Date: Fri, 24 Nov 2006 12:02:31 GMT Date: 26 Sep 2006 10:16:11 -0700 from the application? Subject: Re: Multitasking and containers Newsgroups: comp.lang.ada Newsgroups: comp.lang.ada Newsgroups: comp.lang.ada When developing an application it is Indeed, a very nice way to deal with GUI. The reason is a conflict between safety *mostly* combined with the GUI, a lot of This is what I call pluggable-GUI ! and flexibility, a conflict that was toolkits do this. You would extend a UI resolved in favor of safety. tagged-type (or class, or whatever your You can use AJAX-XML based control of The container must set some internal state language uses) and include the code the GUI. See the AWS's AJAX Web to indicate that Query_Element is inside the new tagged-type, an example Elements demos. The application only executing, in order to prevent you from would be a toolkit which provides event output XML actions. No HTML or doing things inside Query_Element that handler callbacks via primitive types (a la Javascript messing, the framework is would potentially destroy the element CLAW) thus forcing you to include your already done by AWS. (such as Delete'ing it). application code into the new derived From: Pascal Obry type. Date: Fri, 29 Sep 2006 19:54:18 +0200 Even though Query_Element is technically a read-only operation, that's Is this the best thing to do? Should I give Subject: Re: Should a GUI be separated true only in the logical sense, not the the users the option? from the application? Newsgroups: comp.lang.ada physical sense. It doesn't look like From: Tom Moran Query_Element modifies the container, Date: Wed, 27 Sep 2006 13:26:36 -0500 > I suppose that the _necessary_ JS is but it really does modify the container, to Subject: Re: Should a GUI be separated created by AWS, then. set some state that indicates a from the application? AWS comes with an AJAX runtime. Query_Element is in progress. Newsgroups: comp.lang.ada > Doesn't that make it hard to use a Yes, it would seem as if it should be > The users have the option of making the 'standard' web designer to create the possible for multiple tasks to all be "application code" in the GUI pages and just add a little interaction reading from the container framework just communicate with the here & there? simultaneously. But it's impossible to do real application, via rendezvous, that and also satisfy the requirement that sockets or whatever. It must depend on the way you work. the container detect potentially harmful Usually that's not that hard. Agreed. It depends on the complexity and manipulation of the container while the timing requirements. If the response to From: Pascal Obry Query_Element is executing. a human-caused event can be done in a Date: Thu, 28 Sep 2006 20:46:50 +0200 So multiple tasks — even tasks only fraction of a second, the code might be Subject: Re: Should a GUI be separated calling (logically) read-only operations — included in the GUI event handler, while from the application? cannot simultaneously call container responses that take a long time should be Newsgroups: comp.lang.ada operations without also synchronizing the separate to avoid blocking other events. > Could you make a Pong game that way? tasks, by wrapping the container inside a If the complexity of communication is Or a music synthesizer? Or does "GUI" protected object, using a critical section, low — updating a percent complete mean a limited subset of graphical user etc. display for example — then it's easy to interfaces? From: Matthew Heaney separate app and GUI code and I think with the current state of the communicate with something simple like technology a "limited subset" only. But in Date: Fri, 24 Nov 2006 12:12:13 GMT a protected object. If the communication some years from now, we a nice SVG Subject: Re: Multitasking and containers is very complex, your user may find even support... who knows! At least with Newsgroups: comp.lang.ada rendezvous difficult and want to put the AJAX the limited subset is far more app code inside the event handler. One > That would be interesting, but would advanced than it used to be. size doesn't fit all. break apart when encapsulated within a protected object, because there multiple From: Simon Wright Are Ada 2005 containers readers would be allowed. thread safe? Subject: Re: Should a GUI be separated But I think that's true only when multiple from the application? From: Maciej Sobczak readers are calling protected functions. Date: Thu, 28 Sep 2006 07:09:19 +0100 (There is a subtle difference in semantics Newsgroups: comp.lang.ada Date: Fri, 24 Nov 2006 09:51:24 +0100 between protected functions and protected procedures.) It does seem you'd need to > What other design would you offer? Subject: Multitasking and containers Newsgroups: comp.lang.ada use a protected procedure when What about having a browser as the GUI manipulating a container nested inside a and using AJAX-style HTTP for the Paragraph 3 in Annex A says that it's OK protected object, since a protected comms? The back-end would be to call any standard subprogram from function wouldn't provide the level of concurrent tasks as long as the parameters synchronization required.

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 223

> Having a mutex for readers sounds like many bad designs, which in the end turn In absence of preemptive scheduling. a concurrency killer and relying on neither efficient nor clean. I suffer it as No difference if the above premise holds, protected wrappers seems to be fragile well, this in a human nature of many i.e. no task switches as long as the barrier because of this possible mutability. So programmers. is closed. — what is The Solution (tm) for From: Matthew Heaney But, the above is true *only* for a single- multiple tasks reading from the same container? CPU system. So for a truly parallel Subject: Re: Multitasking and containers system it could become a problem. Dual- Declare the container object inside a Date: 27 Nov 2006 11:45:08 -0800 cores aren't that expensive these days. [...] protected object, and use protected Newsgroups: comp.lang.ada From: Matthew Heaney procedures to manipulate the container. > I guess we have different interpretations Protected wrappers should be fine, as long of "delicate handmade work". I took it Subject: Re: Multitasking and containers as you use protected procedures, not simply to mean custom protected functions. Date: 28 Nov 2006 11:17:33 -0800 implementations tailored to the specific Newsgroups: comp.lang.ada > Let's say you want to have N worker project (such as a container that does tasks consulting a shared dictionary not need protection for reads). > Further, even on a single CPU, where (map) that was initialized before the protected functions and procedures are But that's the same as saying you can not equivalent, the requirement "no task tasks started their work. How would use anything in the predefined library. If you solve this? switches while lock held" might be so then the container library is the least of unacceptable if you hold it for too long. As above: declare the container object your problems! inside a protected object, and use But this is already a precondition for From: Simon Wright using a protected object as a monitor. protected procedures to manipulate the container. The RM makes it clear that you shouldn't Subject: Re: Multitasking and containers be doing anything that takes "too long" From: Matthew Heaney Date: Mon, 27 Nov 2006 21:15:29 +0000 inside a protected operation. Newsgroups: comp.lang.ada > Searching a container within a protected Date: Fri, 24 Nov 2006 12:13:32 GMT If the predefined library doesn't meet your Subject: Re: Multitasking and containers action ... well, one should be a quite needs you do indeed have a lot of work strong believer for this. Newsgroups: comp.lang.ada ahead of you; often small beer in the > Write your own container. Parallel overall scope (e.g., safety-related systems If this is an associative container then no systems require delicate handmade with SIL4 software => no runtime at all problem. If this is a sequence container work. — GNAT high integrity edition for with many elements, well that's another story. Horrible advice. Just declare the container example— highly desirable if not inside a protect object, and manipulate the absolutely necessary precondition for > I wouldn't dismiss it completely, but I container by calling protected procedures. certification). definitely don't like it. For hashes I Works great... But if it does meet your needs you're would at least take one with an external crazy not to use it! hash function computed outside the From: Jeffrey R. Carter protected action. From: Matthew Heaney Subject: Re: Multitasking and containers The issue with hash tables is not the Date: Mon, 27 Nov 2006 04:17:11 GMT Subject: Re: Multitasking and containers computation of the hash value, but rather Newsgroups: comp.lang.ada Date: 28 Nov 2006 09:12:27 -0800 if the hash function is poor and there are many collisions. Not at all, even for sequential systems. Newsgroups: comp.lang.ada Standard libraries are necessarily > Using a protected object's If that's the case then the time to compare compromises among various concerns procedure/entry would kill concurrency the key to items already in that bucket such as safety, performance, ease of use, by serialization of the action to will be large compared to the cost of and so on. Specific projects may, and undertake. computing the hash value itself. sometimes will, have requirements that There is a difference between About Compiler Directives are not met by such libraries. In such "synchronizing access to a shared cases, custom versions are needed. resource" and "waiting for a resource to From: Adam Beneschan In this case, we may have an instance of become available". premature optimization; the OP seems to Calling a protected function or procedure Subject: Re: gnade error be worrying about the overhead of is an example of the former. Calling a Date: 14 Nov 2006 09:52:51 -0800 wrapping a container in a protected object protected procedure would hardly "kill Newsgroups: comp.lang.ada without any evidence that this approach concurrency". In a monitor there is only won't meet the project's requirements > A pragma Inline should not cause a synchronization. (I think it's the case that compilation error. The presence or (indeed, it seems there is no project and the task stays in a running state.) no specific requirements are involved). In absence of a pragma should not change that case, it probably will "work great". Calling a protected entry whose barrier a legal program to an illegal program But in specific cases a custom version that condition is false is an example of the nor illegal to legal. does allow unprotected multiple readers latter. If the barrier condition were false This really isn't true. First of all, many may be required. this would mean the task waits (it pragmas defined by the language have transitions to a blocked state). I would be legality rules, and using a pragma that From: Dmitry A. Kazakov loathe to say that that would "kill" violates the legality rules makes your concurrency since in typical designs that's program illegal. As for Inline, there's a Subject: Re: Multitasking and containers exactly what the task is supposed to do. Date: Mon, 27 Nov 2006 19:57:39 +0100 legality rule that the names listed need to Newsgroups: comp.lang.ada From: Dmitry A. Kazakov be callable entities, plus there are rules about where Inline pragmas can be I also agree with your point about Subject: Re: Multitasking and containers placed. Violating those rules will make premature optimization. It is a common Date: Tue, 28 Nov 2006 19:21:42 +0100 your program illegal. disease, which costs much work and Newsgroups: comp.lang.ada

Ada User Journal Volume 27, Number 4, December 2006 224 Ada in Context

The RM says that Inline is a Newsgroups: comp.lang.ada As long as compilers are not perfect, I recommendation that an implementation > I must adjust the stack size either suppose it is at least an extra factor to is free to ignore. Using an Inline that will through gnatbind or gnatlink. Not sure consider. Also, I'd not limit it only to get ignored will not make your program what is best. dynamically sized data. illegal according to the RM, but that is I've been bitten several times by stack- *not* the same as saying that it shouldn't If you're managing large data structures (over 4MB in size), I'd go for a heap- related problems when using GNAT, cause a compilation error; there are plenty that's all I wanted to transmit (hence the of reasons why users might want a based solution using controlled types. In my experience, abusing the stack is a 'in my experience' remark). If you don't compiler to reject a legal program, and have desires to learn about system using an ignored Inline might be one source of headaches sooner or later (specially if you are doing something internals, GNAT primary/secondary reason, especially if a warning message stacks and so... use the heap, Luke ;) might get missed during a "make". portable). Maybe one of the GNAT flags Brian used Note that ill-managed recursion can also It is worrisome that I'm saying all this, told it to reject pragmas it couldn't handle. be a source of stack overflows, and you because I find much more comfortable I don't know GNAT very well so I can't can check this in GNAT with -fstack- using the stack than any heap say. check. Without it, stack overflows are management. Finally, the statement "The presence or sometimes reported as violations instead. From: Kevin K absence of a pragma should not change a From: Alex R. Mosteo Subject: Re: exception access violation legal program to an illegal program nor Date: Wed, 15 Nov 2006 23:43:01 GMT illegal to legal" isn't true even for Subject: Re: exception access violation Newsgroups: comp.lang.ada implementation-defined pragmas. 2.8(17) Date: Wed, 15 Nov 2006 14:32:11 +0100 Some operating systems put smaller than does say an implementation-defined Newsgroups: comp.lang.ada you would expect limitations on the pragma should not make an illegal environment stack. And while you can program legal, but it also lists a couple > Why is using the heap + controlled for larger data structures more portable change it in some cases, while playing exceptions to this rule. 2.8 also implies around, I found that Mac OS X, for that a pragma that is not defined by the than using the stack? I know that GNAT needs to be talked into example, seemed to have a 16MB limit language nor by the implementation is (going by memory). And since task ignored, but syntax rules still apply. providing sufficient space on the stack. You might be that running into this stacks were put on this stack instead of in However, if you use an implementation- the heap, that further limited it. If I was defined pragma but violate the kind of stack trouble only when you port from another compiler to GNAT? writing stuff from scratch that was also implementation-defined rules for that going to run on it, I would work on pragma, there's nothing I can see in 2.8 I have no experiences out of GNAT, that putting the data on the heap. that says your program is still legal. That be said first. decision is left up to the implementation. In past times, I had to deal with implicit AdaCore — From: Robert A Duff limits in Linux/ld (I seem to remember it Internationalization in Ada was 2MB. This has changed with kernels 2005 Subject: Re: gnade error and is no longer an issue). Because of Date: Wed, 15 Nov 2006 09:28:26 -0500 this, porting from Windows to Linux was Internationalization in Ada 2005 Newsgroups: comp.lang.ada somewhat painful because problems not Monday September 18, 2006 > OK, a *legal* pragma should not ... arising in Windows did arise in Linux (even using the usual linker stack options, There are three aspects to making a There are many pragmas that cause other so I had to dig for even more obscure language truly usable internationally. parts of the program to be illegal. Pragma switches). Other languages don't exploit First, which almost goes without saying, Restrictions, for example, has that as its so much the stack, so it is more difficult is that there should be an international main purpose. A pragma that goes the to find experiences in the area from other standard for the language that has been other direction (causes an otherwise developers. illegal program to be legal) is in rather carefully reviewed by the international poor taste, but there are some cases of Other point that may be relevant: by community. This is most certainly true of that, too — rather obscure cases. default, GNAT doesn't release memory Ada, and specifically the draft standard historically claimed by stacks, contrarily for Ada 2005 has been approved by a vote But you're right about pragma Inline — a to heap-allocated one. Couple this with of ISO member countries and is well on pragma Inline cannot affect the legality of lots of tasks or recursion and quickly its way to getting the final stamp of the program (so long as the pragma itself memory can start to be an issue. (I'm not approval. That vote was the critical one, obeys the rules, such as the names have to sure if this is Linux 2.6 default behavior it’s all smooth sailing from here and we denote subprograms). or GNAT management of secondary may even have a formal standard before However, many compilers have switches stacks, couldn't locate it in the docs). the end of the year. We were not sure if that invoke non-standard modes. In Finally is the trap I always fall for: "This this would happen in 2006 or 2007 (which GNAT, you can tell it to warn about is small enough to be in the stack". And is one of the reasons we chose 2005 for pragmas Inline that are not obeyed, and then it grows, and then it starts to be a the name). Of course once the standard is you can also tell it to treat warnings as problem, or some recursive algorithm issued, the name of the language becomes errors (-gnatwe switch). In this non- can't recur enough, and you end changing simply Ada, since this name always refers standard mode, a pragma Inline that does it or having humongous stacks or to the current standard. It is notable that not inline makes the program illegal. reworking algorithms. Java lacks such a standard, and has as a result been almost entirely a US-driven Managing large data Of course, in real-time environments design. you'll prefer to know your memory needs structures from the start. Second, you want to be able to write programs that will handle foreign From: Alex R. Mosteo > Should the decision whether some languages in a comprehensive manner. object lives on the heap or on the stack The standardization of international Subject: Re: exception access violation be based on compilers' support for character sets has taken a huge stride Date: Wed, 15 Nov 2006 10:58:09 +0100 dynamically sized local data structures? forward in the last few years with the

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 225 approval of the new ISO 10646 standard announcements of this kind in this forum were waiting to see what happened with that is unified with Unicode. This is a 32- so we would know who is still supporting the standard. That is a fair point, however bit standard which covers all languages in Ada. the technical aspects have been nailed the world, as well as specialized character Where is DDC-I? OC Systems? ICC? down now so I'd like to see something sets for such applications as music Any other Ada compiler publishers? Ada about it (i.e. Announcement — notation. Smooth integration of this tool publishers? Is Rational still in the "Greenhills announces future availability standard is not trivial in a language business of providing Ada compilers and of Ada 2005 support" — yes, they often design. It is certainly not sufficient to just tools now that they are captives of IBM? pre-announce). include a 32-bit character type. You need From: Randy Brukardt as well full integration of library functions From: Jeffrey Creem that deal with characters and strings. Subject: Re: Ada vendors - Re: ANN- Given the participation of the Date: Sat, 07 Oct 2006 08:38:07 -0400 Subject: Re: ANN- AonixADT Ada AonixADT Ada Development Toolkit for international community in the Ada 2005 Eclipse v. 3.11 design, it is no surprise that Ada 2005 Development Toolkit for Eclipse v. 3.11 Newsgroups: comp.lang.ada Date: Mon, 16 Oct 2006 20:10:03 -0500 accommodates this new standard fully Newsgroups: comp.lang.ada and cleanly. The new types I am starting to think that only us old Wide_Wide_Character and timers even know about Usenet anymore. I can't speak to their products, but several Wide_Wide_String are first-class citizens IBM/Rational people were instrumental in in Ada 2005, and fully supported in the DDC-I came out with an Eclipse developing Ada 2005 — which is more library and the language design. Ada- environment months ago. Nothing posted. that I can say about several other Ada 2005 compilers, notably GNAT Pro, fully Greenhills still has no Ada Eclipse but compiler companies. I have to think that support this language feature, and support continues to update their Ada offerings they are doing more than sitting on their not only the standard UTF encoding of (though their 2005 plans still seem in hands between ARG meetings. such characters, but also locally used doubt). Though they tend to be aggressive I do know that they don't have anyone encodings such as Shift-JIS, which is still in sales you never see a new product turning out PR for the Ada group. (In used in Japan. announcement here. IBM, it takes a lot of approvals to get PR Third, you would like to be able to write Rational/IBM seems to have the problem allowed.) That might make updated programs with comments and identifiers that they are so big one can never be sure products invisible. in non-Roman scripts. A very important if they sell any tool anymore (not just From: Tom Grosman part of the Ada design is dedicated to Ada) since stuff is so bogged down in the Subject: Re: [ANN]- AonixADT for Eclipse making highly readable source programs. "software is a service/craft you a solution" now available for Intel/Linux and Choosing good identifier names is a mentality. Sparc/Solaris for GNAT critical element of readability, so for non- Of course it could be that the vendors got Date: Tue, 31 Oct 2006 14:21:09 +0100 English speaking programmers, it can be tired of getting yelled at for commercial Organization: Aonix extremely valuable to support a full range postings on Usenet. We are a hard group Newsgroups: comp.lang.ada of character sets for this purpose. It’s not of people to please. by any means trivial to design such a > I'd like to say Thank You to those who feature. For example, exactly how should From: Marco made this plugin! case equivalence be handled in a locale- You're welcome ! Subject: Ada vendors - Re: ANN- AonixADT independent manner? Again, the Ada > It has feature that impress me. Many 2005 design (and GNAT Pro) fully Ada Development Toolkit for Eclipse v. 3.11 other plugins provide little more than support the use of foreign languages for syntax highlighting. identifiers and in comments. The Date: 15 Oct 2006 10:27:38 -0700 Newsgroups: comp.lang.ada What could be an incentive to the implementation of this was by no means a business entity Aonix so they add all trivial task, but it is now complete in the Let's not bash Greenhills. They have kinds of "free" to their product? current versions of GNAT Pro. provided good Ada support over the AonixADT when used with ObjectAda of In short, once again Ada leads the way in years. Ada 2005 updates should be customer driven, let's face it you can course does not restrict project size. Mark, language design, and fully addresses the if you can show us a valid business model difficult issues of smoothly integrating all hardly buy a complete C99 compliant compiler 7 years later. where we invest development resources to written languages of the world, allowing provide a free Eclipse interface for a for truly international use of Ada. Rational/IBM still sells Ada but hasn't competitor's product, we're willing to updated their products in years, unless consider other approaches. We think that Announcements by Ada you have to, I think it would be foolish to the limitation on project size means that Vendors get Ada from them now. the ADT is useful for smaller projects and From: Jeffrey Creem especially in academic settings, without From: the Add-on. Judging from the number of Subject: Re: ANN- AonixADT Ada Date: Sun, 15 Oct 2006 18:13:20 -0400 students and faculty downloading the Development Toolkit for Eclipse v. 3.11 Subject: Re: Ada vendors - Re: ANN- plugin, that may be the case. Because the Date: Sat, 07 Oct 2006 07:19:54 GMT AonixADT Ada Development Toolkit for downloadable version includes all Newsgroups: comp.lang.ada Eclipse v. 3.11 features, we also think that users can get a > Aonix is pleased to announce the Newsgroups: comp.lang.ada good idea of whether it meets their release of AonixADT 3.11, the first professional development needs before Not sure I was really trying to bash them. requesting the Add-on. publicly available version of our They do have an aggressive sales force. commercial quality Ada Development This is not entirely a bad thing. Often we > Will they have reason to think about Toolkit for Eclipse. do want to buy something. It is nice to conditions for projects that seem less This announcement is good news. find someone who wants to sell it! self-interested and closed source, but rather seem good and profitable for We seldom hear from Aonix anymore. As for the Ada 2005 support... It would be everyone, including Aonix? For that matter, we don't see information nice to see some mention of it on their from many other Ada compiler site. I have asked about it (as a customer) We are actively involved in projects like publishers. It would be nice to get more in the recent past and been told that they that. If you know of other such projects,

Ada User Journal Volume 27, Number 4, December 2006 226 Ada in Context please let us know. We've been Ada Hand's on exposure to fully capable tools, The provision of _sound_ (i.e. no false advocates for 25 years. Still are. or those that are limited in a non-intrusive negatives) and _fast_ aliasing analysis a From: Marc A. Criley way (e.g., the free Perforce is limited to key factor, even in the absence of Organization: McKae Technologies two users—not much of an impediment to dynamic memory and garbage collection. Subject: Re: [ANN]- AonixADT for Eclipse a One Map Shop :-) gain mindshare for The soundness (and efficiency) of the now available for Intel/Linux and the product and the company. While _I_ information flow analyser and the VC Sparc/Solaris for GNAT may find it infeasible to drop $5000 for an Generator (which is basically an Date: Tue, 31 Oct 2006 19:30:35 -0600 Aonix Ada compiler on Linux, that's not implementation of Hoare's assignment Newsgroups: comp.lang.ada to say I won't give it a fair hearing to an axiom) depend on this property. employer based on what I've learned > [Marc], if you can show us a valid about the company's products, quality, From: Ludovic Brenta development resources to provide a free other products—such as AonixADT. Subject: Re: Reference-oriented language Eclipse interface for a competitor's and high-integrity software product, we're willing to consider other Ada and High-Integrity Date: Fri, 03 Nov 2006 09:58:51 +0100 approaches. We think that the limitation Systems Newsgroups: comp.lang.ada on project size means that the ADT is The other part of the explanation, AFAIU, useful for smaller projects and From: Maciej Sobczak is that a reference can go wrong, i.e. point especially in academic settings, without to deallocated memory, to unallocated the Add-on. Subject: Reference-oriented language and memory, or to the wrong piece of Perhaps not a "business model", but high-integrity software memory. References also introduce instead a "business _opportunity_ model". Date: Fri, 03 Nov 2006 09:03:07 +0100 aliasing, i.e. two references can point to All Ada software I've developed outside Newsgroups: comp.lang.ada the same item. All these make it almost of my day job has been possible due to John Barnes in "Programming in Ada impossible to statically prove that no AdaCore's compilation tools, and the 2005", in the introductory section in the unintended side effects ever occur in the generosity of numerous other software chapter devoted to access types, writes: program (correctness means: do what developers in the Ada community. I've you're supposed to do; safety means: do "Java is currently popular. It has pointers not do what you're not supposed to do. It never used an Aonix product, but not which are called references. In fact almost because I have anything against the is this latter part that matters to the everything is declared using references present discussion). company (quite the contrary, I've been although this is hidden from the user. This aware of, and appreciated, Aonix' Ada means that Java is inappropriate for high From: Ludovic Brenta Subject: Re: Reference-oriented language I'm a serious, self-motivated Ada What is interesting is the following developer, as are many others in this and high-integrity software implication which John Barnes leaves Date: Fri, 03 Nov 2006 12:15:44 +0100 forum, so any tool or product that I use without explanation: has to be capable of performing Newsgroups: comp.lang.ada effectively and efficiently in my references => no high integrity > This can be rebutted on the basis that development environment. It's also clear that the above statement those languages ensure that nothing like AonixADT for GNAT is too capability- applies not only to Java in particular, but this happens (no pointer arithmetic + limited for my activities, therefore I won't to every other language that is similarly garbage collector). spend time giving a serious look to a tool "reference-oriented". And your rebuttal can be rebutted at the that I can't properly evaluate in my real- My question is: where this implication highest criticality levels where you do not world environment. So Aonix loses an comes from? certify the source text, but the object code opportunity to gain some mindshare and emitted by the compiler. In those some hand's-on experience with me. Taking into account that JB also wrote a contexts you do not even trust the book about SPARK, some reasoning can And without that mindshare and compiler. References make the object be found there and my understanding code even more difficult to certify. experience, there's no basis for me to (simplified) is that reference-oriented recommend the product to others, language implies a heavy use of dynamic > This makes sense in case of Java, but including my day job employers. Fair or memory, which makes it one could also argued that immutability not, individuals tasked with impractical/impossible to perform any of objects – a common feature in some recommending tools can't help but be static analysis of memory consumption. reference-oriented languages — can biased towards those they're already Garbage collectors add their own factors make it less severe. familiar with. to the problem. Yes, provided you trust the compiler — At a former employer that was Is the above a reasonable explanation? Is which you don't in high-integrity transitioning from a defunct Ada 83 it the only one? What else makes the software. compiler to Ada 95, it was my reference-oriented languages > So — let's imagine a language, which is responsibility to make the technical case inappropriate for high-integrity software? reference-oriented with all objects for the compiler choice—and clearly my 5 And last but not least, how does the JB's immutable. Apart from dynamic years of experience at that time with memory, is there any problem? GNAT influenced my analysis. More statement stand in front of things like recently, my experience with the free Real-Time Java or even HIJA (High- Yes. Tracing the object code to the distribution of the Perforce Source Integrity Java)? source text, and certifying the object code. Control tool (www.perforce.com) to small From: Rod Chapman I'm not saying it's impossible to do; just development organizations led me to that it's unacceptably expensive to do. recommending Perforce (over CVS and Subject: Re: Reference-oriented language From: Dr. Adrian Wrigley ClearCASE, which I also had significant and high-integrity software experience with) to an employer that was Date: 3 Nov 2006 01:43:18 -0800 Subject: Re: Reference-oriented language upgrading from an ancient version of Newsgroups: comp.lang.ada and high-integrity software SourceSafe. Date: Fri, 03 Nov 2006 15:27:56 GMT

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 227

Newsgroups: comp.lang.ada From: Pascal Obry for $$, right? After all it's the support that > Neither Real-Time Java nor HIJA can Date: Thu, 12 Oct 2006 20:28:17 +0200 they need. reasonably be described as Java. The Subject: Re: Why is OSS Commercial So selling the same software for $$ would last time I looked, both required special Software So Expensive? not result in lost revenue, because existing compilers; were designed to produce Newsgroups: comp.lang.ada and new customers in need for support native machine code not an interpreted > Well, not only, AdaCore also sells a would buy the $$$$ version anyway. It J code; allocated objects on the stack non-GPL version of the compiler with would not result in additional support rather than heap; and had no garbage the guarantee that it is ok to use it in a cost, because there is no support. It would collection. The restrictions mean that proprietary context. not result in additional development cost, you cannot use any of the standard Isn't this the case with GNAT/FSF too ? because the software is already there. It libraries and don't get platform portable would not result in additional distribution code; the two primary attraction of Java We already had this debate here, and I cost, because there is already a download in the first place. What you do have is certainly do not want to restart it. But we site for a GPL version. The only two new languages that just happen to have 3 GNAT compilers : GNAT Pro, additional cost I can see is the cost of have a Java-like syntax. The GNAT GPL, GNAT/FSF. I think that collecting the money from buyers. modifications required to give these every needs are covered. Not talking Assuming $$ is more than what it costs to new languages their real-time and high about other vendor's offerings. I find it cash in $$ there is some (maybe small) integrity credentials are precisely hard to believe that some people can't find net profit and a chance to get more people aligned with John Barnes's objections the right tool for their work. interested in commercial development to them. From: Pascal Obry with said Ada toolset. Where is my error? So the advantage is that you can attempt Date: Fri, 13 Oct 2006 18:36:11 +0200 From: Randy Brukardt use existing programmers for writing high Subject: Re: Why is OSS Commercial integrity/real-time software. And the Software So Expensive? Subject: Re: Why is OSS Commercial code produced can even be executed with Newsgroups: comp.lang.ada Software So Expensive? standard compilers/runtimes, albeit > The FSF doesn't give you a *guarantee* Date: Mon, 16 Oct 2006 19:57:09 -0500 without the benefits of the HI/RT (in the form of a signed document). If Newsgroups: comp.lang.ada environment. And of course, all the IDEs, someone stands up and says "you I think you're working from a fallacy here. code analysis tools can be used. Sounds cannot use this part of GNAT in a You cannot sell software without at least rather useful. proprietary context because I have a limited support. When you sell The sceptics are saying the only benefit is copyright on this part and didn't allow it something, it has to (within reason) do better buzz-words. But then SPARK Ada to be used in such context", AdaCore what it is supposed to do. That's likely to is based on the same philosophy would handle the problem and deal require at least fixing some bugs (or (restricted language, compiler, run-time to with the claim (if you have the signed refunding some payments). And that will achieve tougher HI/RT goals). guarantee), while you have no such cost some money. Whereas, when you get guarantee with the FSF. From: Jean-Pierre Rosen it for free, there is no such implied Ok, ok and millions of people are expectation — if the compiler you Subject: Re: Reference-oriented language developing software with C/C++ using download won't compile a generic, you and high-integrity software GCC/FSF without trouble :) just have to work around it or pay someone for support. Date: Fri, 03 Nov 2006 18:30:56 +0100 From: Björn Persson Organization: Adalog Now, you might say that Microsoft Newsgroups: comp.lang.ada Subject: Re: Why is OSS Commercial doesn't seem to do that. But that's not Experience shows that people over- Software So Expensive? really relevant (and they do provide some estimate the time to learn a new language, Date: Sat, 14 Oct 2006 10:34:26 GMT limited support, too) — they are in a and under-estimate the time to train Newsgroups: comp.lang.ada much better position to deal with any legal issues and/or customer unhappiness people to the constraints of writing high > Well, perhaps millions of people were integrity/real-time software. Better take issues that come up. Smaller companies freely using Linux without trouble until simply can't afford it — unhappy an experienced real-time programmer and SCO made some claims. teach them Ada, than the other way customers are very bad for business. round! Yes, SCO tried to persuade GNU/Linux So, I expect that AdaCore thinks that distributors into providing just the kind of selling compilers with limited support for Costs of Commercial Open indemnification that Samuel mentioned. $$ will either cannibalize they're other Source Software And how successful were they? business (because some of those I seem to recall that they did manage to customers only need the limited support) From: Larry Kilgallen trick a couple end users into buying their or that they will need to provide $$$ license, but millions minus two is still worth of support — which doesn't make Subject: Re: Why is OSS Commercial millions. sense. "No support" is only an option for Software So Expensive? From: Michael Bode "free", not $$. Date: 12 Oct 2006 05:07:36 -0500 Subject: Re: Why is OSS Commercial From: Stephen Leake Newsgroups: comp.lang.ada Software So Expensive? > well, but what if I want just a compiler Date: Mon, 16 Oct 2006 22:35:59 +0200 Date: Sat, 14 Oct 2006 03:41:37 -0400 without any support and just for 3 Newsgroups: comp.lang.ada Subject: Re: Why is OSS Commercial seats... not for 5, and not with GPL? I don't want to criticize anyone, there Software So Expensive? Newsgroups: comp.lang.ada The president of AdaCore has said that simply is something I don't understand: it below a certain level it is _more_ is said that the customers of some Ada > OK, but if I want to buy licence for 2 expensive for them to support a smaller toolset are glad to pay $$$$ for the seats with no support at all I can't. number of users than a larger number. excellent support. If they need this kind of What does this mean? When one gets to 5 users, there is some support to maintain their productivity, self-help provided between people in the they would not buy the same toolset customer organization. without support even if it would be sold

Ada User Journal Volume 27, Number 4, December 2006 228 Ada in Context

GNAT is GMGPL or GPL; there is no Yes. They're not Pos-itions, they're From: Jeffrey R. Carter license to buy. The only thing you can offsets. Positions should start at 1. If they buy is support. did, then T'Base'First could be 0. That Subject: Re: basic basic ada question If you don't need support, just use a might be useful in some cases. Date: Fri, 20 Oct 2006 20:54:51 GMT publicly released version of GNAT, either > Why should one think in C or Ada? Newsgroups: comp.lang.ada from https://libre2.adacore.com/, or from There are lots of concepts that Overstatement tends to attract the an FSF GCC distribution. transcend the languages. After all, both attention, and thus get the reader to think Hmm. The latest public GNAT from languages have subroutines, parameter about it. Saying "Ada is different from C" https://libre2.adacore.com/ is under the passing, stack/heap allocation, etc, etc. is obvious, and will be ignored. You'll GPL license. Perhaps you mean you want The Ada mindset is essentially the same still get Ada-C, with pointers everywhere. GMGPL instead of GPL; is that the issue? as the SW engineering mindset. Saying "Everything you know from C is wrong" might get him looking for ways to In that case, you can use the FSF GCC From: Maciej Sobczak do things differently. distribution of GNAT; it is GMGPL. However, it is pretty broken, compared to Subject: Re: basic basic ada question I should have said "the Ada mindset", the https://libre2.adacore.com/ Date: Fri, 20 Oct 2006 09:13:00 +0200 which is also known as "the SW distribution. But that just means you Newsgroups: comp.lang.ada engineering mindset", but when you're actually do need support, and we are back knocking out these posts you often don't Cool sentence, but I know another: have time to perfect your wording. But ... to option 1 :). "Computers think in C". From: Stephen Leake Thinking in terms of the language is not Both are good (and actually used) in as good as thinking in SW engineering flame-wars. Date: Thu, 12 Oct 2006 14:39:46 -0400 concepts, but when a person is thinking in Subject: Re: Why is OSS Commercial From: Jeffrey R. Carter C/++, thinking in Ada is much closer to Software So Expensive? those concepts than the way the person is Newsgroups: comp.lang.ada Subject: Re: basic basic ada question thinking. Getting a coder to consider Date: Fri, 20 Oct 2006 20:39:55 GMT thinking in such concepts is harder than > In my opinion AdaCore is not asking Newsgroups: comp.lang.ada getting him to consider thinking in too much for commercial support. another language. Once he starts thinking Computers don't think, but they follow in Ada, the final step is much easier. I agree whole-heartedly; the support they instructions in object code. "Real men provide is well worth it. write object code." Event mechanisms for GUIs I wish the other companies I deal with had It indicates a good point: SW engineers an option to pay more for better support. deal with abstraction and try to ignore or From: Lucretia Instead, I have to spend my time hassling hide implementation details as much as Subject: Event mechanisms for GUI's them to let me talk to the people who possible. Coders like to try to do Date: 26 Sep 2006 10:28:04 -0700 actually know something, instead of the everything at a low level. Newsgroups: comp.lang.ada front-end support filter people. It ends up costing me more than AdaCore does. From: Maciej Sobczak My wxAda project stalled due to a problem with C++. I'm starting on a new > Being a small company, of course, will Subject: Re: basic basic ada question project to see if I can do better than have to consider spending so much that Date: Fri, 20 Oct 2006 09:25:44 +0200 wxAda using native Ada and binding only is over budget! Newsgroups: comp.lang.ada where necessary. It will do what wxWidgets does and provide native I do have the luxury of working for a big > Most of what you know from C/++ is controls for different platforms, i.e. company; NASA. Sometimes, we manage wrong for Ada. to do things right :). GTK+-2.x for Linux, Win32 API, etc. I'll It's a bit of overstatement and I, be implementing it in Ada 2005 as well, The Ada mindset personally, don't find it to be the case. I as long as the FSF GNAT doesn't cause would rather claim that if someone brings too many problems. some bad habits from C or C++ to Ada, From: Jeffrey R. Carter I'm currently thinking of the event they were already bad habits in C and handling mechanism, I started to think C++ anyway. Subject: Re: basic basic ada question about using the listener/subject pattern, Date: Fri, 20 Oct 2006 05:10:05 GMT > The sooner you can stop thinking in but then started to wonder about the Newsgroups: comp.lang.ada C/++ and start thinking in Ada, the alternatives: easier you will find it. > Dijkstra wrote an interesting paper 1) Event loops called "Why numbering should start at Thinking in Ada is probably the same bad This would be painful as there'd be a lot zero", which you can find via Google. idea as thinking in C or C++ — at least if of case statements. I don't buy it — I like to number most the final goal is not to have fun with the things starting at 1, despite his fairly language (that's also a valid reason to 2) Signals & slots reasonable arguments to the contrary. write programs, really), but rather to build This just seems to be a simplification of I've seen it, and I don't buy it, either. My good final software. In this latter case (5), where instead of using an observer experience is that fewer mistakes are thinking in terms of good engineering interface you just pass a function pointer made when the numbering from the principles is the keyword — and then and the signal can contain many of these domain is used. Some of his arguments, either any given language makes the function pointers. such as ease of calculating the length of a implementation of these principles sequence, are things that the language possible or not. This means that Can be implemented using generics to should do for you. There should be "thinking" in any particular language is provide type safety. 'Length for discrete subtypes; it returns already a bad idea and *using* the 3) Extension of tagged-types (like the number of values in the subtype. language to implement the chosen CLAW) engineering principles is much more > It's interesting that for enumeration Not a bad idea, just override the correct. types, T'Pos starts numbering at 0. subprograms you want to know about. 4) Ada.Real_Time interrupts

Volume 27, Number 4, December 2006 Ada User Journal Ada in Context 229

I don't know enough about this, so I won't That_Window_Type objects as Date: Sat, 30 Sep 2006 20:07:15 +0200 even comment. descendants of Basic_Window_Type Newsgroups: comp.lang.ada 5) Listeners/Subjects (inheriting what they have in common) > Can somebody please post an example makes them different objects, and a I'm not too sure how Java handles this Makefile that can be used to build a dispatching call on library and link the source to an with their Listener interfaces, I can only When_Left_Button_Down(The_Clicked_ think of having a listener/subject pair per example app without recompiling the Window) is in effect a succinct library source. I would prefer not to use event type and then having something abbreviation for a case statement on the similar to the listener interfaces that Java project files if possible as they just type of Window, implemented efficiently don't provide enough flexibility. has by calling specific procedures in the and without forgetfulness or typing errors, interface'class from the listener's update automatically by the compiler. Building a library and using it in a procedure. program involves the following steps: From: Randy Brukardt So, there would possibly be 3 types: 1. Building the object and .ali files for the observer (abstract tagged), subject Subject: Re: Event mechanisms for GUI's library (tagged), listener (interface). Then the Date: Wed, 27 Sep 2006 18:05:22 -0500 2. Linking the object files into a shared control (e.g. a window) would then have Newsgroups: comp.lang.ada library to implement an "Add__Listener" per event First of all, there is no simple or even 3. Copying the .ali files to a "deployment" type, which would add a satisfactory solution to this problem. The directory, and making them read-only _Listener to a trouble is that handling asynchronous events in a sequential programming 4. Building the program, so it sees the .ali _Observer. Seems overly files and the .so file but not the .o files for complex to me. language (or even a high-level parallel one like Ada) is a poor match. You the library. Otherwise, gnatmake will link The one thing that Ada would have over complained about "a subprogram being the library .o files statically into the final the Java implementation is the use of null called when a framework pleases", but executable. subprograms in the interface, therefore an you have the same effect with any Since you've chosen a particularly adapter type would not be necessary as mechanism — the order of operations complex directory structure, your you would be able to implement only the depends on the events, not on the Makefile will be horrendously complex subprograms you are interested in. program. And any well-designed — as you yourself say, "madness". I From: Jeffrey R. Carter framework will make it clear when would really recommend you reconsider subprograms will be called and by which your decision not to use project files; Subject: Re: Event mechanisms for GUI's task. contrary to what you say, they can be Date: Tue, 26 Sep 2006 20:39:27 GMT Second, explicit event handling is among quite flexible since you can pass variables Newsgroups: comp.lang.ada the worst solutions, because it requires an to them. The best way is to have a protected event explicit response to every possible event. Here is how I would do it: I would have queue for each window. There should be A real GUI system will have dozens, if three project files and one Makefile. The mechanisms to specify what events are not hundreds, of possible events for each first project file would build the library, and are not put on the queue, and for Window. It's easy to forget to handle placing the .o files in the temp directory: combining the queues for multiple some of those events; moreover any project Build_Adael is windows into one queue. *explicit* code necessary to do the Compiler := External *default* action reduces the readability of ("COMPILER", "gnat"); There's nothing wrong with case the system. And the easiest solution (the Target := External ("TARGET", statements. They're very clear and easy to "linux"); others clause) completely eliminates the Build := External ("BUILD", read and understand. Remember Ada's main advantage of using case statements "release"); explicit design goal: "[E]mphasis was — the completeness check. for Source_Dirs use ("src/adael", placed on program readability over ease "src/common", of writing." [ARM Introduction] If you I'm not convinced that the "subprogram "src/generic", extension" solution used by Claw is the "src/gtk2", have a problem with writing case "src/" & Target); statements, then you probably haven't best one, and I'm certainly not convinced for Object_Dir use adopted The Ada Way yet. that the multi-task arrangement used by "build/" & Compiler & "/" & Target Claw is a good idea. (For a lot of systems, & "/temp/" & Build; From: Tom Moran a single task solution with an explicit call- package Compiler is Subject: Re: Event mechanisms for GUI's me-now routine would be easier to work for Default_Switches ("Ada") use Date: Tue, 26 Sep 2006 18:18:10 -0500 ("-fPIC", "-g", "-O2", "-gnatVa", with. But it would also make it a lot easier "-gnatafno"); Newsgroups: comp.lang.ada to starve the GUI – a problem that explicit end Compiler; > There's nothing wrong with case events certainly have as well.) end Build_Adael; statements. They're very clear and easy My final conclusion is that all of the The second project file would use the In small quantity, yes. But many- solutions have severe trade-offs; none is read-only .ali from the deployment branched, nested, case statements with a anywhere near optimal. My advice to the directory, and the source files from the lot of near duplication are not so clear or OP is to select a strategy that works well source directory. You would ship this maintainable. They are a very low for the problems that they want to solve, project file with your library. abstraction level, computer-centric, and not worry too much about "goodness" project Adael is device. — it's not going to happen in a GUI (that's Compiler := External why GUI builders are so indispensable). ("COMPILER", "gnat"); If This_Window is for showing danger Target := External ("TARGET", warnings in big red letters to the reactor "linux"); operator, and That_Window is for Building a Library in Ada Build := External ("BUILD", showing daily power demand over the last "release"); From: Ludovic Brenta "src/common", from a computer-centric view, but vastly "src/generic", Subject: Re: GNAT, shared libraries, different in the problem space. Having "src/gtk2", building in different This_Window_Type objects and "src/" & Target); directories...madness! for Object_Dir use

Ada User Journal Volume 27, Number 4, December 2006 230 Ada in Context

"build/" & Compiler & "/" & Target $(args) Maybe I should have explained that better & "/" & Build; -- no "temp" -- No package Compiler, since we gnatgcc -shared -o $@ in my first reply. --+ won't compile the library. But $(lib_build_dir)/*.o \ Now, since you seem to be running on an --+ we can make it convenient for --+ users to link with the shared -Wl,-soname,$(notdir $@) -lgnat operating system that has no policy as --+ library: cp -p $(lib_build_dir)/*.ali regards library placement, maybe it is Linker_Switches := "-ladael"; $(lib_dir) necessary to specify a library path at some package Linker is point. But the OP did mention Linux, and for Default_Switches ("Ada") use chmod a=r $(lib_dir)/*.ali (Linker_Switches); ifeq (release,$(BUILD)) to me this implies the GNU linker and end Linker; strip $@ tool-chain, and some sort of conformance end Adael; endif to the file system Hierarchy Standard. The third project file would build the $(lib_dir)/test_app: adael_samples.gpr Come to think of it, it is really better not samples. You would encourage your adael.gpr to write the linker path in the project file, users to write similar project files for their $(lib_dir)/test_app: $(lib_dir)/libadael.so | because the linker path tends to be own programs. $(samples_build_dir) system-dependent, whereas the project with "adael"; gnatmake -Padael_samples.gpr file is platform-neutral. I prefer to project Adael_Samples is $(notdir $@) $(args) provide the necessary "glue" in the Compiler := External ifeq (release,$(BUILD)) Makefile. ("COMPILER", "gnat"); strip $@ Target := External ("TARGET", From: Simon Wright "linux"); endif Build := External ("BUILD", $(lib_dir) $(lib_build_dir) Subject: Re: GNAT, shared libraries, "release"); $(samples_build_dir): building in different for Source_Dirs use -mkdir -p $@ ("src/samples/**"); directories...madness! for Object_Dir ..PHONY: all clean Date: Sun, 15 Oct 2006 12:00:43 +0100 use "build/" & Compiler & "/" & I think you *could* do away with GNAT Newsgroups: comp.lang.ada Target & "/samples/" & Build; for Executable_Dir project files, but that way lies madness. > There is a major problem with this use "build/" & Compiler & "/" & From: Ludovic Brenta directory should contain all source for a for Default_Switches ("Ada") use Subject: Re: GNAT, shared libraries, GUI toolkit neutral UI, in a way that ("-g", "-O2", "-gnatVa", building in different wxWidgets does currently. "-gntafno"); -- no fPIC directories...madness! end Compiler; We build several executables, each with package Linker renames Date: Sun, 01 Oct 2006 18:28:18 +0200 its own set of supporting application-, Adael.Linker; Newsgroups: comp.lang.ada intermediate- and device-level packages end Adael_Samples; > When I have to use a library, ACT plus a fair bunch of common stuff. We Now, the Makefile would glue them all suggest to add a path like: have a main GPR for each executable together, create directories as needed, and package Linker is (which can be extended by anyone who simply call gnatmake: for Default_Switches ("ada") use needs to build test programs), which calls ("-g", "--largs", up a machine-generated GPR (one for the # O mighty Emacs, this is a * Makefile * "-Ld:/dev/ada/utils/lib", whole project) which has no associated ..SUFFIXES: "-lmyutils"); source code but instead defines lots of # You can override these from the end Linker; names for various sets of paths. These # command line: This is working, and in your example names are what are used by the main COMPILER := gnat you don't specify such a path. What do GPRs. TARGET := Linux you think? BUILD := debug Each executable can be built in various # Nothing should change past this point I don't like adding "-L" in project files, contexts; variant A or B, runs on the host lib_dir := because that would make them inflexible. or on the target, etc. This is managed build/$(COMPILER)/$(TARGET)/$(BUI Also, remember that the plan is to install using case statements in the machine- LD) the project file in generated GPR. lib_build_dir := /usr/share/ada/adainclude as part of the Host_Network_Path = build/$(COMPILER)/$(TARGET)/temp/$ library's development package ("a/b/c", "a/b/d"); (presumably, libmyutils-dev), and the Target_Network_Path = (BUILD) ("w/x/y", "w/x/z"); samples_build_dir := library in /usr/lib, as part of the run-time case Platform is build/$(COMPILER)/$(TARGET)/sampl library package (presumably, when "host" => es/$(BUILD) libmyutils0). If the library is in /usr/lib, Network_Path = there is no need for "-L" in the first place. Host_Network_Path; all: $(lib_dir)/libadael.so when "target" => $(lib_dir)/test_app If you build a program that depends on Network_Path = clean: the library before the library has been Target_Network_Path; rm -rf build installed in /usr/lib, the best is to pass "-L" end case; directly to gnatmake, like so: args := -XCOMPILER=$(COMPILER) - and the main GPR says XTARGET=$(TARGET) - gnatmake -Pfoo -largs -Lbuild XBUILD=$(BUILD) for Source_Dirs use where "build" is a directory relative to the $(lib_dir)/libadael.so: build_adael.gpr | Network_Path & .... $(lib_dir) $(lib_build_dir) Makefile. gnatmake -c -Pbuild_adael.gpr

Volume 27, Number 4, December 2006 Ada User Journal 232 Conference Calendar Conference Calendar This is a list of European and large, worldwide events that may be of interest to the Ada community. Further information on items marked ♦ is available in the Forthcoming Events section of the Journal. Items in larger font denote events with specific Ada focus. Items marked with ☺denote events with close relation to Ada. The information in this section is extracted from the on-line Conference announcements for the international Ada community at: http://www.cs.kuleuven.ac.be/~dirk/ada-belgium/events/list.html on the Ada-Belgium Web site. These pages contain full announcements, calls for papers, calls for participation, programs, URLs, etc. and are updated regularly.

2007

January 03-06 Software Technology Track of the 40th Hawaii International Conference on System Sciences (HICSS- 40), Waikoloa, Big Island, Hawaii, USA. Includes mini-tracks on: Software Engineering Decision Support (topics include: Design decisions; Reuse decisions; Maintenance decisions; Selection of software tool, methods or techniques; ...); Adaptive and Evolvable Software Systems (topics include: new strategies for improved modularization in order to support adaptations; ...); Components for Embedded and Real-time Systems (topics include: Component-based product lines for embedded applications; Real-time issues of component-based software engineering; Case studies and experience reports; ...); Visual Interactions in Software Artifacts; etc. January 06-09 6th IEEE/IFIP Working Conference on Software Architecture (WICSA'2007), Mumbai, India. Topics include: tutorial on Architecting Fault Tolerant Systems, etc. January 14-16 8th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI'2007), Nice, France. Co-located with POPL'2007. Topics include: program verification, program certification, abstract interpretation, static analysis, type systems, etc.

January 15-16 ACM SIGPLAN 2007 Symposium on Partial Evaluation and Program Manipulation (PEPM'2007), Nice, France. Co-located with POPL'2007. Topics include: program manipulation, partial evaluation, and program generation. PEPM focuses on techniques, theory, tools, and applications of analysis and manipulation of programs. ☺ January 16 ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI'2007), Nice, France. Topics include: Typed intermediate languages and type-directed compilation; Type-based language support for safety and security; Types for interoperability; Type-based program analysis, transformation, and optimization; Dependent types and type-based proof assistants; Types for security protocols, concurrency, and distributed computing; Type based specifications of data structures and program invariants; Type-based memory management; Proof-carrying code and certifying compilation; etc. January 16-18 1st International Workshop on Variability Modelling of Software-intensive Systems (VaMoS'2007), Limerick, Ireland.

January 17-19 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'2007), Nice, France. Topics include: fundamental principles and important innovations in the design, definition, analysis, transformation, implementation and verification of programming languages, programming systems, and programming abstractions. January 20 POPL'2007 – Workshop on Programming Language Techniques for XML (PLAN- X'2007). Topics include: Design of programming and query languages for XML; Compilers and interpreters for XML-aware languages and optimization techniques; Languages and systems that can cope with XML fragments (messages) or very large XML instances (beyond main-memory size); Programming language glue between browsers, web services, and databases; etc. January 20 2007 International Workshop on Foundations and Developments of Object-Oriented Languages (FOOL/WOOD'2007), Nice, France. Topics include: language semantics, type systems, program analysis and verification, concurrent and distributed languages, language-based security issues, etc.

Volume 27, Number 4, December 2006 Ada User Journal Conference Calendar 233

January 22-26 OOP'2007 Conference, Munich, Germany. Topics include: requirements engineering, model-driven development, UML, Eclipse, security, etc, and applications in automation, automobile, medical, banking, telecommunications, etc. Jan. 31-Feb. 2 6th Latin American Conference on Software Engineering and Knowledge Engineering (JIISIC'2007), Lima, Peru. Topics include: Software Quality, Software Security, Software Architectures and Design, Software Engineering based on Components, Programming Languages, Software Maintenance, Software Refactoring, Software Evolution and Re-engineering, Software Aging, Patterns and Frameworks, Software Tools and Techniques, Software Development Environments, Real-Time and Embedded Software, Industrial Applications, Parallelism and Distributed Architectures, Software engineering curricula, Application of new teaching methods or techniques, etc. ☺ February 07-09 15th Euromicro Conference on Parallel, Distributed and Network-based Processing (PDP'2007), Naples, Italy. Topics include: Advanced Applications (scientific and engineering applications, multi- disciplinary and multi-component applications, real-time applications, ...); Models and Tools for Programming Environments; Distributed Systems; Languages, Compilers and Runtime Support Systems (task and data parallel languages, object-oriented languages, dependability issues, ...); Parallel Computer Systems. February 12-14 International Conference on Tests And Proofs (TAP'2007), Zurich, Switzerland. February 19-23 ARTIST2 Winter School on MOdelling, Testing, and Verification for Embedded Systems (MOTIVES'2007), Trento, Italy. Organized by ARTIST2 Network of Excellence sponsored by the 6th European Framework Programme. Deadline for registration: January 20, 2007. March 07-10 38th ACM Technical Symposium on Computer Science Education (SIGCSE'2007), Covington, Kentucky, USA.

☺ March 11 2nd Workshop on Software Tools for Multi-Core Systems (STMCS'2007), San Jose, CA, USA. In conjunction with IEEE/ACM International Symposium on Code Generation and Optimization (CGO'2007). Topics include: Programming models, Managing heterogeneity, Relationship to other parallel computing strategies, Impact on applications, Run-time management, etc. Deadline for submissions: January 23, 2007. March 11-15 22nd ACM Symposium on Applied Computing (SAC'2007), Seoul, Korea. ☺ Mar. 11-15 Track on Object-Oriented Programming Languages and Systems (OOPS'2007). Topics include: Programming abstractions; Advanced type mechanisms and type safety; Multi- paradigm features; Language features in support of open systems; Program structuring, modularity, generative programming; Distributed Objects and Concurrency; Middleware; Heterogeneity and Interoperability; Applications of Distributed Object Computing; etc.

☺ Mar. 11-15 Track on Software Engineering (SE'2007). Theme: "Developing Trustworthy Software Systems". Topics include: Trustworthy Software Systems Development; Software Testing, Validation and Verification; Model-Driven Architecture and Interface Design; Software Metrics, Cost Estimations and Benchmarking; Software Reuse and Component-Based Development; Real-Time Embedded Systems; Software Reliability Model and Implementation; Software Fault Tolerance and Software Availability; Reengineering for Safety and Security; etc. ☺ March 21-23 2nd European Conference on Computer Systems (EuroSys'2007), Lisbon, Portugal. Topics include: All areas of operating systems and distributed systems; Systems aspects of: Programming language support, Parallel and concurrent computing, Dependable computing, Real-time and embedded computing, Middleware, Security, ...; etc. March 21-23 11th European Conference on Software Maintenance and Reengineering (CSMR'2007), Amsterdam, the Netherlands. Theme: "Software Evolution in Complex Software Intensive Systems". Topics include: software migration strategies and technologies, experience reports on maintenance and reengineering, etc.

March 24-April 01 13th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS'2007), Braga, Portugal. Part of ETAPS'2007. Topics include: rigorously based tools

Ada User Journal Volume 27, Number 4, December 2006 234 Conference Calendar

and algorithms for the construction and analysis of systems; formal methods, software and hardware verification, static analysis, programming languages, software engineering, real-time systems, etc. March 25-28 The Conference for Software Practice Advancement (SPA'2007), Cambridge, UK. Topics include: Novel System Structures, What Really Works and Evolving Systems. ☺ March 26-30 21st IEEE International Parallel and Distributed Processing Symposium (IPDPS'2007), Long Beach, California, USA. Topics include: Applications of parallel and distributed computing; Parallel and distributed software, including parallel programming languages and compilers, runtime systems, middleware, libraries, and programming environments and tools; etc.

☺ Mar. 26-27 15th International Workshop on Parallel and Distributed Real-Time Systems (WPDRTS'2007). Topics include: Applications and tools; Distributed real-time and embedded middleware; Soft real-time and mixed-critical systems; QoS based resource management and real-time scheduling; Programming languages and environments; Specification, modeling, and analysis of real-time systems; etc. ☺ Mar. 26-30 Workshop on Tools, Operating Systems and Programming Models for Developing Reliable Systems (TOPMoDelS'2007). Topics include: Tools for recovery in parallel and distributed systems; Programming models and primitives for reliable distributed computing; Compilers for languages with primitives for reliability and recoverability; Compilers for domain specific languages with applications in distributed environments; Models for distributed systems; etc. ☺ Mar. 26-30 8th International Workshop on Parallel and Distributed Scientific and Engineering Computing (PDSEC-07). Topics include: parallel and distributed computing techniques and codes, practical experiences using various parallel and distributed systems, task parallelism, compiler issues for scientific and engineering computing, applications, etc.

March 27-29 13th Conference on Languages and Models with Objects (LMO'2007), Toulouse, France. ☺ April 03-06 13th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'2007), Bellevue, Washington, USA. Topics include: embedded and open real-time systems and computing. Deadline for submissions: February 1, 2007 (work-in-progress papers). ♦ April 17-19 13th International Real-Time Ada Workshop (IRTAW-2007), Woodstock, VT, USA. Topics include: early experiences in using Ada 2005 for the development of real- time systems and applications; implementation approaches for the new real-time features of Ada 2005; developing other real-time Ada profiles in addition to the Ravenscar profile; implications to Ada of growing use of multiprocessors in development of real-time systems; paradigms for using Ada 2005 for real-time distributed systems; definition of specific patterns and libraries for real-time systems development in Ada; how Ada relates to the certification of safety-critical and/or security-critical real-time systems; current ISO reports related to real-time Ada and new secondary standards or extensions; status of the Real-Time Specification for Java and other languages for real-time systems development, and user experience with current implementations and with issues of interoperability with Ada in embedded real-time systems; lessons learned from industrial experience with Ada and the Ravenscar Profile in actual real-time projects. Deadline for submissions: January 12, 2007 (position papers), March 16, 2007 (final paper). April 25-27 Software & Systems Quality Conferences (SQC'2007), Duesseldorf, Germany. ☺ May 07-09 10th IEEE International Symposium on Object/component/service-oriented Real-time distributed Computing (ISORC'2007), Santorini Island, Greece. Topics include: Programming and system engineering (ORC paradigms, languages, RT Corba, UML, model-driven development of high integrity applications, specification, design, verification, validation, testing, maintenance, system of systems, etc.); System software (real-time kernels, middleware support for ORC, extensibility, allocation, scheduling, fault tolerance, security, etc.); Applications (embedded systems (automotive, avionics, consumer electronics, etc), real-time object-oriented simulations, etc.); System evaluation (timeliness, worst-case execution time, dependability, fault detection and recovery time, etc.); ...

Volume 27, Number 4, December 2006 Ada User Journal Conference Calendar 235

☺ May 20-26 29th International Conference on Software Engineering (ICSE'2007), Minneapolis, Minnesota, USA. Theme: "Developing Dependable Software". ☺ May 22 1st Workshop on Assessment of Contemporary Modularization Techniques (ACoM.07). Topics include: Lessons learned from assessing new modularization techniques, Empirical studies, Comparative studies between new modularization techniques and conventional ones, Software metrics and quality models, etc. Deadline for submissions: February 1, 2007. ☺ May 26 4th International Workshop on Software Engineering for Automotive Systems (SEAS'2007). Topics include: all aspects of software engineering for automotive systems, specifically all facets of integration of independently developed software parts to one system with emphasis on the following aspects: software quality, safety / reliability / robustness, component orientation in embedded systems, maintenance of the integrated embedded software system and compatibility of its components over the lifecycle, etc. Deadline for submissions: January 20, 2007.

May 27-30 7th International Conference on Computational Science (ICCS'2007), Beijing, China. Theme: "Advancing Science and Society through Computation". ☺ May 27-30 4th International Workshop on Practical Aspects of High-level Parallel Programming (PAPP'2007). Topics include: high-level parallel language design, implementation and optimisation applications in all fields of high-performance computing (using high-level tools), benchmarks and experiments using such languages and tools; etc. ☺ May 28-31 5th Object Oriented Technologies conference (OOT'2007), Plzen (Pilsen), Czech Republic. Topics include: Software Engineering (software components, large-scale software, multi-language programming); Parallel and Distributed Computing (multithreading, distributed applications, ...); Programming Languages and Techniques (object-oriented techniques, programming paradigms, assertion support); Educational Aspects (teaching object-oriented paradigm, educational software); Software Security; Development on Different Platforms; Industrial Applications of Object Oriented Technologies; etc. Deadline for submissions: February 14, 2007 (abstracts), February 28, 2007 (papers).

☺ May 29-Jun. 01 DAta Systems In Aerospace (DASIA'2007), Naples, Italy. June 06-08 1st IEEE & IFIP International Symposium on Theoretical Aspects of Software Engineering (TASE'2007), Shanghai, China. Topics include: Specification and Validation, Component- based Development, Software safety and reliability, Reverse Engineering and Software Maintenance, Embedded and Real-time Software, Model-driven Development, Parallel and Distributed Computing, Program Analysis, Semantics and Design of Programming Languages, Type Theory, etc. Deadline for submissions: January 22, 2007 (titles and abstracts), January 28, 2007 (papers). ☺ June 09-16 3rd History of Programming Languages Conference (HOPL-III), San Diego, CA, USA. Co-located with FCRC'2007.

☺ June 11-14 7th International Conference on Algorithms and Architectures for Parallel Processing (ICA3PP'2007), Hangzhou, China. Topics include: Distributed & Parallel Middleware, Parallel Programming Paradigms, Tools & Environments for Parallel & Distributed Software Development, etc. ☺ June 14 PLDI2007 - ACM SIGPLAN Workshop on Programming Languages and Analysis for Security (PLAS'2007), San Diego, California, USA. Topics include: the use of Programming Language and Program Analysis Techniques to improve the Security of Software Systems; Language-based techniques for security; Program analysis techniques for discovering security vulnerabilities; Specifying and enforcing security policies for information flow and access control; etc. Deadline for submissions: April 1, 2007. June 18-21 Systems and Software Technology Conference (SSTC'2007), Tampa Bay, Florida, USA. ☺ June 24-28 Technology of Object-Oriented Languages and Systems (TOOLS Europe'2007), Zurich, Switzerland. Topics include: all aspects of object technology and neighbouring fields, in particular model-based development, component-based development, and patterns (design, analysis and other applications); more generally, any contribution addressing topics in advanced software technology. Deadline for submissions: February 1, 2007 (technical papers), March 1, 2007 (workshops).

Ada User Journal Volume 27, Number 4, December 2006 236 Conference Calendar

June 25-27 12th Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE'2007), Dundee, Scotland, UK. June 25-28 2007 World Congress in Computer Science, Computer Engineering, and Applied Computing (WORLDCOMP'2007), Las Vegas, USA. Deadline for submissions: February 20, 2007 (papers). ♦ June 25-29 12th International Conference on Reliable Software Technologies - Ada-Europe'2007, Geneva, Switzerland. Sponsored by Ada-Europe, in cooperation with ACM SIGAda. Deadline for submissions: January 10, 2007 (industrial presentations). June 25-29 27th International Conference on Distributed Computing Systems (ICDCS'2007), Toronto, Canada. Topics include: all aspects of distributed and parallel computing. ☺ July 01-02 12th International Workshop on Formal Methods for Industrial Critical Systems (FMICS'2007), Berlin, Germany. Affiliated with CAV'2007. Topics include: Design, specification, code generation and testing with formal methods; Verification and validation of complex, distributed, real-time systems and embedded systems; Verification and validation methods that aim at circumventing shortcomings of existing methods with respect to their industrial applicability; Tools for the design and development of formal descriptions; Case studies and project reports on formal methods related projects with industrial participation (e.g. safety critical systems, mobile systems, object-based distributed systems); Application of formal methods in standardization and industrial forums. Deadline for submissions: March 30, 2007 (abstracts), April 6, 2007 (papers).

☺ July 05-08 6th International Symposium on Parallel and Distributed Computing (ISPDC'2007), Hagenberg, Austria. Topics include: Parallel Computing; Algorithms, Models and Formal Verification; Tools and Environments for Program Analysis; Task and Communication Scheduling and Load Balancing; Real- time Systems; Distributed Software Components; Real-time Distributed Systems; Security; Fault Tolerance; Applications and Case Studies; etc. Deadline for submissions: January 29, 2007. ☺ July 09-12 2007 International Conference on Software Engineering Theory and Practice (SETP-07), Orlando, FL, USA. Topics include: all areas of Software Engineering and all related areas, such as: Component- based software engineering; Critical and embedded software design; Distributed and parallel systems; Distribution and parallelism; Education (software engineering curriculum design); Embedded and real- time software; Empirical software engineering and metrics; Evolution and maintenance; High assurance software systems; Interoperability; Legal issues and standards; Object-oriented techniques; Program understanding issues; Programming languages; Quality management; Real-time software engineering; Reliability; Reverse engineering and software maintenance; Software architectures and design; Software components and reuse; Software cost estimation techniques; Software design and design patterns; Software engineering methodologies; Software engineering versus systems engineering; Software policy and ethics; Software reuse; Software safety and reliability; Software security; Software testing, evaluation and analysis technologies; Software tools and development environments; Survivable systems; Technology adoption; Verification, validation and quality assurance; etc. Deadline for submissions: February 1, 2007 (draft papers). ☺ July 22-25 2nd International Conference on Software and Data Technologies (ICSOFT'2007), Barcelona, Spain. In conjunction with ENASE'2007. Topics include: Programming Languages (Object-Oriented Programming, Languages and compilers, ...); Software Engineering (Reliable software technologies, Dependable computing, Software components, Software maintenance, Real-time software, Software economics, ...); Distributed and Parallel Systems; etc. Deadline for full paper submissions: March 26, 2007.

☺ Jul. 30-Aug. 03 21st European Conference on Object-Oriented Programming (ECOOP'2007), Berlin, Germany. Topics include: all areas relevant to object technology. August 12-15 26th Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC'2007), Portland, Oregon, USA. ☺ August 28-31 13th International Conference on Parallel and Distributed Computing (Euro-Par'2007), Rennes, France. Topics include: the promotion and advancement of all aspects of parallel and distributed computing, such as support tools and environments, distributed systems, parallel and distributed programming, etc. Deadline for submissions: January 26, 2007 (full papers), April 2, 2007 (workshops).

Volume 27, Number 4, December 2006 Ada User Journal Conference Calendar 237

☺ September 03-07 16th International Conference on Parallel Architectures and Compilation Techniques (PaCT'2007), Pereslavl-Zalessky, Russia. Topics include: New trends and models in Parallel Programming; All aspects of the applications of parallel computer systems; Languages, environment and software tools supporting parallel processing; General architecture concepts, enabling technologies; Teaching parallel processing; etc. Deadline for submissions: January 20, 2007 (full papers), February 5, 2007 (extended abstracts). ☺ September 04-07 International Conference on Parallel Computing 2007 (ParCo2007), Juelich & Aachen, Germany. Topics include: all aspects of parallel computing, including applications, hardware and software technologies as well as languages and development environments. Deadline for submissions: March 4, 2007 (abstracts, mini-symposia), May 15, 2007 (presentations), July 31, 2007 (full papers). ☺ September 18-21 26th International Conference on Computer Safety, Reliability and Security (Safecomp'2007), Nuremberg, Germany. Deadline for submissions: February 2, 2007 (abstracts), March 9, 2007 (full articles).

☺ September 26-28 3rd Latin-American Symposium on Dependable Computing (LADC'2007), Morelia, Mexico. Topics include: Dependability Modeling, Prediction and Evaluation; Dependable Applications; Distributed Systems; Parallel, Clustered and Grid Systems; Real-Time and Embedded Systems; Safety-Critical Systems; Security of Computing Systems; Software Engineering of Dependable Systems; Software Reliability; Software Testing, Validation and Verification; Survivability of Computing Systems; etc. Deadline for submissions: March 20, 2007 (papers, experience reports), May 31, 2007 (tutorials). ♦ November 04-08 2007 ACM SIGAda Annual International Conference (SIGAda'2007), Washington, DC, USA. Sponsored by ACM SIGAda (Approval pending by ACM). December 10 Birthday of Lady Ada Lovelace, born in 1815. Happy Programmers' Day!

2008

June 13th Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE'2008), Madrid, Spain.

Ada User Journal Volume 27, Number 4, December 2006 244 Using CORBA to Bring New Life to Legacy Ada: an Experience Report Jean-Claude Mahieux, Bernard Maudry, Andrew Foster PrismTech, Parc Fontaine de Jouvence - 4 rue Angiboust 91460 - Marcoussis - FRANCE. email: [email protected]

Abstract • Add an external Java GUI to facilitate access to large data structures In this short paper we report on a successful experience (of which we were happy protagonists) • Use COTS components whenever possible. with the migration of a sizeable legacy Ada 3 Technical issues application to a new execution platform including the interaction with heterogeneous languages and The application was first migrated to Ada 95. CORBA was components. We briefly illustrate the challenges we immediately recognized as an obvious possible solution to faced and the key choices we made to address them. share data between Java and Ada components in a standard We then conclude by drawing some lessons learned manner. The PrismTech team (the authors) were invited to that could be of interest to other users. join the project as CORBA experts. In the system in question the data structures that needed to 1 Introduction be shared were huge, whereby system performance was a significant issue. It was therefore clear that converting In the context of continuously evolving software types between the legacy world and the CORBA world technologies, the question of whether to invest in the should be avoided in so far as possible. preservation of existing Ada software often arises. This Our consideration of the fact that the system paper will describe how new innovative techniques that use implementation was based on a dictionary of large Ada CORBA can be deployed to extend the lifetime of an types, which was generated from an application existing Ada system significantly and with low effort. specification lead us to the following conclusions: The paper illustrates an example a combat management • We should try to focus on typing, and try to system developed completely in Ada. After describing the replace current typing with an equivalent CORBA existing system and the key requirements placed on the mapping. By doing this, we would be able to upgrade of the system, we discuss how we devised the support the legacy Ada code without changes. An notion of a “rich IDL” to easily integrate CORBA in a important implication in this regard was that any legacy system. previous testing would still be valid. 2 Status and objectives • We should continue to exploit automatic code The existing system was configured as follows: generation, not only for efficiency reasons, but also to ease integration in the application • Targeted to HpUX and HpRT generation process. • Written in Ada83 4 Creation of a “rich” IDL • Using proprietary legacy middleware In order to meet these goals it was decided that the Ada • Subject to critical performance requirements. types dictionary should be expressed in the CORBA IDL. To achieve this in a controlled fashion, we decided to The following key requirements were instead placed on the implement an Ada to IDL translator. system upgrade: Most Ada types could find an obvious IDL equivalent, • Retarget to Linux as the underlying operating including packages transposed to IDL modules. system For some Ada constructs that had no direct equivalence in • Migrate existing code to Ada95 IDL we introduced pragmas to preserve the Ada type • Maintain compatibility with the required external information in the generated IDL files (e.g., subtypes, components via the legacy middleware ranges, etc. ...) • Do not incur degradations of system performance

Volume 27, Number 4, December 2006 Ada User Journal J-C Mahieux, B Maudry, A Foster 245

The output generated by the ada2idl translator is what we 6 Technical considerations and assessment called a “rich” IDL, which provides all of the information we required to re-generate ready-to-compile Ada packages. 6.1 Automated control on new typing To ensure that correct system behaviour was preserved, a We illustrate this notion by relating a fragment of the test program was automatically generated, compiled and original Ada code to the corresponding IDL definition: built with both the original and the newly generated types. package X is Both versions of the test program were shown to generate type T_Short is range - 32768 .. 32767; an equivalent output, thereby proving that no property of type Percent is new T_Short range 0 .. 100; the data types were corrupted by application of the subtype Another_Short is T_Short range 0 .. 1000; ada2idl/idl2ada transformations. end X; 6.2 Limitations in the rebuilt application Below we show the output of the ada2idl translator: We did incur some limitations, though, which prevented us from achieving full preservation of properties. For module X { example, some arrays where the indexes were enumerated typedef short T_SHORT ; types could not be expressed in IDL and therefore had to be # pragma OrbAda_Directive expressed as standard arrays. In this case the only # "Range" "T_SHORT -32768 32767" modifications that were necessary in the application code typedef T_SHORT PERCENT; were with indexes 'pos and 'val. Fortunately, the number of # pragma OrbAda_Directive lines to modify to address the problem was very small # "Range" " PERCENT 0 100" indeed and the application was thus easily rebuilt on top of # pragma OrbAda_Directive the new types dictionary generated by the idl2ada # "Insert_Line" " compiler. As expected, the rebuilt application still ran subtype ANOTHER_SHORT is T_SHORT correctly. range 0 .. 1000 ;" } ; 6.3 Addition of an interface 5 IDL to Ada generation In order to make the application CORBA-compliant it was still necessary for us to equip it with a CORBA interface. The subsequent step was to enhance our idl2ada compiler This requirement was satisfied by providing a Java GUI to understand the pragmas retained in the input source, so with the ability to register a CORBA callback. By doing that the generated Ada packages would embed all the this the GUI would be notified automatically of each track original type details. update. To illustrate what we wanted to achieve we show below a 6.4 The middleware main loops sample of the Ada code generated by our idl2ada compiler An important functional requirement on the resulting from the adove IDL module. application was that is should manage CORBA messages in ======parallel with messages generated by the legacy middleware. -- === Code automatically generated by IDL to Ada To address this need, we contemplated two possible -- === compiler OrbAda-idl2ada solutions: -- === Copyright Top Graph'X 1997-2005 • When the operation of the application is not ======thread-safe or else requires polling, then methods: -- From IDL file X.idl ORB.work_pending and ORB.perform_work with Corba_Ios; could be used in combination. with Corba.Object; • Otherwise the ORB.run method will block the package X is current thread and dispatch incoming CORBA requests. type T_SHORT is new Corba.Short range -32768 .. 32767 ; The latter solution was used in the particular case of our for T_SHORT'size use 16; project. type PERCENT is new T_SHORT 6.5 Use of IDL by Java/C++ environments range 0 .. 100 ; We are very well aware that any user-defined pragmas are for PERCENT'size use 16; not recognized by third-party idl compilers, and are subtype ANOTHER_SHORT is T_SHORT consequently ignored. However, they are meant to be Ada range 0 .. 1000 ; specific and as such it is not required that they should be understood when compiling the idl to Java or C++ end X; environments. For this reason and for those purposes idl compilers from other vendors can be used with the idl unmodified with no problem.

Ada User Journal Volume 27, Number 4, December 2006 246 Using CORBA to rejuvenate an Ada legacy software: an experience report

6.6 Robustness gained in the interface between time, thereby preserving system performance and Java/C++ and Ada applications also permitting legacy Ada interfaces to remain A side effect of supporting a “rich” IDL is that when unchanged CORBA requests from Java/C++ clients are dispatched to • Add the CORBA bindings required to support the the Ada system with incorrectly initialized parameters, an Ada type system. Ada exception (“Constraint_Error”) is generated upon reading the request parameters. The exception is then Having taken those steps, permitted us to exploit a vast caught by the CORBA library, which in turn returns a span of automatic code generation techniques, which made standard CORBA exception (“Impl_Limit”) to the client. the task of migrating a huge amount of legacy code This feature does indeed buy some increased robustness to dramatically more efficient. the system in the regard of the interaction between Furthermore, being able to support the legacy Ada code heterogenous application components. without changes also meant that any previous testing was 7 Summary of key migration points still valid. Overall, we can summarize the key steps we took in 8 Conclusion performing the required migrations as follows: By following the approaches and strategy outlined above, • Develop new ad-hoc tools, such as an Ada to IDL the existing Ada combat management system was compiler, to perform the automatic generation of successfully upgraded with minimum cost and, most type-safe IDL specifications for existing Ada notably, within project deadlines. interfaces Consequently, as a result of the project effort, the legacy • Extend the CORBA IDL to more closely support Ada application had been “CORBA enabled”, while at the the Ada type system. This provision will remove same time, the original Ada interface had been fully the need for inefficient data conversions at run retained.

Volume 27, Number 4, December 2006 Ada User Journal 248 The Publisher Framework Judith Klein1, Drasko Sotirovski2 1 Lockheed Martin, 9211 Corporate Boulevard, Rockville, MD 20850, USA. email: [email protected] 2 Raytheon Canada Ltd, #150-13575 Commerce Parkway, Richmond, BC, V6V 2L1, CANADA. email: [email protected] Abstract focused, we are not going to compare PFW with CORBA or J2EE, which have since started including fault tolerant One of the lasting challenges in building distributed elements. We hope to provide enough insight into PFW for fault tolerant systems is keeping application code size the readers to make that comparison on their own. The fact and complexity down. This can be done by capturing that PFW provides cross-language support (ERAM the nuances of distributed computing environment components are split between Ada and C++) was also ruled and redundant fault tolerant elements into a common outside the scope of this particular discussion. infrastructure layer, thus factoring the code that would otherwise need to be written again and again 2 Distributed Software Components by each distributed fault tolerant software component. Our expertise is in building large scale, distributed, fault When the application code has many complexities, tolerant, near real-time systems. The application domain and Air Traffic Control (ATC) is certainly one such we’ve been concentrating on for over the last 15+ years has example, achieving this goal becomes paramount. been air traffic control. We, at Lockheed Martin, had Under a project called En Route Automation already developed and fielded a robust infrastructure called 1 Modernization (ERAM), the Federal Aviation FlightDeck™ (see Figure 1), which provides a rich set of Administration (FAA) is developing a replacement for relevant services. We proceeded to concentrate on the its aging en route assets. At the same time, a domain of air traffic control. Here we started with a data foundation is being created for the anticipated future model and ended with a set of software components, a enhancements, driven by the projected increase in air description of how the components should behave, with a traffic. At the core of the ERAM design is a common behavioral pattern and a strict dependency 2 distributed object oriented (OO) framework called hierarchy for ease in building the system. This inevitably Publisher FrameWork (PFW), which is ERAM’s led to PFW, an infrastructure extension which captures and answer to the aforementioned OO challenge. This reinforces this pattern. paper describes the PFW properties, the experiences with it accumulated through the first build of the 3 Component Definition ERAM program, and its applicability to fault tolerant A component is a logical grouping of software whose computing. definition is based on the problem domain. A software 1 Introduction component provides a cohesive set of services, exports a well defined interface (application programming interface, Distributed computing is 20+ years old, but it only took the API); it encapsulates implementation details (internal main stage with the explosion of networking and the databases, data structures and internal functions are hidden internet in particular. The outburst of distributed computing from the client). Furthermore, software components can be frameworks (CORBA, J2EE, .NET, to name just the few independently developed and tested. most popular) is no surprise and one should expect a 3.1 Methodology Used to Define Components plethora of distributed computing environments before some of the difficult issues in distributing computing are Objects in the problem domain (e.g., airport, route, target settled satisfactorily. From this point of view, PFW is no report) form natural dependencies and relationships (e.g., a exception: just one of the many! Although true to an extent, flight plan has a departure point, a destination and a route). PFW is also more: an attempt to raise the bar and attack not Following this well established software engineering only the relatively simple issues of messaging/dispatching, principle, we grouped cohesive objects into software but also some rather difficult issues related to components in a manner in which interfaces between encapsulation, extensibility, scalability, performance, and components were minimized. In the process, we established availability, all with no significant increase in application dependency rules among components: a hierarchy of code size and complexity. PFW is a lightweight components which is strictly enforced in the build process. framework: it enables applications to focus solely on the application domain. 1 FlightDeckTM is a trademark of Lockheed Martin. In the subsequent sections, we describe the software 2 One of us, while working on the Canadian Automated Air Traffic System component methodology we have followed and the (CAATS), developed a common middleware layer with similar properties resulting need for publication services, mirror storage and to PFW (see references [1] and [2]), leading us to believe that these system types are conducive to such software designs. subscriber synchronization. To keep our experience report

Volume 27, Number 4, December 2006 Ada User Journal J Klein, D. Sotirovski 249

Figure 1: Side-Bar on FlightDeck Middleware.

Figure 2: FAA En Route Air Traffic Control.

Ada User Journal Volume 27, Number 4, December 2006 250 The Publisher Framework

Component definitions are advertised in terms of provided needed to implement an air traffic control system, along services on the encapsulated data objects. Added benefits with their interfaces and interactions) for use in “User of this approach are: extensibility (e.g., additional Request Evaluation Tool”. This tool is now deployed components are built using existing components, promoting nation-wide; it automatically predicts and notifies re-use of existing components) and ease of component controllers of conflicts between aircraft or special activity replacement (as long as the API is invariant, the airspace. The system also allows controllers to quickly implementation can change). determine whether proposed flight path changes will conflict with en route traffic or airspace. By allowing 4 Component Deployment to Physical controllers to evaluate route change requests and to assign Nodes conflict free routing, the airspace users are able to save An executable is a physical grouping of software, an both time and fuel. independently start-able, stoppable program: with Unix, For the first implementation each component’s behavior this is a single process that may includes multiple threads. was described from an architecture standpoint – the pattern Definition of executables is based on the knowledge of the was defined, but no common framework was provided. The physical architecture and with fault tolerance in mind: the resulting implementation proved that the concepts were executable is a unit of failure, while a thread is a unit of solid. However, we noticed that there was large variation in concurrency. Executables we build in the air traffic control the implementation specifics of components, as well as domain, follow the event-driven model: some degree of code duplication for common component a) Multiple threads of execution are packaged into behavior. We concluded that benefits could be reaped from the same executable. factoring out the common behavior into a common framework: b) Each thread of execution is in a forever loop waiting for events, servicing each event in priority a) Overall code size could be reduced. order, making synchronous (e.g., library calls) and b) Errors in implementing the of the asynchronous service requests (e.g., to a service component framework could be eliminated when residing on a different node). correcting them once in the common framework. c) For asynchronous requests the address of a c) Components would be more maintainable since callback procedure is provided to the service: they would be concentrating on the domain when the service completes, the callback is expertise rather than on framework matters. invoked with the results. Such observations led us to the development of the A component spans executables. Parts of a component can Publisher FrameWork (PFW) on which most3 components be bound into a server/publisher executable resident on one in the air traffic control domain of ERAM are now built. As node, while other parts of the same component are bound we prototyped PFW, we found more and more common into a client/subscriber executable resident on a different behavior to be factored and included into PFW, such as node (this is similar to the J2EE concepts of local and data redundancy for fault tolerance. remote interfaces or CORBA proxies and skeletons). The data exchange between the publisher of the component and 5 The Publisher Framework the subscriber is internal to the component: the format of The Publisher FrameWork (PFW) provides a framework that exchange can be modified without impacting the users for uniform, consistent development of software of the component’s services (since they access the components. The design pattern (see Figure 3) implements component strictly by using the API); in other words, support for: whether the data is encoded for transmission (a.k.a. serialized) into XML format, binary format, or something a) A server to publish objects to subscribers and to else, the users of the components are unaffected as long as process requests from clients. the APIs used to access the objects (attributes, methods) are b) An agent acting as a local subscriber to receive constant. Publishers of multiple components can be bound published objects, translate them into messages together into a single executable, along with a number of and multicast them to all remote subscribers. The other components’ client-side code to achieve the use of multicast mechanism makes PFW scalable application mission (e.g., detecting conflicts between to the hundreds of positions that must be aircraft). supported in an en-route center. We describe the physical software architecture by showing c) A proxy to receive multicast messages, translate the placement of defined executables on nodes (processors) them back into objects and republish them to local of the hardware architecture and by showing the parts of clients. The component user, when notified that an components that were bound together to form each update has arrived, is guaranteed that the mirror is executable.

Lockheed Martin defined and implemented a first version 3 Some legacy components were not converted to using PFW to minimize of the component model (i.e. the collection of components change of working components.

Volume 27, Number 4, December 2006 Ada User Journal J Klein, D Sotirovski 251

current, i.e., the update has been applied to the queries. The existence of the mirror provides the content of the mirror; therefore the component client with the convenience of accessing the data user can make queries against the object attributes not only when the information is received, but also from within the context of the call-back. as part of other processing, such as the expiration Additionally, the proxy facilitates requests from of a timer. In response to a request to update a the clients to the server; a watchdog timer is used server object, the mirror is updated before the to monitor the arrival of a timely reply from the confirmation is delivered to requestor, so that the Server – the client is therefore guaranteed to be requestor can reach into the mirror and access notified either about the completion of the request object attributes and methods with the assurance or about its timeout. that the object is up-to-date. d) A mirror to augment the proxy by retaining a copy of the data published by the server for use in local

Figure 3: Anatomy of PFW distributed service.

In ERAM, for which PFW was developed, all the software 5.1 Mirror and Original, Queries and Updates components are known – their names (server name, As introduced above, a mirror encapsulates client-side published data-stream name) and APIs are documented; all storage of object replica matching the original objects of necessary discovery is done by infrastructure alone, which the server’s internal database. In other words, the client- 4 locates the registered server(s), selects the Primary side proxy subscribes to (registers interest in) the data- executable of that server, and delivers client requests to the stream published by the server; when a publication is server. received, the proxy first updates the object replica in the Note that there is a plethora of requirements implemented mirror storage; other local clients can then safely be by PFW on behalf of all components that are less invoked with the guarantee that the mirror is current and interesting to describe in this paper, yet helpful to the consistent with the server’s internal database. Having a component implementers just the same; one example is mirror presents the advantage of being able to perform invoking the recording service and error reporting service synchronous queries against the local object cache. (to log commonly recorded events and data) for detected Requests for update of an object are asynchronous: the errors. request is forwarded to the server (whether local to the executable or remote); a call-back procedure is provided so that it can be invoked when the results of the asynchronous update are received. All updates to an object are performed 4 See details on Primary vs. Standby in Figure 1: Side-Bar on FlightDeck Middleware. only by the owner of the object (the server/publisher, not a mirror – merely a copy of the object is stored in the mirror).

Ada User Journal Volume 27, Number 4, December 2006 252 The Publisher Framework

A simple and robust approach insures consistency of the from experience, easier said than done. PFW implements data throughout. near perfect transparency relative to both outstanding requests and clients registered for notification. In the Finally, local clients can be notified of changes (in addition following paragraphs, we describe some of the usual yet to being able to query the local mirror storage). There are intricate obstacles in achieving these goals (and give the two kinds of registration: meaning of ‘near-perfect transparency’, ‘more-or less hot (a) For all objects of a class, resulting in the registrant standby’, etc.). being notified whenever an object is created Not only redundant servers fail, but clients can fail too. (added to the mirror storage), deleted (removed Having no redundancy, such computing elements need to from the mirror storage) or updated (modified in get back in sync with the rest of the distributed the mirror storage); environment, which poses additional challenges; in (b) For a specific instance, resulting in the registrant particular for getting the new members back in sync with being notified whenever that instance is modified, no adverse performance impact on the system. PFW including deletion. approach to solving this issue is deemed outside the scope of this particular discussion and readers interested in it are In conclusion, the object replica PFW maintains in the referred to [3]. mirror storage is, from a client’s perspective, virtually indistinguishable from the original: it can be observed 5.3 Enhancements under Consideration through registration/notification, queried and updated – At the time the primary service failed, it may have been albeit in an asynchronous fashion. This provides near- processing a request from a client, with more requests stuck perfect object location transparency. Only the fact that in its input queue. To make the switchover transparent to update methods are asynchronous hint to a client that the clients, all these requests need to be processed, with the target object may or may not be local. In any other respect, new primary taking over where the old primary stopped. the client-side replica is indistinguishable from the original object. Obviously, the request being processed at the time the Primary failed may be the killer request and automatically 5.2 Fault Tolerance reprocessing it exposes the system to the common mode A primary-standby pattern is a standard arrangement for failure. All other requests are safe to reprocess (in high integrity systems. particular if addressed to other object instances). PFW currently makes clients with outstanding requests decide. The goal is always one and the same: to provide full Clients will receive a time-out on the request and must protection from hardware faults and protection from at least decide to resubmit it or not. PFW improvements under transient software faults. In industrial applications, like consideration include a means for clients to find out if the ATC systems, the failure model is always fail-safe, but its request is suspected to be the killer (i.e. if this very request dynamic characteristics vary from component to was processed when the primary failed) as well as component, depending on the component criticality and the automatic resubmission of the requests stuck in the input required switchover time. Components in ERAM range queue of the primary at the time it died, provided they are from active fail-silent (all redundant elements are active not directed to the same object as the killer request. See and at all times ready to provide services) to passive fail- points 1, 2 in Figure 4 PFW Facilitated Switchover of a stop (redundant elements are available but become active Component. only after the primary had failed). In other words, primary provides the service with a (more-or-less hot) standby Objects in the server are not only state; in addition to the ready to replace it in case of a failure. In addition, if a state, an object may have some dynamic context, e.g. an service fails when no standby is available, the service can outstanding timer to do something. This dynamic context be restored with little or no loss in can of course be mirrored by the hot standby. However, this makes primary and standby go through the same functionality from the checkpoint data that the primary and computational history and increases the likelihood of standby have saved on disk. simultaneous primary-standby failure. For this reason, When prototyping PFW, we concluded that we can include many system designs (including PFW) opt for recreating support for the required spectrum of Standby designs by this dynamic context upon switchover. So far so good, but simply making the Standby a Subscriber to the very data- processing requests is only possible after the dynamic stream its Primary is publishing, as described in Figure 4. context is re-established. Yet re-establishing the dynamic The essence of PFW fault tolerant behaviour, from a client context for thousands of objects can take a significant perspective, is best described by simply stating: the client amount of time resulting in an unacceptable hiccup in side object replicas are transparently rewired from the system performance immediately after a switchover. originals in the failed primary to the new originals in the PFW’s answer to this significant challenge is described in new primary. This is however, as many a reader will know Figure 5 at point points 3, 4.

Volume 27, Number 4, December 2006 Ada User Journal J Klein, D Sotirovski 253

Figure 4: PFW support for fault tolerance. 6 Conclusions • Sam Carnicelli, Chief Designer with Lockheed Martin Transportation and Security Solutions, High availability systems have needs above and beyond the Cato, NY functionality provided by the contemporary commercial middleware (CORBA, J2EE, .NET, to name a few). ERAM • This work was performed under the contract from successfully serves these needs through PFW by extending the Federal Aviation Administration, DTFA01-03- the middleware services to provide location transparency C-00015. The support and review from Jeff and fault tolerance. As additional common behavioral O’Leary, FAA ERAM Product Team Software patterns become apparent, the authors will consider Lead is especially noted and appreciated. incorporating capabilities to address these into future PFW References releases. In return, an important part of common and intricate implementation is factored while leaving the [1] [1] Thompson, C., J., Celier, V., DVM: an object- application domain to remain focused on solving domain oriented framework for building large distributed Ada issues. systems, TRI-Ada '95, Anaheim, CA Acknowledgements [2] [2] Sotirovski, D., Towards Fault-tolerant Software Architectures, Working IEEE/IFIP Conference on The authors acknowledge the following people who made Software Architecture (WICSA 2001), 28-31 August significant contributions to the concept definition, 2001, Amsterdam, The Netherlands. prototype, design and development of PFW: [3] [3] Sotirovski, D., Time Horizon in Distributed Object • Tim Donovan, Software Architect with Raytheon Societies, a companion paper submitted at SIGADA Integrated Defense Systems, Tewksbury, MA 2006.

Ada User Journal Volume 27, Number 4, December 2006 254 The Publisher Framework

Figure 5: PFW facilitated switchover of a component.

About the Authors Drasko Sotirovski is a software architect at Raytheon Systems Canada. He has 27 years of experience in Judith Klein is a certified systems architect at Lockheed developing large-scale real-time software for defence, Martin Transportation and Security Solutions. She has 28 simulation, transport, and telecommunication systems for years of experience developing distributed real-time several European and North American customers. His systems of various sizes in different domains; the last 15 research interests are software architecture and distributed years have been focused on air traffic control. She has a BS object-oriented technologies. He received a BSc in in applied mathematics and computer science from technical physics and computer science from Carnegie Mellon University in Pittsburgh, PA and an MS in Elektrotehnicki Fakultet u Beogradu, Yugoslavia. He is a technical management from Johns Hopkins University in member of the IEEE Computer Society and the Association Baltimore, MD. She is a senior member of the IEEE and a for Computing Machinery. He is also a PEng with the new member of the Association for Computing Machinery. CSED (Computer and Software Engineering Division) branch of APEG BC.

Volume 27, Number 4, December 2006 Ada User Journal 256 Ada-Europe 2006 Sponsors

AdaCore 8 Rue de Milan, F-75009 Paris, France Contact: Zépur Blot Tel: +33-1-49-70-67-16 Fax: +33-1-49-70-05-52 Email: [email protected] URL: www.adacore.com

Aonix 66/68, Avenue Pierre Brossolette, 92247 Malakoff, France Contact: Jacques Brygier Tel: +33-1-41-48-10-10 Fax: +33-1-41-48-10-20 Email : [email protected] URL : www.aonix.com

Green Hills Software Ltd Dolphin House, St Peter Street, Winchester, Hampshire, SO23 8BW, UK Contact: Christopher Smith Tel: +44-1962-829820 Fax: +44-1962-890300 Email : URL : www.ghs.com

I-Logix 1 Cornbrash Park, Bumpers Way, Chippenham, Wiltshire, SN14 6RA, UK Contact: Martin Stacey Tel: +44-1249-467-600 Fax: +44-1249-467-610 Email : [email protected] URL : www.ilogix.com

Praxis High Integrity 20 Manvers Street, Bath, BA1 1PX, UK Systems Ltd Tel: +44-1225-466-991 Fax: +44-1225-469-006 Contact: Rod Chapman Email : [email protected] URL : www.sparkada.com

Ellidiss Software Triad House, Mountbatten Court, Worrall Street, Congleton, CW12 1DT, UK TNI Europe Limited Tel: +44-1260-29-14-49 Fax: +44-1260-29-14-49 Contact: Pam Flood Email: [email protected] URL: www.ellidiss.com

Volume 27, Number 4, December 2006 Ada User Journal