... this page is part of the Web Site of George North ...
Ada Language Overview

Programming Language Overview: Ada by: George North 439-68-5643 Program Language Structure CSCI 4501 Spring 1995 Dr. Jaime Nino


Ada Language Overview 2


A. Ada in Universities 5

B. Sample Ada programs.

I. Hello World 8 II. Generic AVL Tree ADT, by George North 8 III. Tasking 17

C. Ada Success Stories 21


Ada is a stack discipline based static scoped language.

In 1974, the US DoD realized that having software for embedded computers developed and maintained in hundreds of (sometimes proprietary, often obsolete) programming languages was excessively costly. Ada is the result of a collective effort to design a common language for programming large scale and real-time systems. Out of almost 20 language proposals, a Honeywell/Bull team located near Paris, France was chosen. The principal designer was Jean Ichbiah, but many many others made major contributions. The language was revised in response to hundreds of comments coming from academia and industry all over the world, and finally became an ANSI standard in 1983 (and an ISO standard in 1987). This modern, high-level programming language was named Ada, in honor of the first programmer in history: Lady Ada Lovelace.

As a development environment, Ada supports software engineering features such as packaging and information hiding. It facilitates reuse and the development of large applications. These characteristics increase the software's reliability. Ada encourages good programming practices because of its strong typing, modularity, portability, reusability and readability. These features reduce costs in software development, verifying, debugging, and maintenance. In December 1994, Ada (95) became the first standard object-oriented programming language.

Ada's modularity allows programs to be written in portions by teams working in parallel before being integrated into the final product. Ada's Packages and Generics support data abstraction and object-oriented design, and make its code reusable. Reliability is supported with strong typing and exception handling mechanisms. Tasking features support parallelism using high-level constructs instead of error-prone calls to operating system primitives. Maintainability is enhanced by modularity and a high-level of readability.

Case and if statements allow the selection of an enclosed sequence of statements based on the value of an expression. Loop statements provide basic iteration, and recursion is supported. Procedures and functions provide subprogram abstraction. Parameter passing in procedures use mode IN, OUT, or IN/OUT. Parameters in functions are of IN mode only. Parameters are passed by value, using eager evaluation. Except that large records or arrays may be passed by name (implementation dependent).

There exist several classes of types. Scalar types include integer types, real types, and types defined by enumeration of their values. Array and record types are composite. Access types provides access to objects. Ada also provides Private types and Task types. A subtype is a subset of the values of the base type. This subset need not be a proper subset and can be an empty subset.

The Ada bible is the Language Reference Manual (LRM, 331 pages). Syntax is described using extended BNF, and semantics by narrative rules. There are sixty-three reserved words in Ada (ANSI/MIL-STD-1815-A-1983). The LRM is the best available learning book. There are many available implementations of Ada. Some are in the public domain. With a few exceptions, the language is portable over many platforms.

The most serious criticism of Ada is that it is too large and too complex. For this reason some recommend that it NOT be use for any applications where reliability is critical (precisely the type of applications for which it was designed). Others have praised it as the "epitome of language design." Because of Ada's strong typing, error handling, support for programming in the large, and data abstraction, it is a good tool for classroom instruction. Appendix

A. Ada in Universities

Ada as a Foundation Programming Language

This is the growing list of colleges and universities in which Ada is introduced to first-year students. In cases where Ada is introduced in the second term (group 2), this is usually because the politics of the institution dictate that Pascal be taught in the big first course, which has nonmajors in it. Alas, many non-technical faculties still labor under the misperception that Ada is only for SERIOUS programmers.

If you are still convinced that Ada is inappropriate as an intro language, ask the students in the following schools. Nobody told _them_ it's inappropriate (they don't sit around reading the flamewars on the net), so they take it at face value and do just fine, thank you.


February 1995 Michael B. Feldman Chair, ACM-SIGAda Education Working Group

Department of Electrical Engineering and Computer Science The George Washington University Washington, DC 20052 (202) 994-5919 (voice) - (202) 994-0227 (fax) mfeldman@seas.gwu.edu

This report lists the colleges and universities known -- or at least credibly believed -- to have adopted Ada as a "foundation language," at CS1, CS2, or CS7 level in their computer science (or similar) curricula. I choose to keep track of precisely these courses because they are taken by students in either first or second year, and thus early enough to serve as a foundation upon which to build a large portion of the undergraduate software curriculum.

This data is, for the most part, verifiable, based on first-hand reports from the teachers of those courses. In a few cases, publishers' textbook adoption data was used. I would like to keep this list as complete and up to date as possible, so please let me know of any additions or corrections.

-------------------------------------------------------------------------------- ---------------------------------------------

Colleges and Universities Introducing Ada as the First Language Taught in an Undergraduate Computing Curriculum.

Allan Hancock College, California Armstrong State College, Georgia Auburn University Australian Defence Force Academy, Canberra Basque University, San Sebastian, Spain Birmingham Southern College, Alabama California State University, Long Beach California Polytechnic State University, Pomona California Polytechnic State University, San Luis Obispo Chalmers University of Technology, Sweden Clemson University, South Carolina Conservatoire National des Arts et Metiers, Paris, France Cranfield Institute of Technology, United Kingdom Cypress College, California Daniel Webster College, New Hampshire Ecole Nationale Superieure des Telecommunications de Bretagne, France Ecole Superieure en Sciences Informatiques, Nice, France Edith Cowan University, Perth, Australia Embry-Riddle Aeronautical University, Arizona and Florida campuses Florida Institute of Technology Fayetteville State University, North Carolina Flinders University, Australia Friedrich Schiller University, Jena, Germany The George Washington University, Washington, DC Indiana-Purdue University, Ft. Wayne Institut National des Sciences Appliquees, Toulouse, France Jerusalem College of Technology, Israel LeMoyne College, New York Lenoir-Rhyne College, North Carolina Loyola Marymount University, California Marion County Technical Center, West Virginia Marshall University, West Virginia Montana State University Murray State University, Kentucky Muskingum College, Ohio National Defense Management College at Taiwan, Republic of China Northeast Missouri State University Northern Arizona University Norwich University, Vermont Otterbein College, Ohio Portsmouth Polytechnic, United Kingdom Royal Melbourne Institute of Technology, Australia Royal Military Academy, Belgium Sacred Heart College (Connecticut) Saint Mary College, Kansas Sam Houston State University, Texas San Diego Mesa College, California Santa Clara University Seattle University South Bank University, United Kingdom Southampton Institute of Higher Education, United Kingdom Southern Arkansas University St. Cloud State Univ., Minnesota State University of New York at Plattsburgh Stockton College of New Jersey Swinburne University of Technology, Australia Technical College of Berlin, Germany United States Air Force Academy University of Adelaide, Australia University of Aston, United Kingdom University of Bradford, United Kingdom University of Brighton, United Kingdom University of Canberra, Australia University of Cantabria, Spain University of Dayton, Ohio University of Glamorgan, Wales, United Kingdom University of Hertfordshire, Hatfield, United Kingdom University of Lancaster, United Kingdom University of Liverpool, United Kingdom University of Maryland (University College) University of Montana - Missoula University of Muenster, Germany University of New Orleans University of North Dakota University of Paisley, United Kingdom University of Rome at Tor Vergata, Italy University of Salzburg, Austria University of Sofia, Bulgaria University of South Dakota University of South Florida University of Stafford, United Kingdom University of Wales, Aberystwyth, United Kingdom University of York, United Kingdom Valparaiso University, Indiana West Virginia University


Group 2: Colleges and Universities Not Introducing Ada as the First Language but Rather in a CS2 or Data Structures Course (or equivalent)

Briar Cliff College, Iowa California State University, Fullerton College of West Virginia, Beckley Covenant College, Georgia Davis and Elkins College, West Virginia Ecole d'Ingenieurs de l'Etat de Vaud, Switzerland Ecole Nationale de l'Aviation Civile, Toulouse, France Florida International University Gallaudet University, Washington, DC Georgia State University Indiana University, New Albany Mesa State College, Colorado Monterey Peninsula College, California Mount Mercy College, Iowa National University, California Nicholls State University, Louisiana Norfolk State University, Virginia Northern Arizona University Northern Kentucky University Oglethorpe University, Georgia Ohio University, Athens Pennsylvania State University, Harrisburg Rose Hulman Institute of Technology, Indiana Southwest Baptist College, Missouri Shippensburg University, Pennsylvania State University of New York at Fredonia Swiss Federal Institute of Technology, Lausanne Technical University of Madrid, School of Telecommunication Engineering University of Alaska, Fairbanks University of Geneva, Switzerland University of Missouri, Columbia University of Otago, Dunedin, New Zealand University of Richmond, Virginia University of Scranton, Pennsylvania University of Seville, Spain University of Texas, Austin University of Texas, Permian Basin University of Zaragoza, Spain Weber State University, Utah Western New England College, Massachusetts


Page last modified: 95-02-28 B. Sample Ada Programs

I. Hello World ...

-- Problem: A simple Ada program

with Text_IO; -- procedure Hello is -- begin -- Hello Text_IO.Put (Item => "Hello World"); end Hello;

II. Generic AVL Tree ADT

-- Package: Avl_Tree_Pack declerations -- by: George North, UNO, Fall'94 -- CSCI6001

-- Problem: provied a generic AVL Tree ADT

-- ======================================================================

generic type Element_Type is private; with function "<" (Left, Right : Element_Type) return boolean; with function ">" (Left, Right : Element_Type) return boolean; with procedure Put(element: Element_Type);

-- ======================================================================

package Avl_Tree_Pack is

type Avl_Ptr is private; type Search_Tree is limited private;

-- ======================================================================

-- Procedure: Make_Null -- Precondition: valid AVL search tree -- Postcondition: one new node

procedure Make_Null ( T : in out Search_Tree );

-- ======================================================================

-- Function: Find -- Precondition: element to find, valid AVL search tree -- Postcondition: pointer to found node, raze exception if not found

function Find ( X : Element_Type; T : Search_Tree ) return Avl_Ptr;

-- ======================================================================

-- Function: Find_Min -- Precondition: valid AVL search tree -- Postcondition: pointer to smallest node in tree

function Find_Min ( T : Search_Tree ) return Avl_Ptr;

-- ======================================================================

-- Function: Find_Max -- Precondition: valid AVL search tree -- Postcondition: pointer to largest node in tree

function Find_Max ( T : Search_Tree ) return Avl_Ptr;

-- ======================================================================

-- Procedure: Insert -- Precondition: element to insert, valid AVL search tree -- Postcondition: exception if node already exists -- or new node added, tree balance intact

procedure Insert ( X : in Element_Type; T : in out Search_Tree );

-- ======================================================================

-- Procedure: Delete -- Precondition: element to delete, valid AVL search tree -- Postcondition: exception if node already exists -- or mark node as deleted, do NOT remove

procedure Delete ( X : in Element_Type; T : in out Search_Tree );

-- ======================================================================

-- Procedure: Print_Tree -- Precondition: valid AVL search tree -- Postcondition: none -- or mark node as deleted, do NOT remove

procedure Print_Tree ( T : in Search_Tree );

-- ======================================================================

-- Procedure: Print in Order -- Precondition: valid AVL search tree -- Postcondition: none -- or mark node as deleted, do NOT remove

procedure Print_in_Order ( T : in Search_Tree );

-- ======================================================================

-- Function: Retrieve -- Precondition: valid AVL search tree -- Postcondition: pointer to largest node in tree

function Retrieve ( P : Avl_Ptr ) return Element_Type;

-- ======================================================================

Item_Not_Found : exception;

-- ====================================================================== -- ======================================================================

private type Avl_Node; type Avl_Ptr is access Avl_Node; type Search_Tree is new Avl_Ptr;

type Avl_Node is record Element : Element_Type; Left : Search_Tree; Right : Search_Tree; Height : natural; Deleted : boolean; end record; end Avl_Tree_Pack;

-- ====================================================================== -- ====================================================================== -- ======================================================================

-- Package Body: Avl_Tree_Pack

-- Problem: provied a generic AVL Tree ADT -- ======================================================================

with Unchecked_Deallocation; with Text_IO; use Text_IO;

-- ======================================================================

package body Avl_Tree_Pack is

procedure Dispose is new Unchecked_Deallocation( Object => Avl_Node, Name => Avl_Ptr );

-- ======================================================================

-- Function : Height -- Precondition: valit AVL tree -- Postcondition: height of this tree as Integer -- or -1 is tree is null.

function Height ( T : Search_Tree ) return Integer is begin -- Height if T = null then return -1; else return T.Height; end if; end Height;

-- ======================================================================

-- Function: Max -- Precondition: two valid intergers -- Postcondition: largest integer function Max( H_L, H_R : integer ) return integer is

begin -- Max if H_L >= H_R then return H_L; else return H_R; end if; end Max;

-- ======================================================================

-- Procedure: S_Rotate_Left -- Precondition: valit AVL tree and a left child -- Postcondition: new root node procedure S_Rotate_Left ( T2 : in out Search_Tree ) is

T1 : Search_Tree := T2.Left;

begin -- S_Rotate_Left T2.Left := T1.Right; T1.Right := T2; -- calculate new height T2.Height := Max( Height( T2.Left ), Height( T2.Right ) ) + 1; T1.Height := Max( Height( T1.Left ), T2.Height ) + 1; -- new root T2 := T1; end S_Rotate_Left;

-- ======================================================================

-- Procedure: S_Rotate_Right -- Precondition: valit AVL tree and a right child -- Postcondition: new root node procedure S_Rotate_Right ( T2 : in out Search_Tree ) is

T1 : Search_Tree := T2.Right;

begin -- S_Rotate_Right T2.Right := T1.Left; T1.Left := T2; -- calculate new height T2.Height := Max( Height( T2.Right ), Height( T2.Left ) ) + 1; T1.Height := Max( Height( T1.Right ), T2.Height ) + 1; -- new root T2 := T1; end S_Rotate_Right;

-- ======================================================================

-- Procedure: D_Rotate_Left -- Precondition: valit AVL tree and a left child -- Postcondition: new root node procedure D_Rotate_Left ( T3 : in out Search_Tree ) is

begin -- D_Rotate_Left S_Rotate_Right( T3.Left ); S_Rotate_Left ( T3 ); end D_Rotate_Left;

-- ======================================================================

-- Procedure: D_Rotate_Right -- Precondition: valit AVL tree and a right child -- Postcondition: new root node procedure D_Rotate_Right ( T3 : in out Search_Tree ) is

begin -- D_Rotate_Right S_Rotate_Left ( T3.Right ); S_Rotate_Right( T3 ); end D_Rotate_Right;

-- ======================================================================

procedure Make_Null ( T : in out Search_Tree ) is begin -- Make_Null T := null; end Make_Null;

-- ======================================================================

function Find ( X : Element_Type; T : Search_Tree ) return Avl_Ptr is begin -- Find if T = null then raise Item_Not_Found; elsif X < T.Element then return Find( X, T.Left ); elsif X > T.Element then return Find( X, T.Right ); else if T.Deleted then raise Item_Not_Found; else return Avl_Ptr( T ); end if; end if; end Find;

-- ======================================================================

function Find_Min ( T : Search_Tree ) return Avl_Ptr is begin -- Find_Min if T = null then raise Item_Not_Found; elsif T.Left = null then return Avl_Ptr( T ); else return Find_Min( T.Left ); end if; end Find_Min;

-- ======================================================================

function Find_Max ( T : Search_Tree ) return Avl_Ptr is begin -- Find_Max if T = null then raise Item_Not_Found; elsif T.Right = null then return Avl_Ptr( T ); else return Find_Max( T.Right ); end if; end Find_Max;

-- ======================================================================

procedure Insert( X : in Element_Type; T : in out Search_Tree ) is

-- Procedure: Calculate_Height -- Precondition: valid tree -- Postcondition: height of tree procedure Calculate_Height( T: in out Search_Tree ) is

begin -- Calculate_Height T.Height := Max( Height( T.Left ), Height( T.Right ) ) + 1; end Calculate_Height;

begin -- Insert if T = null then -- Create a one node avl tree. T := new Avl_Node'( X, null, null, 0, FALSE ); elsif X < T.Element then Insert( X, T.Left ); if Height( T.Left ) - Height( T.Right ) = 2 then if X < T.Left.Element then S_Rotate_Left( T ); else D_Rotate_Left( T ); end if; else Calculate_Height( T ); end if; elsif X > T.Element then Insert( X, T.Right ); if Height( T.Left ) - Height( T.Right ) = -2 then if X > T.Right.Element then S_Rotate_Right( T ); else D_Rotate_Right( T ); end if; else Calculate_Height( T ); end if; else -- x is in the avl already. if T.Deleted then T.Deleted := FALSE; end if; end if; end Insert;

-- ======================================================================

procedure Delete ( X : in Element_Type; T : in out Search_Tree ) is begin -- Delete if T = null then raise Item_Not_Found; elsif X < T.Element then Delete( X, T.Left ); elsif X > T.Element then Delete( X, T.Right ); else if T.Deleted then raise Item_Not_Found; else T.Deleted := TRUE; end if; end if; end Delete;

-- ======================================================================

procedure Print_Tree ( T : in Search_Tree ) is

procedure Print_T ( T : in Search_Tree; Depth : in Natural ) is

procedure Print_Tree_Node ( D : in Natural; T : in Search_Tree ) is begin -- Print_Tree_Node Set_Col( To => ( Positive_Count( ( D * 4 ) + 1) ) ); put( T.Element ); if T.Deleted then put( " - Deleted" ); end if; New_Line; end Print_Tree_Node;

begin -- Print_T if T /= null then Print_Tree_Node( Depth, T ); Print_T( T.Left, Depth + 1 ); Print_T( T.Right, Depth + 1 ); end if; end Print_T;

begin -- Print_Tree Print_T( T, 0); end Print_Tree;

-- ======================================================================

procedure Print_in_Order ( T : in Search_Tree ) is begin -- Print_in_Order if T /= null then Print_in_Order( T.Left ); if T.Deleted then New_Line; else put( T.Element ); New_Line; end if; Print_in_Order( T.Right ); end if; end Print_in_Order;

-- ======================================================================

function Retrieve ( P : Avl_Ptr ) return Element_Type is

T : Element_Type := P.Element;

begin -- Retrieve return T; end Retrieve;

-- ====================================================================== -- ======================================================================

end Avl_Tree_Pack; B. Sample Ada Programs, continued --

III. Tasking ... downloaded from the internet

Problem: How to make N computations (e.g. compute the determinants of ten 5x5 matrices) in parallel using the multiprocessing capabilities of Ada (and of your implicit parallel computer).

Solution: Date: Wed, 14 Dec 1994 From: petrick@beowulf.aero.org (Bruce Petrick) Updated: Mon, 19 Dec 1994 [BP, MK]

-- Here is one solution. I have taken the liberty of abstracting out -- the "messy" tasking business inside a reusable generic package and -- adding a support package to output elapsed seconds with each print -- statement. This solution works both for Ada-83 and Ada-95. -- -- Bruce Petrick -- The Aerospace Corporation -- petrick@aero.org -- (310) 336-2319

generic type Operand is private; with function Operate ( On_What : in Operand ) return Operand;

package Task_Code_Wrapper is

type Operator is limited private;

procedure Startup ( Actor : in Operator; Start : in Operand ); procedure Results ( Actor : in Operator; Found : out Operand );


task type Operator_Task is entry Startup ( Start : in Operand ); -- use to start task with a value. entry Results ( Found : out Operand ); -- use to retrieve computed value. end Operator_Task;

type Operator is record Actor : Operator_Task; end record;

end Task_Code_Wrapper;

package body Task_Code_Wrapper is

task body Operator_Task is Value : Operand; begin accept Startup ( Start : in Operand ) do -- only store the value in this accept statement. Value := Start; end Startup;

-- actions here can take place in parallel with other tasks... Value := Operate ( Value );

-- now wait until someone wants the result. accept Results ( Found : out Operand ) do Found := Value; -- return the result and terminate. end Results; end Operator_Task;

procedure Startup ( Actor : in Operator; Start : in Operand ) is begin Actor.Actor.Startup ( Start ); end Startup;

procedure Results ( Actor : in Operator; Found : out Operand ) is begin Actor.Actor.Results ( Found ); end Results;

end Task_Code_Wrapper;

package Task_Main_Support is

procedure Print ( Text : in String ); -- Output the current elapsed time in seconds with the text.

end Task_Main_Support;

with Text_IO; with Calendar;

package body Task_Main_Support is

Was : constant Standard.Duration := Calendar.Seconds ( Calendar.Clock );

package Time_IO is new Text_IO.Fixed_IO ( Standard.Duration );

procedure Print ( Text : in String ) is Now : Standard.Duration := Calendar.Seconds ( Calendar.Clock ) - Was; Tag : String ( 1 .. 6 ); begin Time_IO.Put ( Tag, Now, Aft => 3, Exp => 0 ); Text_IO.Put_Line ( "Time " & Tag & ": " & Text ); end Print;

end Task_Main_Support;

with Task_Main_Support; with Task_Code_Wrapper;

procedure Task_Main_Example is

type Operand_Type is range 0 .. 1_000_000; -- whatever....

function Some_Function ( What : in Operand_Type ) return Operand_Type;

package Ops is new Task_Code_Wrapper ( Operand => Operand_Type, Operate => Some_Function );

type Operator_List is array ( Operand_Type range <> ) of Ops.Operator;

-- Declare a list of tasks that will do the work. List : Operator_List ( 1 .. 10 ); Find : Operand_Type; -- temporary variable...

procedure Print ( Text : in String ) renames Task_Main_Support.Print;

function Some_Function ( What : in Operand_Type ) return Operand_Type is begin delay 1.0; -- simulate an action that takes a long time, but -- that can run simultaneously with other actions. return What * 2; end Some_Function;

begin Print ( "At start." ); -- First give all 10 running tasks a value to work on. for Fill in List'range loop Ops.Startup ( List ( Fill ), Fill ); end loop;

Print ( "After all initialized." ); -- At this point, all tasks are running on their respective values.

-- Get results from each task when ready ... for Fill in List'range loop Ops.Results ( List ( Fill ), Find ); Print ( "Result (" & Operand_Type'Image ( Fill ) & " ) =>" & Operand_Type'Image ( Find ) ); end loop; Print ( "All done." ); end Task_Main_Example;

-- Sample Output => -- -- Time 0.010: At start. -- Time 0.020: After all initialized. -- Time 1.020: Result( 1 ) => 2 -- Time 1.020: Result( 2 ) => 4 -- Time 1.020: Result( 3 ) => 6 -- Time 1.020: Result( 4 ) => 8 -- Time 1.030: Result( 5 ) => 10 -- Time 1.030: Result( 6 ) => 12 -- Time 1.030: Result( 7 ) => 14 -- Time 1.030: Result( 8 ) => 16 -- Time 1.030: Result( 9 ) => 18 -- Time 1.030: Result( 10 ) => 20 -- Time 1.040: All done. -- -- (note that without tasking, this would have taken at least 10 seconds)

C. Ada Success Stories

Ada in financial services

One of the early high-profile Ada successes was with Reuters financial services in Hauppauge, NY. Reuters is best known as a British international print and photo wire service that transmits real-time information on financial markets and news. Lesser known are its automated currency futures trading and options trading systems for the Chicago Mercantile Exchange.

Reuters' two systems enable trader-to-trader communication and automate the matching of orders. The systems respond within two seconds, handle high loads, and improve the presentation and usefulness of data to clients. Most importantly, the software must transmit and process the data absolutely correctly and on time. Because the application had to carry a heavy load of data accurately and quickly, Reuters ran a greater risk of the software failing due to its complexity. The resultant mistakes could have been extraordinarily costly. According to Alfred H. Scholldorf, manager of Advanced Projects, after studying the language and building a prototype system in 1985, Reuters decided that using Ada was "required for success".

Each system used eight Ada developers to write 250,000 lines of code. Reuters invested 25 staff-years to build each application's 10 major subsystems. They now run on several large VAX machines with multiplex inputs arriving from PCs in New York, Chicago, London, and Tokyo, which are broadcast to other PCs internationally. The applications process billions of dollars daily. "Without a doubt, we could not have developed the products in C with the same amount of time and to the same level of quality", Dr. Scholldorf said.

Wells Fargo Nikko Investment Advisors also chose to write financial applications in Ada, after comparing the language in January 1990 with C++, Pascal, and PL/1. Based in San Francisco, with offices in London and Tokyo, the company was able to hire from a "real gold mine of senior Ada developers" that had left California's defense industry, according to Timothy A. Wendt, a vice president in the Systems Group. The company manages index funds, which means that it tries to match their portfolios' performance and risk to that of a published index, such as the S&P 500 (Standard & Poor 500).

The company's current system is written in FORTRAN and is 15 years old. The maintenance costs were becoming "unacceptable", according to Mr. Wendt. Ada's long-term advantages sold the company's top executives on converting the system to the new language.

The newly hired developers retrained four Wells Fargo Nikko programmers in Ada, and were trained themselves in the securities industry. By mid-1991, the development team had written one application, a database management system and graphical user interface. The Ada system allows users to query a database of 7,500 stocks and to access different sets of stock according to certain criteria.

The software engineers have already seen benefits in the switch to Ada. Though the initial development stage took longer than anticipated, integrating the system, which they expected to take two months, took instead two weeks. They were able to reuse some components immediately, which surprised them. For example, they created a new software development tool by reusing code for 80 percent of the software. Instead of taking the scheduled three weeks, programmers completed the tool in days. All together, the programmers automatically generated one in six Ada statements in the company's first project either through reuse, commercially available components, or through the Ada code generation package in its CADRE TeamWork CASE tool. Ten senior programmers took 125 person months to complete 98,000 lines of code. That equalled about 38 lines of code per workday per person. Between October 1991 and March 1992, the number of lines of code doubled as the team began its second major application.

Hewlett-Packard (HP) in Paolo Alto, Calif., switched from Pascal to Ada three years ago when improving its computer-aided design (CAD) system for laying out HP microprocessor chips. Around 50,000 lines of Ada have been reused to create the project's total of 640,000 lines. Each line of original code generated an average of almost 13 more lines. The software engineers recently rejected suggestions to write future versions in C++ and decided to continue it in Ada. "People are remarkably happy with Ada", said Eric A. Slutz, an engineer scientist who was the project's manager. "There was a lot of skepticism going into it, but it turned out very well." He also said that, in his experience, Ada compilers check types more extensively than do Pascal compilers, which "is a great advantage to getting the programs right".

Unlike Reuters and Wells Fargo, which implemented internal systems in Ada, Genesis Software, Inc., of Kansas City, Mo., has written a financial service in Ada that it is marketing to government agencies and contractors. The system, Prompt PayMaster (PPM), is in the leading edge of MIS technology. Originally written for the Wang VS, PPM now runs on a Digital VAX with VMS. It uses imaging software which scans documents for electronic storage, a voice recognition system that allows vendors to query an agency's computer about balances, and network communications.

The system helps agencies and contractors comply with the U.S. Congress's Prompt Payment Act of 1982 which, among other requirements, forces government agencies to pay interest due on bills. PPM also facilitates an agency paying bills on time, notes discounts lost from not meeting vendors' deadlines, and tallies interest payments.

Bill Lee, vice president of Genesis Software, said that his company chose Ada initially because of its maintainability. His programmers are pleased with the results of working with the language and offered no resistance to the suggestion. In eight months, eight programmers wrote over 250,000 lines of Ada code. After the product ran successfully on the Wang platform, the software engineers ported PPM to the DEC platform in six months. Currently, one programmer maintains both PPM and a spinoff product also written entirely in Ada, ImageNow. The new product enables users of the VAX mainframe running VMS or Ultrix to create, file, retrieve, FAX, manipulate, etc., images of documents without reprogramming the system's source code. Genesis plans to expand the platforms for ImageNow to Honeywell, IBM, Unisys, and Wang.

In Europe, Ada influenced financial systems starting in the early eighties, with banking nations Belgium and Switzerland leading the way. Banksys, an organization responsible for electronic fund transfers in Belgium, also develops systems for use in other countries. The system is based on Tandem central computers, a private X25 network, terminal concentrators, and Banksys-developed terminals.

Having originally developed the system in C and assembler, Banksys decided to change to Ada because of its real-time capabilities, ease of maintenance on larger systems, and high level of portability.

The Union Bank of Switzerland has written two systems, COSY and DESY+, almost entirely in Ada. COSY (Control System) is a real-time monitoring and control system for VAX/VMS and RISC Ultrix architectures. It enables the bank to manage large computer sites with a minimum of operations staff and to maximize system up-time. COSY was first released in mid-1988. Now in its fourth version, COSY allows almost fully automated systems operations with a graphical user interface running under Motif.

Like Reuters' Ada systems, the DESY (Dealing System) supplies foreign exchange dealers with real-time data to support their transactions. The first DESY release was not written in Ada. In 1986, it was modernized with some Ada. The new version, DESY+, will be released next year, and is written almost entirely in Ada.

Ada in commercial avionics

Nowhere is Ada more deeply entrenched in both the public and private sectors than in the international avionics market.

In the public sector, Boeing Commercial Airplanes can be credited with leading the push for Ada. On May 25, 1985, Boeing established the policy that it would use Ada in future avionics systems, related laboratory facilities, simulations, and associated tools. After the company lobbied the Airlines Electronic Engineering Committee of the Aeronautical Radio, Inc. (ARINC), the committee selected Ada as the "language of choice" in 1988. (Domestic airlines founded ARINC in the 1940s in order to regulate radio navigational frequencies. Since then, the airlines have tried to maximize standards through ARINC that could benefit the entire avionics community.)

Today, Boeing uses about 500,000 lines of Ada to fly its commercial 747-400 in subsystem components, critical certification, and human safety features. Two of the three largest systems on the 747, or 43 percent of the executable bytes, are written in Ada. The software is FAA certified. Boeing's new 777, which is costing between $4 to $5 billion to develop, will be 90 percent Ada by lines of code when it makes its maiden flight in 1994. Brian Pflug, manager of the Central Software Engineering Group in Renton, Wash., says that Ada portability saves Boeing's suppliers the most money.

Another leader in using Ada for flight is Collins Commercial Avionics in Cedar Rapids, Iowa, of Rockwell International. Collins began using Ada in late 1983 for government work. It decided to write commercial applications also in Ada in order to swap personnel, compilers, tools, and training easily between projects. For example, Collins invented and developed a Global Positioning System (GPS) satellite communications board in Ada for the US DoD in the mid-1980s. Later, the division installed the board in commercial airplanes, trains, and even a van that it uses to demonstrate state-of-the-art technology to international automobile makers. Rockwell's Ada work has since spread to its divisions in California, Texas and Florida.

Collins' first commercial applications of Ada were fiber-reinforced plastic corporate turbo-props, the Beechcraft Starship 1 and Beechjet. It started programming the Starship's 375,000 lines of Ada in 1984. Since then, Collins has written a Central Maintenance Computer and an Integrated Display System in Ada, both of which fly in the Boeing 747. Boeing's 737, 757, and 767 use Collins' Electrical Flight Instrument System equipment. In June 1991, the Collins division began marketing its Ada-run GPS modules, called NavCore V, to original equipment manufacturers for around $450. Collins' market for the 2.5" x 4" module includes manufacturers of navigational systems for airplanes, commercial fishing boats, trains, yachts, etc.

FAA's Advanced Automation System

The largest avionics effort written in Ada is the U.S. Federal Aviation Agency's (FAA) $12 billion effort to modernize its air traffic control system. IBM Federal Sector Division in Rockville, Md., won the contract in 1988 for developing 2.3 million lines of new code for the Advanced Automation System (AAS) portion, which will cost approximately $3.55 billion. About 1.8 million lines of code will be written in Ada.

The AAS portion will support requirements for takeoffs and landings, and will control departures and arrivals. It will monitor flights at 22 enroute control stations, 188 terminal radar approach control facilities, 258 air traffic control towers, and more. It also will make suggestions for efficient routing and fuel consumption.

The AAS performance requirements are onerous: In real time, it must handle up to 8,500 flight plans, process information from weather instruments and from 60 short- and long-range radars, track 5,000 commercial and military aircraft in a surveillance area of 2,500 X 2,500 nautical miles, and show the results of entries from 430 controller keyboards on their high-resolution displays. Allowable downtime for the overall system is two minutes per year; for the workstations, it is two seconds per year.

IBM is ensuring this reliability by distributing the system over a network that connects all the air traffic control centers. The enroute centers will be completely redundant in both hardware and software. Also, according to Peter Barton, manager of Software Development Environment, IBM made a "very conscious decision early on to mitigate risk through reuse". A small group of "highly talented" programmers designed the initial reusable components. Mr. Barton listed some of the modules that "we didn't want people reinventing", such as address space management, timing components, and error recovery.

IBM has around 1,000 staff working on the program and nearly 700 subcontractors. Communicating and coordinating the project is a potential nightmare. Because the project is in Ada, independent teams are able to compile their code separately. That facilitates developing the entire project in parallel. Also, the design, which follows an object-oriented approach, is in fully compilable PDL Ada and is not a separate paper design. The software designers can thus more easily communicate their ideas to programmers. The result is high-quality software. As of May 1991, fewer than four errors per 1,000 lines of code were reported for 700,000 lines. By next November, IBM should have completed one million lines of code.

IBM's main competitor for the project, Hughes Aircraft, won a contract to upgrade the Canadian Automated Air Traffic System in Ada. The new system will include processing flight data and weather changes, monitoring flight status automatically, and maintaining control and time distributions between flights.

IBM is competing with Hughes and with Thompson-CSF of France for the British and German systems, as well as for the Asian market. In Ireland, France, Spain, Denmark, Pakistan, and Kenya, Thompson-CSF is installing new radars and entire air traffic control systems written in Ada. IBM successfully won a bid in March 1991 to build Taiwan's World Wide Air Traffic Control system. The 60,000-100,000 lines of software, due in March 1994, will be partially in Ada.

Ada in space

NASA has not mandated that Ada be used except on its largest project, the Space Station Freedom. The agency expects to maintain the Space Station's estimated 10 million lines of Ada over the next two or three decades and to port the software to the 21st-century's hardware systems. Ada will be used in the Space Station's Software Support Environment, the on-board data systems, the ground data systems, and all robotics and flight software.

NASA's Flight Telerobotic Servicer, a robotics manipulator system to be remotely operated from the Shuttle or Space Station, is already mostly operational. Written entirely in Ada at the Goddard Space Flight Center in Greenbelt, Md., the servicer is now achieving a 10-millisecond cycle rate, which means, for example, that it checks for changes or outside stimuli 100 times per second.

Traditionally a FORTRAN shop, NASA is branching out slowly to include more Ada in its projects. For example, Goddard is also writing the Second TDRSS (Tracking and Data Relay Satellite System) Ground Terminal, a new ground station for the space tracking network, completely in Ada. Typical systems at the Flight Dynamics Division of Goddard are 150,000-300,000 lines of code, 85 percent of which is written in FORTRAN, 10 percent in Ada, and five percent in other languages.

The Canadian Space Agency plans to launch a remote sensing satellite, Radarsat, in late 1994. A subsystem, the payload computer unit, is being written with approximately 10,000 lines of Ada. The software will control payload subsystems and produce image data that can be stored or downloaded to the ground station. The operations will be synchronized with time and orbit parameters. The satellite is designed to penetrate thick cloud cover and darkness in order to observe detailed images of the Earth's environment.

European Space Agency

Most of the thrust of Ada in the European Space Agency (ESA) has come from its large projects: Columbus (the European segment of the International Space Station Freedom), and Hermes (the European Space Plane). The complexity of these projects (one million lines of code) and the difficulties of developing them in geographically disparate laboratories make Ada support for programming in the large especially attractive.

The first Ada code to be flown in an ESA spacecraft should take place in the Infrared Solar Observatory (ISO) satellite in May 1993. ISO is a scientific satellite going to the Sun. The Attitude and Orbit Control subsystem of the satellite is developed in Ada using a 1750 processor (MAS-281) from UK-based Marconi.

At present, ESA is investing heavily in preparing future Ada technologies, such as in developing an Ada Tasking Coprocessor (ATAC). ATAC is a VLSI chip implementing the full Ada tasking model which can be attached to any 16 or 32-bit microprocessor available in the market. It takes care of all scheduling decisions.

The agency's hard real-time system studies have led to the proposal of new methodologies for Hierarchical Object-Oriented Hard Real-time Systems (HRT-HOOD). ESA was instrumental in developing HOOD as a method to incorporate state-of-the-art scheduling techniques; i.e., deadline monotonic scheduling.

Ada in oil exploration

Like NASA and the ESA, Shell Oil and Dowell-Schlumberger Inc. were concerned first with writing reliable and accurate software, and chose Ada because of its reputation. The oil companies hoped to save money by using software to predict the outcome of proposed projects.

Shell initially selected Ada in 1985 because of its software engineering features -- such as records, pointers, strong typing, generics, exception handling, and multi-tasking -- and because of the international standard. It uses two Ada systems in testing ocean floors for oil: a seismic processing system, which is written almost entirely in Ada, and a graphical user interface, which includes C and UIL. Both systems constitute a single, larger project.

The seismic system breaks long processing sequences into small parts. Each part is programmed with an Ada task, allowing for parallel execution. The system has been ported and successfully executed on Sun3, Sun4, Convex, VAX, RS6000, and Cray machines, using several different compilers.

Seismic processing involves performing hundreds of individual steps on a great quantity of data. The graphic interface allows a user to assemble hundreds of batch jobs and to decide the sequencing among them. A multi-colored display shows their status. The system uses Ada for the background processes (which handle the job management functions) and the internal portion of the actual interface. Roughly, the user interface consists of 217,000 lines of Ada code, and 363,000 lines of other languages. The runtime system consists of 222,000 lines of Ada, and the operations is projected to be 250,000 lines of Ada. The interface is now in production use, driving an older signal processing system. Users will begin testing the Ada seismic system later this year.

Dowell-Schlumberger Inc., in Tulsa, Okla., an oil field service company, has written between 150,000-175,000 lines of Ada for simulation software since 1985. The company's five Ada applications, which run on MicroVax IIs, predict what will happen and how much material is needed when the company provides a service for an oil producer. The tool CemCADE (Cement Computer-Aided Design and Evaluation), for example, simulates the cementing of an oil well to stop oil and gas from rising and mixing with the fresh water supply around it. PacCADE does the same for packing gravel around the oil well. The company's 200 international locations all use the tools.

Victor Ward, section head of the CADE Product Team in Tulsa, says Ada was originally chosen because of its generics and because code could be easily maintained and reused. "Ada isn't more difficult to use than any other language", he said, "once you get over the start up costs".

Ada in the Pacific

The Japanese SIGAda, with 410 members, is one of the international special interest group's largest chapters. Only about 25 of the members in Japan are from academia; the others are from Japanese corporations. The world's largest corporation, Nippon Telegraph and Telephone (NTT), was one of the first to commit to Ada by developing compilers and support tools in 1983, when the language became a standard. By 1989, NTT had developed 2.5 million lines of Ada code. "Software productivity and reliability are critical to NTT," according to Kiyoshi Tanaka, a senior research engineering supervisor. "The Ada language promised, and has proven to be in practice, a sound basis for the development of large-scale commercial software systems."

NTT has implemented several commercially available telecommunications services in Ada: a videotext communication system, a cellular telephone service, a satellite communications system, and a database management system. It has started developing a digital cellular telephone system service in Ada, using an object-oriented design.

The Australians first used Ada for its Royal Navy helicopter, then began applying the language commercially. For example, Universal Defence Systems, of western Australia, wrote a kernel command control entirely in Ada. Its over 500,000 lines of code provide a core set of functions for any command and control system. It has since been applied commercially to a Vessel Tracking System and to an Irrigation Monitoring System.

The Vessel Tracking System receives information from satellite-based technology. The Irrigation Monitoring System processes information from weather forecasts, and moisture sensors planted in the ground, in order to manage water and labor costs on the terrain.

Advanced Systems Research and Lend Lease Corp. of Pymble, Australia, developed a vehicle location system, called QUIKTRAK, using Ada for 75 percent of its code. QUIKTRAK, a joint venture, is operational in Sydney. It tracks information about vehicles in cities and suburbs, and presents a map indicating their locations on the customer's PC.

Ada in Europe

The political shape of Europe is changing almost by the month. As former Eastern bloc countries scramble to climb on board the technology band-wagon, they are increasingly looking to Ada as both a teaching tool for universities and as a basis for solutions in industry. Moreover, as the rest of Western Europe adapts to this change, Ada vendors and developers are becoming less dependent on defense-related contracts and are moving to avionics, telecommunications, and financial applications.

The European Ada market represents some 20 percent of the total world market for the language. Considering the close links Europe has with the US, and Ada having been developed in France, the European market share is no surprise. What is interesting, however, is the diversity of use of Ada throughout Europe and the support it has been given at both European Community and government levels.

The Commission of the European Communities (CEC) stepped in to support the Ada market as early as 1979 with its Multi Annual Programme (MAP). The support represented 50 percent of the total CEC R&D budget for information technologies at the time. Through this program, some of the first European compilers were developed and the foundations laid for the PCTE (The Portable Common Tool Environment), which is an Ada Programming Support Environment. MAP also provided funding for the establishment of an Ada Europe Association and for its technical working groups.

The CEC's policy with programs such as MAP and ESPRIT -- the European Strategic Programme for Research & Development in Information Technology -- is to form a sound technical basis for future competition with the rest of the world. CEC's promotion of Ada was its first major European endorsement. Once the market was established, the CEC greatly reduced its funding. It still sees Ada as a key strategy at the Community level and is the basis for many CEC-funded projects.


Telecommunications is one of the fastest growing markets in Europe. Several pan-European projects are in development, such as a European Cellular Telephone Infrastructure project (GSM). The CEC supports telecommunications through its RACE (Research and Development in Advanced Communications in Europe) program.

The industry had fleeting relationships with Chill, C, C++ and Ada. A language similar to Pascal and Ada, Chill was especially developed for telecommunication equipment. It did not take off, but some sectors still use it. C now dominates the business. As projects grow, many users are looking instead to C++ as a more manageable solution. However, as both usage and studies have documented, C++ neither performs nor can be maintained as well as Ada. Therefore, having passed over Ada as the dominant telecommunications language at the outset some years ago in favor of C and C++, the industry is reconsidering the language. Another Ada advantage is that many of the key telecommunications players, such as Ericsson and Motorola, have strong Ada links in the defense market and thus an extant wealth of expertise.

Two British companies have used Ada in telecommunications projects: a GSM Cellular Base Station Software by Orbitel, and a new development of the System X Telephone Switching System by Plessey.

The future

When the Ada Information Clearinghouse in Arlington, Va., first conducted an independent survey of Ada applications in 1986, it found only 13 commercial systems. The number has grown steadily since then, until the Clearinghouse's October 1992 Ada Use Database listed over 90 commercial applications. The language has caught on with some small developers, who are using it to edit videotapes in Saratoga, Calif., and to search documents with hypertext in Houston, Texas. Some larger companies are testing their products' reliability with Ada software, such as Motorola in Illinois testing its cellular phone switching systems, Trace Inc. in California testing bare circuit boards, and Collins Avionics in Iowa testing a variety of its electronic navigational systems.

For future markets, Ada compiler vendors now have products for the hand-held computers, which shops use to read bar-coded prices and overnight delivery services use to route packages. Ada compilers are also now available for digital signal processors, which operate everything from suspension systems in automobiles to high-speed modems in PCs.

By satisfying DoD requirements, Ada was able to appeal to a much larger market than its creators first envisioned. Today, the commercial sector, which includes an estimated 24 percent of the Ada market, may not financially support Ada vendors enough to keep them afloat when the DoD begins cancelling projects. Research and development contracts are often the first in line to be cut, and many of them are being written in Ada. As the defense industry slims down, more commercial software developers will have to see Ada as a solution to their cost overruns and maintenance problems in order for the language to be viable in the next century.


We would like to thank the following people for their generous contributions to this article: Jose-Luis Fernandez of ISDEFE, Spain; Bjorn Kallberg, Ulf Olsson of Nobeltech, Sweden; and Marcus Meier of UBS, Switzerland; and John Walker of the Ada Information Clearinghouse in Arlington, Va.

The authors

Ann S. Eustice is vice chair of the SIGAda Commercial Ada Users Working Group (CAUWG). She is a writer for IIT Research Institute, and publishes regularly in the Ada Information Clearinghouse Newsletter.

Barry Lynch is a director of Software Professionals Ireland in Dublin. He is a board member of Ada Europe and an International Representative on the Executive Committee of ACM SIGAda. His special Ada interests are in environments and public tool interfaces.


Ada Information Clearinghouse (AdaIC) P.O. Box 46593 Washington, DC 20050-6593 703/685-1477, 800/AdaIC-11, FAX 703/685-7019 adainfo@ajpo.sei.cmu.edu; CompuServe 70312,3303

The AdaIC is sponsored by the Ada Joint Program Office and operated by IIT Research Institute.

Converted with HTML Markup 1.1 by Scott J. Kleper