Ada (programming language)

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Ada
Paradigm Multi-paradigm
Appeared in 1983, last revised 2005
Designed by Jean Ichbiah, extended by S. Tucker Taft
Typing discipline Static, strong, safe, nominative
Major implementations GNAT
Dialects Ada 83, Ada 95, Ada 2005
Influenced by ALGOL 68, Pascal, C++ (Ada 95), Smalltalk (Ada 95), Java (Ada 2005)
Influenced C++, PL/SQL, VHDL

Ada (IPA: /ˈeɪˑdə/) is a structured, statically typed, imperative, and object-oriented high-level computer programming language. It was originally designed by a team led by Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense during 1977–1983 to supersede the hundreds of programming languages then used by the US Department of Defense (DoD). Ada addresses some of the same tasks as C or C++, but Ada is strongly typed (even for integer-range), and compilers are validated for reliability in mission-critical applications, such as avionics software. Ada is an international standard; the current version (known as Ada 2005) is defined by joint ISO/ANSI standard (ISO-8652:1995), combined with major Amendment ISO/IEC 8652:1995/Amd 1:2007.

Ada was named after Ada Lovelace (1815–1852), who is often credited with inventing computer programming.

Contents

Ada was originally targeted at embedded and real-time systems. The Ada 95 revision, designed by S. Tucker Taft of Intermetrics between 1992 and 1995, improved support for systems, numerical, financial, and object-oriented programming (OOP).

Notable features of Ada include: strong typing, modularity mechanisms (packages), run-time checking, parallel processing (tasks), exception handling, and generics. Ada 95 added support for object-oriented programming, including dynamic dispatch.

Ada supports run-time checks in order to protect against access to unallocated memory, buffer overflow errors, off by one errors, array access errors, and other avoidable bugs. These checks can be disabled in the interest of runtime efficiency, but can often be compiled efficiently. It also includes facilities to help program verification. For these reasons, Ada is widely used in critical systems, where any anomaly might lead to very serious consequences, i.e., accidental death or injury. Examples of systems where Ada is used include avionics, weapon systems (including thermonuclear weapons), and spacecraft.

Ada also supports a large number of compile-time checks to help avoid bugs that would not be detectable until run-time in some other languages or would require explicit checks to be added to the source code.

Ada's dynamic memory management is high-level and type-explicit, requiring explicit instantiation of the Unchecked_Deallocation package to explicitly free allocated memory. The specification does not require any particular implementation. Though the semantics of the language allow automatic garbage collection of inaccessible objects, most implementations do not support it. Ada does support a limited form of region-based storage management. Invalid accesses can always be detected at run time (unless of course the check is turned off) and sometimes at compile time.

The syntax of Ada is simple, consistent and readable. It minimizes choices of ways to perform basic operations, and prefers English keywords (eg "OR") to symbols (eg. "||"). Ada uses the basic mathematical symbols (i.e.: "+", "-", "*" and "/") for basic mathematical operations but avoids using other symbols. Code blocks are delimited by using words such as "declare", "begin" and "end". It also enforces that each conditional statement be closed. For example, "if x > 0 then y := 0;" is not valid and must be closed with "end if"; i.e., "if x > 0 then y := 0; end if;" The rationale is that code for a complex system must be readable by reviewers and maintainers. This was also to avoid the common problem of if-else ambiguity in the grammar. Reviewers may include domain experts who are not highly software literate. Code for complex systems is typically maintained for many years, by programmers other than the original author. It can be argued that these language design principles apply to most software projects, and most phases of software development, however when applied to complex, safety critical projects, benefits in correctness, reliability, and maintainability take precedence over (arguable) costs in initial development.

Unlike most ISO standards, the Ada language definition (known as the Ada Reference Manual or ARM, or sometimes the Language Reference Manual or LRM) is free content. Thus, it is a common reference for Ada programmers, not just programmers implementing Ada compilers. Apart from the reference manual, there is also an extensive rationale document which explains the language design and the use of various language constructs. This document is also widely used by programmers. When the language was revised, a new rationale document was written.

In the 1970s, the US Department of Defense (DoD) was concerned by the number of different programming languages being used for its embedded computer system projects, many of which were obsolete or hardware-dependent, and none of which supported safe modular programming. In 1975 the Higher Order Language Working Group (HOLWG) was formed with the intent of reducing this number by finding or creating a programming language generally suitable for the department's requirements; the result was Ada. The total number of high-level programming languages in use for such projects fell from over 450 in 1983 to 37 by 1996.

Wikisource has original text related to this article:

The working group created a series of language requirements documents—the Strawman, Woodenman, Tinman, Ironman and Steelman documents. Many existing languages were formally reviewed, but the team concluded in 1977 that no existing language met the specifications.

Requests for proposals for a new programming language were issued and four contractors were hired to develop their proposals under the names of Red (Intermetrics led by Benjamin Brosgol), Green (CII Honeywell Bull, led by Jean Ichbiah), Blue (SofTech, led by John Goodenough), and Yellow (SRI International, led by Jay Spitzen). In April 1978, after public scrutiny, the Red and Green proposals passed to the next phase. In May of 1979, the Green proposal, designed by Jean Ichbiah at CII Honeywell Bull, was chosen and given the name Ada—after Augusta Ada, Countess of Lovelace. This proposal was influenced by the programming language LIS that Ichbiah and his group had developed in the 1970s. The preliminary Ada reference manual was published in ACM SIGPLAN Notices in June 1979. The Military Standard reference manual was approved on December 10, 1980 (Ada Lovelace's birthday), and given the number MIL-STD-1815 in honor of Ada Lovelace's birth year.

Augusta Ada King, Countess of Lovelace.
Augusta Ada King, Countess of Lovelace.

In 1987, the US Department of Defense began to require the use of Ada (the Ada mandate) for every software project where new code was more than 30% of result, though exceptions to this rule were often granted. This requirement was effectively removed in 1997, as the DoD began to embrace COTS (commercial off-the-shelf) technology. Similar requirements existed in other NATO countries.

Because Ada is a strongly typed language, it has been used outside the military in commercial aviation projects, where a software bug can mean fatalities. The fly-by-wire system in the Boeing 777 runs software written in Ada. The Canadian Automated Air Traffic System (completed in year 2000 by Raytheon Canada) was written in 1 million lines of Ada (SLOC count). It featured advanced (for the time) distributed processing; a distributed Ada database; and object-oriented design.

The language became an ANSI standard in 1983 (ANSI/MIL-STD 1815A), and without any further changes became an ISO standard in 1987 (ISO-8652:1987). This version of the language is commonly known as Ada 83, from the date of its adoption by ANSI, but is sometimes referred to also as Ada 87, from the date of its adoption by ISO.

Ada 95, the joint ISO/ANSI standard (ISO-8652:1995) is the latest standard for Ada. It was published in February 1995 (making Ada 95 the first ISO standard object-oriented programming language). To help with the standard revision and future acceptance, the US Air Force funded the development of the GNAT Compiler. Presently, the GNAT Compiler is part of the GNU Compiler Collection.

Work has continued on improving and updating the technical content of the Ada programming language. A Technical Corrigendum to Ada 95 was published in October 2001, and a major Amendment, ISO/IEC 8652:1995/Amd 1:2007, was published on March 9, 2007.

A common example of a language's syntax is the Hello world program:

with Ada.Text_IO; 
 
procedure Hello is
begin
  Ada.Text_IO.Put_Line("Hello, world!");
end Hello;

There are shortcuts available for Ada.Text_IO.Put_Line, needing less typing; however, they are not used here, for better understanding. For a detailed explanation, see Wikibooks:Ada Programming/Basic.

The following sites have link collections to Ada tutorials:

  • AdaMagic - Proprietary Ada technology from SofCheck, including Ada 95 front end, run-time system, and tools; front end can generate conventional IL, ISO/ANSI C, or Java byte code
  • GNAT - Free compiler based on GCC
  • GNATPro - Commercially supported version of GNAT from AdaCore
  • JGNAT - GNAT-based compiler for the Java Runtime Environment
  • MGNAT - GNAT-based compiler for the .NET Framework Environment (A# project)
  • ObjectAda - Proprietary Ada compiler from Aonix
  • PowerAda - Proprietary Ada Compiler from OC Systems
  • AdaMulti - Proprietary Ada Compiler and Integrated Development Environment from Green Hills Software
  • SCORE - Proprietary multi language Integrated Development Environment from DDC-I, Inc. including a compiler for Ada as one of its supported languages
  • Rational Apex (now owned and sold by IBM) - Proprietary compiler and full IDE

Another list of Ada bindings can be found at [18].

  • SPARK - High integrity language based on an Ada subset
  • VHDL - A hardware description language for representing digital hardware, with many concepts and much syntax borrowed from Ada.
  • PL/SQL - Stored procedure language in Oracle Corporation's RDBMS product, has many similarities to Ada and was historically based on Ada syntax

Wikibooks
Wikibooks has a book on the topic of

(These documents have been published in various forms including print.)

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.