Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming IT Technology

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."
This discussion has been archived. No new comments can be posted.

The Return of Ada

Comments Filter:
  • I used ada.... (Score:4, Informative)

    by aldousd666 ( 640240 ) on Tuesday April 15, 2008 @01:01PM (#23079338) Journal
    In school. It wasn't actually any different from very many other languages that have huge class libraries, it's just that they were all 'included' in the langauge instead of linked in separately. It's more verbose and stuff, but I didn't see any completely foreign concepts in Ada that aren't around in most other langauges. Just more typing, from what I remember.
  • Ada (Score:5, Informative)

    by nwf ( 25607 ) on Tuesday April 15, 2008 @01:11PM (#23079514)

    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.

  • by everphilski ( 877346 ) on Tuesday April 15, 2008 @01:19PM (#23079616) Journal
    Oddly, they're saying a language which is slower for people to write, and considerably more obscure than most languages, is the reason something is done under-budget and quickly? It seems like those traits would make it more secure, but take much longer to make...

    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)

    by HockeyPuck ( 141947 ) on Tuesday April 15, 2008 @01:23PM (#23079680)
    If anyone is programming in Ada, I highly recommend the program jGRASP http://www.jgrasp.org/ [jgrasp.org]. From the site:

    jGRASP is a lightweight development environment, created specifically to provide automatic generation of software visualizations to improve the comprehensibility of software. jGRASP is implemented in Java, and runs on all platforms with a Java Virtual Machine (Java version 1.5 or higher). jGRASP produces Control Structure Diagrams (CSDs) for Java, C, C++, Objective-C, Ada, and VHDL; Complexity Profile Graphs (CPGs) for Java and Ada; UML class diagrams for Java; and has dynamic object viewers that work in conjunction with an integrated debugger and workbench for Java. The viewers include a data structure identifier mechanism which recognizes objects that represent traditional data structures such as stacks, queues, linked lists, binary trees, and hash tables, and then displays them in an intuitive textbook-like presentation view.
    Another great product from the academic community.
  • by Detritus ( 11846 ) on Tuesday April 15, 2008 @01:31PM (#23079794) Homepage
    It was the first Ariane V launch. They had reused software from an earlier model of the Ariane without properly testing it in its new environment. Think of it this way, you take the speedometer module from your Trabant and install it in a Ferrari. The first time that you exceed 100 km/h, the speedometer module fails with an overflow error because the type for speed was defined as 0..100. The problem was that Ariane's management was cutting corners on requirements analysis and testing. The software performed as designed, it just wasn't designed for the Ariane V.
  • Re:I used ada.... (Score:3, Informative)

    by aldousd666 ( 640240 ) on Tuesday April 15, 2008 @01:33PM (#23079814) Journal
    They used it in real school too, I never had a java course, and I get along just fine today in 'the real world.' Admittedly I don't use Ada either, but it worked well enough for Data Structures and Algorithms classes.
  • by TheRaven64 ( 641858 ) on Tuesday April 15, 2008 @02:05PM (#23080248) Journal
    Actually, it's slightly more depressing than that. The component in question was a gyroscope used for immediately post-launch corrections on IV. It wasn't required at all in V due to improvements in other areas, but it was kept in for extra reliability.

    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)

    by Anonymous Coward on Tuesday April 15, 2008 @02:18PM (#23080424)
    It's not expensive any more. Ada is included with GCC. It's also known as GNAT.
  • Re:I used ada.... (Score:2, Informative)

    by wfstanle ( 1188751 ) on Tuesday April 15, 2008 @02:29PM (#23080556)
    That's the root cause of buffer overflows. If you can't do such "crimes" then security is advanced.
  • by dpilot ( 134227 ) on Tuesday April 15, 2008 @02:38PM (#23080640) Homepage Journal
    I was grabbing someone's .sig and stuffing it into my "quotes" file, and found this relevant tidbit...

    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)

    by Anonymous Coward on Tuesday April 15, 2008 @02:53PM (#23080808)
    Sounds like an incipient buffer overflow, to me.

    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.
  • by KokorHekkus ( 986906 ) on Tuesday April 15, 2008 @03:05PM (#23080958)

    And besides, Ada is really French. [why did GNU make an ada compiler??????????????]
    Actually. GNAT is the result of the US Airforce forking over $3 million to New York University and apparently part of that contract was that the copyright would be assigned to FSF.

    Source:http://www.oss-in-atm.info/20051207/09-gasperoni.php [oss-in-atm.info]
  • Re:I used ada.... (Score:5, Informative)

    by SL Baur ( 19540 ) <steve@xemacs.org> on Tuesday April 15, 2008 @03:22PM (#23081190) Homepage Journal

    Now that I've left I STILL find ADA code running from the 70s.
    Ada didn't become Ada until 1983. Commercial compilers were still stabilizing five years later. So, if you had working Ada code you had a time machine and you also had a compiler from the future. See (all of the criticisms of Ada were true at the time I wrote it) http://homes.cerias.purdue.edu/~spaf/Yucks/V1/msg00096.html [purdue.edu]

    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?
  • by oecocsystems.com ( 1273610 ) on Tuesday April 15, 2008 @03:29PM (#23081318)
    I am Oliver E Cole, the president of OC Systems (oec@ocsystems.com). The Ada compiler and associated tools used by ERAM is PowerAda, done by OC Systems. We have worked closely over a number of years with the ERAM project and its predecessors. Yup, they are using Ada because of all its robustness and features, but they also have a good mature software development process. Part of a muture process is choosing the right language and tools for the job. Sometimes php is the right choice, sometimes C, C++ and sometimes Ada. For a project like Air Traffic Control (very long lived, high quality) a strong argument can be made for Ada. Ada catches a lot of errors "automatically" and is designed for big systems.
  • Re:I used ada.... (Score:5, Informative)

    by naasking ( 94116 ) <naasking@gmaEULERil.com minus math_god> on Tuesday April 15, 2008 @03:38PM (#23081472) Homepage
    Well, that and Ada's I/O is pretty terrible. Ever try reading in and storing an arbitrary length string? I'm fairly convinced it's not possible in Ada.

    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!
  • by darkwing_bmf ( 178021 ) on Tuesday April 15, 2008 @03:58PM (#23081766)
    You could say it's slower to write, but it's not that slow.
    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)

    by Orion Blastar ( 457579 ) <`orionblastar' `at' `gmail.com'> on Tuesday April 15, 2008 @04:10PM (#23081920) Homepage Journal
    Ada is very much like Pascal, but with a black box strategy.

    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.
  • by Tired and Emotional ( 750842 ) on Tuesday April 15, 2008 @04:15PM (#23081984)
    Actually the real difference between Ada and many other langauges is that it is possible to code in a way that often guarantees that subsequent changes will either be correct or else will fail to compile. In other words, it makes modification easier. The idea is that local changes cannot have global effects. This was a design goal of the language (look up "beaujolais effect" for some history)

    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.

  • by EdF ( 792371 ) <falis@verizon.net> on Tuesday April 15, 2008 @06:36PM (#23083334)
    Hoare later recanted this bit, and strongly recommended the language as a foreward to one of its textbooks.
  • Re:I used ada.... (Score:2, Informative)

    by kafka.fr ( 188701 ) on Wednesday April 16, 2008 @03:10AM (#23086964) Homepage

    [...] anything much beyond classroom-example programs.
    Oh yes. Check this classroom example :
    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)

    by Bush Pig ( 175019 ) on Wednesday April 16, 2008 @09:01AM (#23088836)
    When I was at uni from 1992-6 ADA was the teaching language (must have stabilised since you used it). I loved it. It forces good habits, and if you get a clean compile, it is GUARANTEED to do something sensible (although not necessarily what you wanted). Also Oracle's PL/SQL is a subset of ADA with database extensions, and it's as tight as a nun's cunt. I love it.

So you think that money is the root of all evil. Have you ever asked what is the root of money? -- Ayn Rand

Working...