16

I'm doing a trade study for Ada development on Linux. Do you have any good compiler/OS recommendations?

So far, I've got GNAT from AdaCore running on CentOS 5.4, and I have license requests in for Rational Apex and Aonix ObjectAda.

This is a porting effort. The original codebase is Apex 3.0 on OSF1 4.0d.

Anything else I should be considering? Ideally, it would be a supported environment.

ire_and_curses
  • 68,372
  • 23
  • 116
  • 141
Dave
  • 4,546
  • 2
  • 38
  • 59
  • 5
    A rewrite is not an option. It's 1.5 million lines of code. – Dave Jan 14 '10 at 20:09
  • 2
    GNAT runs on Linux, in general, so you needn't worry much about a particular distribution. In fact, the FSF version of GNAT is distributed as part of all major Linux distributions. An AdaCore supported GNAT might be a bit more distribution-limited, you'd have to check with them. – Marc C Jan 14 '10 at 20:48
  • 2
    Oh, and I singlehandedly ported 1.2 MSLOC of Ada (GNAT) and about 200 KSLOC of C (gcc) from Silicon Grahics/IRIX to PC/Linux over a 4-month period a couple years ago. The Ada took about 2 weeks, I lost much hair over the rest... (:-) – Marc C Jan 14 '10 at 20:52
  • 7
    @bmargulies: Nice display of ignorance there. Even if Ada were a totally crappy language (hint from someone who's acutally used it: It's not), only a total moron tries to recode 1.5 millon lines of code into another language to do the exact same thing when a compiler for its native language is available. That would be almost criminal stupidity. – T.E.D. Jan 15 '10 at 15:00
  • 1
    @bmargulies: Just out of curiosity, why do you think Ada is a bad language? I don't know much about it yet but it's really interesting to me as an alternative to C seeing as DoD uses it and wont use anything else. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Jan 21 '10 at 18:29
  • 1
    @bmargulies: What do you mean "everyone implements a different 2/3"? It's been 25 years since anyone did an Ada subset compiler. The Ada language definition consists of a core definition and annexes. Every vendor implements the core, or else it's not Ada. I don't know of any vendor that doesn't also implement at least Annexes A (Standard library) and B (Interfaces to other languages), and vendors are mixed on the remaining ones, some are easy (Numerics) some are harder (Distributed Systems). – Marc C Jan 26 '10 at 13:41
  • 1
    @Longpoke: Ada is really interesting in itself and as an alternative to C. Unfortunately I have to correct you about its usage in DoD. The Ada mandate was lifted back in the mid-90s (though it had been widely ignored anyway), and while Ada's largest code bases are in DoD systems I don't know of any large system starts being done in Ada, though existing systems are being maintained and will continue to be active for many years to come. There are pockets of small and mid-size efforts going on, including new starts, but those are mostly due to championing by dedicated Ada software engineers. – Marc C Jan 26 '10 at 13:47

4 Answers4

13

One issue you need to take into consideration is to determine to what degree your system that's being ported utilizes vendor-supplied packages to perform its function. What I've seen with older, large systems, especially Apex ones, is a propensity for the language gurus during its development time to have decided that vanilla Ada just wasn't good enough, and so tie into all these vendor-supplied packages. If that's what your system does right now, it's a strong argument for upgrading within the vendor and sticking with Apex (all other things being mostly equal).

Whenever I've done ports of such systems, if given the opportunity I've done my best to tear out all the vendor-supplied stuff--nine times out of ten replacing the vendor-specific stuff with vanilla Ada implementations worked just as well, and you no longer have to deal with the quirks of a compiler-specific package. Plus, you increase the portability and maintainability of the system, allowing it to better adapt to future changes.

Marc C
  • 8,664
  • 1
  • 24
  • 29
  • Thank you, this is excellent advice to consider. Excepting any worthwhile new compiler recommendations in the next few days, I'll mark this as the answer. – Dave Jan 14 '10 at 22:46
  • P.S I see by your profile you're in Alabama and you answer Ada questions. You've got to be in Hunstville, yes? – Dave Jan 14 '10 at 22:50
  • Got it in 1 :-) Want to outsource the port? – Marc C Jan 15 '10 at 11:54
  • Outsource? There's a reasonable chance we work for the same company :) – Dave Jan 15 '10 at 13:37
  • Not likely. There's only one guy named Dave in the company, and he goes by David. And, you would already know me :-) – Marc C Jan 15 '10 at 14:46
5

There is always SPARK, but I believe its a specialized/subsetted version of the Ada language. You might want to contact SigAda or the Ada usenet group to see if there are any other ideas.

Honestly though, GNAT is a great tool set. You can use GNATBench, an Eclipse interface, or GPS, a light-weight GTK+ IDE, to interface with the GNAT tools.

Dr. Watson
  • 3,752
  • 4
  • 32
  • 43
  • 1
    Yes, GNAT is looking good so far. I'll take a look at SPARK, thanks. – Dave Jan 14 '10 at 20:25
  • You're right; SPARK is a subset or superset of Ada. Thanks, anyway. – Dave Jan 14 '10 at 20:32
  • 1
    SPARK is technically a unified software development and verification system that uses a subset of Ada as its working language. – Marc C Jan 14 '10 at 20:55
  • 2
    mmm... Spark can be considered a separate programming language in itself, so IMO it's not worth considering its toolset for porting your existing Ada project to another platform / compiler. I think Spark is great, but it's not ease to convert an existing Ada application into Spark ("sparkify" Ada code). – Santiago Jan 15 '10 at 12:31
2

Other compilers I am aware of are Green Hills AdaMULTI (for various RTOSes), and DDC-I's SCORE (also for various RTOSes)

T.E.D.
  • 44,016
  • 10
  • 73
  • 134
  • Yes, I found those, but there's no Linux support that I can see. That's surprising to me. – Dave Jan 15 '10 at 15:50
  • No real Windows support either, except for target simulators. Commodity OSes aren't their market, I don't think. – T.E.D. Jan 15 '10 at 18:44
2

Providers of certified compilers that support Linux (in addition to those listed in the question):

Irvine Compiler Corp.

OC Systems

RR Software

Sofcheck

Dave
  • 4,546
  • 2
  • 38
  • 59