The return of Ada

 

Connecting state and local government leaders

Thought to be obsolete, DOD's programming language could be just the thing to address software validation and verification.

Last fall, contractor Lockheed Martin delivered an update to 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.The project, dubbed the En Route Automation Modernization System (ERAM), involved writing more than 1.2 million lines of code and had been labeled by the Government Accountability Office as a high-risk effort. GAO worried that many bugs in the program would appear, which would delay operations and drive up development costs.Although the project's success can be attributed to a lot of factors, 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 programming language.About half the code in the system is Ada, O'Leary said, and it provided a controlled environment that allowed programmers to develop secure, solid code.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.The idea was that mandating its use across all the services would stem the proliferation of many programming languages and even a greater number of dialects. Despite the mandate, few programmers used Ada, and the mandate was dropped in 1997. Developers and engineers claimed it was difficult to use.Military developers stuck with the venerable C programming language they knew well, or they moved to the up-and-coming C++. A few years later, Java took hold, as did Web application languages such as JavaScript.However, Ada never vanished completely. In fact, in certain communities, notably aviation software, it has remained the programming language of choice.'It's interesting that people think that Ada has gone away. In this industry, there is a technology du jour. And people assume things disappear.But especially in the Defense Department, nothing ever disappears,' said Robert Dewar, president of AdaCore and a professor emeritus of computer science at New York University.Dewar has been working with Ada since 1980.Last fall, the faithful gathered at the annual SIGAda 2007 conference in Fairfax, Va., where O'Leary and others spoke about Ada's promise.This decades-old language can solve a few of today's most pressing problems ' most notably security and reliability.'We're seeing a resurgence of interest,' Dewar said. 'I think people are beginning to realize that C++ is not the world's best choice for critical code.'ERAM is the latest component in a multi-decade plan to upgrade the country's air traffic control system. Not surprisingly, the system had some pretty stringent development requirements, O'Leary said.The system could never lose data. It had to be fault-tolerant. It had to be easily upgraded. It had to allow for continuous monitoring. Programs had to be able to recover from a crash. And the code that runs the system must 'be provably and test-ably free' of errors, O'Leary said.And such testing should reveal when errors occur and when the correct procedures fail to occur. 'If I get packet 218, but not 217, it would request 217 again,' he said.Ada can offer assistance to programmers with many of these tasks, even if it does require more work on the part of the programmer.'The thing people have always said about Ada is that it is hard to get a program by the compiler, but once you did, it would always work,' Dewar said. 'The compiler is checking a lot of stuff. Unlike a C program, where the C compiler will accept pretty much anything and then you have to fight off the bugs in the debugger, many of the problems in Ada are found by the compiler.'That stringency causes more work for programmers, but it will also make the code more secure, Ada enthusiasts say.When DOD commissioned the language in 1977 from the French Bull Co., it required that it have lots of checks to ensure the code did what the programmer intended, and nothing more or less.For instance, unlike many modern languages and even traditional ones such as C and C++, Ada has a feature called strong typing. This means that for every variable a programmer declares, he or she must also specify a range of all possible inputs. If the range entered is 1- 100, for instance, and the number 102 is entered, then the program won't accept that data.This ensures that a malicious hacker can't enter a long string of characters as part of a buffer overflow attack or that a wrong value won't later crash the program.Ada allows developers to prove security properties about programs. For instance, a programmer might want to prove that a variable is not altered while it is being used through the program. Ada is also friendly to static analysis tools. Static analysis looks at the program flow to ensure odd things aren't taking place ' such as making sure the program always calls a certain function with the same number of arguments. 'There is nothing in C that stops a program from doing that,' Dewar said. 'In Ada, it is impossible.'Ada was not perfect for the ERAM job, O'Leary said. There are more than a few things that are still needed. One is better analysis tools.'We're not exploiting the data' to the full extent that it could be used, he said. The component interfaces could be better. There should also be tools for automatic code generation and better cross-language support.Nonetheless, many observers believe the basics of Ada are in place for wider use. Who uses Ada? Not surprisingly, DOD still uses the language, particularly for command and control systems, Dewar said. About half of AdaCore's sales are to DOD. AdaCore offers an integrated developer environment called GnatPro, and an Ada compiler.'There [are] tens of millions of lines of Ada in Defense programs,' Dewar said.NASA and avionics hardware manufacturers are also heavy users of Ada, he said. Anything mission-critical would be suitable for Ada. For instance, embedded systems in the Boeing 777 and 787 run Ada code.In all these cases, the component manufacturers are 'interested in highly reliable mission- critical programs. And that is the niche that Ada has found its way into,' Dewar said.In addition to AdaCore, IBM Rational and Green Hills Software offer Ada developer environments.It also works well as a teaching language. The Air Force Academy found it to be a good language that inexperienced programmers could use to build robust programs. At the SigAda conference, instructor Leemon Baird III showed how a student used Ada to build an artificial- intelligence function for a computer to play a game called Connect4 against human opponents.'A great part of his success was due to Ada's features,' Baird said.Although it was only 2,000 lines, the language allowed the student to write robust code.'It had to be correct,' he said. The code flowed easily between Solaris and Windows, and could be run across different types of processors with minimal porting.Programs written in an extension of Ada, called Spark, will be used to run the next generation U.K. ground station air traffic control system, called Interim Future Area Control Tools Support (IFacts).Praxis, a U.K. systems engineering company, is providing the operating code ---for IFacts. In 2002, England's busiest airport terminal, London Heathrow Airport, suffered a software-based breakdown of its airplane routing system.Praxis is under a lot of pressure to ensure its code is free from defects.Praxis also used Spark for a 2006 National Security Agency-funded project, called the Tokeneer ID Station, said Rod Chapman, an engineer at Praxis. The idea was to create software that would meet the Common Criteria requirements for Evaluation Assurance Level 5, a process long thought to be too challenging for commercial software.To do this, the software code that was generated had to have a low number of errors. The program itself was access control software.Someone wishing to gain entry to a secure facility and use a workstation would need the proper smart card and provide a fingerprint.By using Spark, a static check was made of the software before it was run, to ensure all the possible conditions led to valid outcomes. In more than 9,939 lines of code, no defects were found after the testing and remediation process was completed.Although the original language leaned heavily toward strong typing and provability, subsequent iterations have kept Ada modernized, Dewar said. Ada 95 added object-oriented programming capabilities, and Ada 2005 tamped down on security requirements even further. The language has also been ratified as a standard by the American National Standards Institute and by the International Organization of Standards (ISO/IEC 8652).Ada was named for Augusta Ada King, Countess of Lovelace, daughter of Lord Byron.In the early 19th century, she published what is considered by most to be the world's first computer program, to be run on a prototype of a computer designed by Charles Babbage, called the Analytical Engine. But don't let the language's historical legacy fool you ' it might be just the thing to answer tomorrow's security and reliability challenges.

The following are programs written in Ada, C and Java that print to the screen the phrase "Hello World." Gary Matoso, of AdaCore, provided the following Ada copy.



ADA PROGRAMMING LANGUAGE

with Ada.Text_IO;

procedure Hello_World is

begin

Ada.Text_IO.Put_Line ("Hello World>br>
from Ada");

end Hello_World;



C PROGRAMMING LANGUAGE

#include < stdio.h>

void main()

{
printf("\nHello World\n");

}


JAVA PROGRAMMING LANGUAGE

class helloworldjavaprogram

{

public static void main(String args[])

{

System.out.println("Hello World!");

}

}





























Tough requirements



























Use cases




































NEXT STORY: High-stakes war games

X
This website uses cookies to enhance user experience and to analyze performance and traffic on our website. We also share information about your use of our site with our social media, advertising and analytics partners. Learn More / Do Not Sell My Personal Information
Accept Cookies
X
Cookie Preferences Cookie List

Do Not Sell My Personal Information

When you visit our website, we store cookies on your browser to collect information. The information collected might relate to you, your preferences or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. However, you can choose not to allow certain types of cookies, which may impact your experience of the site and the services we are able to offer. Click on the different category headings to find out more and change our default settings according to your preference. You cannot opt-out of our First Party Strictly Necessary Cookies as they are deployed in order to ensure the proper functioning of our website (such as prompting the cookie banner and remembering your settings, to log into your account, to redirect you when you log out, etc.). For more information about the First and Third Party Cookies used please follow this link.

Allow All Cookies

Manage Consent Preferences

Strictly Necessary Cookies - Always Active

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Sale of Personal Data, Targeting & Social Media Cookies

Under the California Consumer Privacy Act, you have the right to opt-out of the sale of your personal information to third parties. These cookies collect information for analytics and to personalize your experience with targeted ads. You may exercise your right to opt out of the sale of personal information by using this toggle switch. If you opt out we will not be able to offer you personalised ads and will not hand over your personal information to any third parties. Additionally, you may contact our legal department for further clarification about your rights as a California consumer by using this Exercise My Rights link

If you have enabled privacy controls on your browser (such as a plugin), we have to take that as a valid request to opt-out. Therefore we would not be able to track your activity through the web. This may affect our ability to personalize ads according to your preferences.

Targeting cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.

Social media cookies are set by a range of social media services that we have added to the site to enable you to share our content with your friends and networks. They are capable of tracking your browser across other sites and building up a profile of your interests. This may impact the content and messages you see on other websites you visit. If you do not allow these cookies you may not be able to use or see these sharing tools.

If you want to opt out of all of our lead reports and lists, please submit a privacy request at our Do Not Sell page.

Save Settings
Cookie Preferences Cookie List

Cookie List

A cookie is a small piece of data (text file) that a website – when visited by a user – asks your browser to store on your device in order to remember information about you, such as your language preference or login information. Those cookies are set by us and called first-party cookies. We also use third-party cookies – which are cookies from a domain different than the domain of the website you are visiting – for our advertising and marketing efforts. More specifically, we use cookies and other tracking technologies for the following purposes:

Strictly Necessary Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Functional Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Performance Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Sale of Personal Data

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.

Social Media Cookies

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.

Targeting Cookies

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.