The Return of Ada 336
Pickens writes "Today when most people refer to Ada it's usually as a cautionary tale. The Defense Department commissioned the programming language in the late 1970s but few programmers used Ada, claiming it was difficult to use. Nonetheless many observers believe the basics of Ada are in place for wider use. Ada's stringency causes more work for programmers, but it will also make the code more secure, Ada enthusiasts say. Last fall, contractor Lockheed Martin delivered an update to ERAM, the Federal Aviation Administration's next-generation flight data air traffic control system — ahead of schedule and under budget, which is something you don't often hear about in government circles. Jeff O'Leary, an FAA software development and acquisition manager who oversaw ERAM, attributed at least part of it to the use of the Ada, used for about half the code in the system."
I used ada.... (Score:4, Informative)
Ada (Score:5, Informative)
I took a class in Ada for a previous employer. I found it a lot like Pascal and not all that difficult. The main issue was the cost of compilers which had to go through an expensive certification process. I did find the language a but verbose for many things, e.g. here [adapower.com]
The real issue isn't that it's hard to learn, it's that it's a little cumbersome, but more importantly, not many people know it and they typical clueless manager wants to see 10+ years of Ada experience on the resume/cv before hiring someone. Those people are few and far between, but and competent software developer can learn it.
Re:Skill and not language used? (Score:5, Informative)
You need to make a distinction: they weren't writing new code, they were updating existing code. This is a very important distinction. We are all aware of "code rot" [wikipedia.org], etc. and how over time documentation gets lost, people have to re-learn a piece of code based purely on the source, etc. However they took an older piece of code and revamped it, right on time and under budget. This is notable, and may be attributable to some of the properties of Ada [wikipedia.org].
Maybe, maybe not, but there's a good chance it had something to do with Ada.
Generating Ada CSDs (Score:5, Informative)
Re:Language Magic Bullets (Score:5, Informative)
Re:I used ada.... (Score:3, Informative)
Re:Language Magic Bullets (Score:5, Informative)
The old 16-bit gyroscope controller was replaced with a 32-bit one but the software was kept the same. The software got an invalid input, diagnosed it as a fault and shut itself down. The backup was brought online, got an invalid input, and shut itself down. At this point, the system determined that the rocket was unsafe and caused it to self destruct. By this point, it was already at a higher altitude than the gyroscope was intended to operate (the V accelerated faster and so got above this threshold much faster than the IV).
Re:Ada (Score:1, Informative)
Re:I used ada.... (Score:2, Informative)
Re:we need it where it matters (Score:3, Informative)
Imagine a surgeon who discovers how much money can be saved by purchasing Xacto blades instead of using blades manufactured to more stringent standards. That is exactly the situation we are currently facing when contractors decide to use C or C++ instead of Ada. On the surface one gets the same result. It is only that superficial result that counts for the lowest bidder.
- Richard Riehle
Re:I used ada.... (Score:1, Informative)
No, the program would just quit reading into the string at the predetermined cutoff. Your program might operate incorrectly if the input is incorrect, but it wouldn't overflow the buffer.
Re:shhh! don't go blabbing this all over the place (Score:5, Informative)
Source:http://www.oss-in-atm.info/20051207/09-gasperoni.php [oss-in-atm.info]
Re:I used ada.... (Score:5, Informative)
Now that I'm not forced to work with it, I feel nostalgia sometimes. I built a GNAT RPM for Turbolinux, but I don't they ever distributed it. How is GNAT nowadays?
The reason for ERAM success (Score:2, Informative)
Re:I used ada.... (Score:5, Informative)
Show me some hardware that can do that, and it'll be a valid criticism. I believe the criticism you meant to level, was a dynamically sized string. This indeed was more difficult, but not at all impossible. I learned Ada95, and you could do it at least with the libraries available in that revision. Ada 2005 also fixed many such shortcomings in the standard library. Ada even has closures now!
Re:Skill and not language used? (Score:4, Informative)
Ada:
IF a AND b THEN
c;
d;
e;
END IF;
C:
if (a && b) {
c;
d;
e;
}
Ada tends to use words instead of symbols. Does it take longer to type? Yeah, a little. But this doesn't make it hard or obscure. In fact, it makes it much easier for non-programmers (and new programmers) to read and understand the code.
Why would you care about non-programmers? Because in the real world, programs are written to offer real world solutions. It helps if these programs can be reviewed by engineers, scientists, accountants, etc... who may not know every language, but can figure out the basic logic if it uses words instead of symbols. Also, the improved readability makes future changes less painful.
What happens if a coworker used & instead of && in the C version? It's a lot harder to make those kinds of mistakes in Ada.
Re:I used ada.... (Score:3, Informative)
Sure class libraries are not included with Ada as they are in Pascal, C++, Java, et all. But the advantage of Ada is that each team developing a part of the program can write their own piece of it and only release the APIs needed to interface with that piece of the program without seeing the source code. For example you can write functions and procedures into a class library and keep it secret so only members on your team can see the source code, but another contracting agency on another team cannot steal your IP because they only have access to your library but not your source code. They know the variables they have to send to your functions and procedures in order to use them and what they pass back, but it is a black box process in that they cannot see how the black box works only what goes in and out of it.
Ada meets the DOD standards for a secure language because of the black box concept. That way a program written for the military by several different contracting teams is more secure because if an enemy agent gets a copy of one of the source code copy to one of the libraries they won't have access to the other five or six libraries that it interfaces into in order to work.
Of course this means Ada isn't the best language to use for an open source project, or for when several teams need access to the source code of the other teams as well. Ada should only be used when the IP or security needs to be secret and on a need to know basis that can control who can see the source code and who cannot.
Re:Skill and not language used? (Score:5, Informative)
For example, suppose you want to add a new value to an enumeration. As long as you adopt certain style conventions (avoiding default clauses) if you miss any places where you need to deal with it, you will get an error at compile time.
The overloading rules work well too because the result type is also involved in overload resolution. So you can have i := foo(); and a := foo(); call different foo's if i and a are different types. If i and a start out the same type and later one of them has to change, you just change it and you will get an error message on the call to foo that you need to fix until you provide the missing implementation.
Plus the fact that you have modules and a good system (in Ada 95) for hiding implementations, and a much better controlled system of generics than in C++ means you have better control over your system. You are never going to have your executable blow up from 10 M to 200M overnight because you added a template declaration.
As for verbosity, it really isn't. More perhaps than C/C++ but nothing like COBOL. However it does pay to use a slightly more verbose style than is absolutely essential by always fully qualifying names, but the same is true in C++.
The one weirdness that catches out beginners is that arrays passed as parameters retain their lower bound. So when dealing with substrings, for example, you have to be prepared for non-zero (or 1) lower bounds. But its easy to do.
Re:C A R Hoare on Ada (Score:2, Informative)
Re:I used ada.... (Score:2, Informative)
https://libre.adacore.com/aws/main.html
"AWS: a complete Web development framework"
As a reminder, the GNAT compiler is written (mostly) in Ada. But maybe it's not much beyond a classroom example either.
Re:I used ada.... (Score:3, Informative)