programming languages and lifecycle cost l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Programming Languages and Lifecycle Cost PowerPoint Presentation
Download Presentation
Programming Languages and Lifecycle Cost

Loading in 2 Seconds...

play fullscreen
1 / 74

Programming Languages and Lifecycle Cost - PowerPoint PPT Presentation


  • 642 Views
  • Uploaded on

Programming Languages and Lifecycle Cost. 30 August 1997 Ada Joint Program Office Center for Computer Systems Engineering Joint Interoperability & Engineering Organization Defense Information Systems Agency. PURPOSE.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Programming Languages and Lifecycle Cost' - Sophia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
programming languages and lifecycle cost

Programming Languages and Lifecycle Cost

30 August 1997

Ada Joint Program Office

Center for Computer Systems Engineering

Joint Interoperability & Engineering Organization

Defense Information Systems Agency

purpose
PURPOSE

Provide Quantitative Information on Lifecycle Cost Implications of Programming Language Use

(Ada* vs C/C++)

* Includes Ada 83 and Ada 95

outline
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
  • Project Examples
  • Findings
caveats
CAVEATS
  • Language debate is often highly subjective and inconclusive
    • Different perspectives produce different positions
    • Many have negative reaction to Ada mandate
  • Qualitative arguments do not resolve key issues
    • “Ada is too slow”; “No Ada programmers”; “No Ada tools”
    • “C code is cryptic”; “C is unsafe”; “C maintenance cost high”
  • Quantitative cost and productivity data difficult to obtain
    • Lifecycle cost data requires discipline to collect
    • Productivity data is often company proprietary
    • “Controlled experiment” implementing equivalent large, complex applications in multiple languages is exceedingly expensive
  • Technical language characteristics considered only indirectly
    • Discussed only with respect to impact on lifecycle cost
sources
Commercial Examples

Dr. John McCormick (SUNY)

Kurt Welker (USAF)

Ulf Olsson (CelsiusTech)

Dr. Stephen Zeigler (Rational)

Information Sources

Currie Colket (SPAWAR 332)

Les Dupaix (STSC/Hill AFB)

Michael Schrank (MITRE Corp.)

AEGIS Community (Various)

NASA, IEEE, ACM, etc.

SOURCES
  • Study conducted by:
    • Michael Masters (NSWCDD)
    • James Readan (NSWCDD)
    • J. Hoppel (CSC/KGO)
    • W. Wright (CSC/KGO)
background
BACKGROUND
  • C created in 1970s to support system software development
    • “Portable assembly language” - Dennis Ritchie (C co-developer)
  • Ada 83 designed to address issues related to complex systems
  • C++ added object-oriented features and some type checking to C
  • Ada 95 revision based on a decade of experience with Ada 83
    • Real-time and distribution upgrades
    • Object-oriented features
    • “Programming in the large” upgrades
  • C in widespread use in commercial industry; C++ use increasing
  • Ada 83 used predominantly in complex/real-time system market
software growth

10000

MISSION CONTROL: GROUND STATION

ATF

PROJECTED

SHUTTLE/OPERATIONAL

SKYLAB 2

B-2

F-15E

SHUTTLE/OFT

APOLLO 17

B-1B

APOLLO 7

MANNED SYSTEMS

GEMINI 12

1000

SHUTTLE/OFT

B-1A

C-17

PROJECTED

F-16 C/D

GEMINI 3

P-3A

AWACS

MISSILE

GALILEO

S-3A

APOLLO 11

E-2C

100

UNMANNED SYSTEMS

P-3A

F-15

PERSHING 11(ED)

SKYLAB 2

GEMINI 2

APOLLO 7

F-111

TITAN 34D (IUS)

F-111

VIKING

MERCURY 3

C-5A

PERSHING 11(AD)

A-7D/E

UNMANNED

10

TRIDENT C4

GEMINI 3

UNMANNED INTERPLANETARY

VOYAGER

TITAN IIIC

MANNED A/C

POSEIDON C3

PERSHING 1

MANNED SPACE

PERSHING 1A

MARINER

VENUS MERCURY

MANNED SPACE CONTROL

TITAN

SURVEYOR

1

1960

65

70

75

80

85

90

95

SOFTWARE GROWTH

Program Size (KSLOC)

Year

Source: USAF Software Technology Support Center

outline9
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
  • Project Examples
  • Findings
cost factors
COST FACTORS
  • Commercial viability
  • Standardization and portability
    • Ada 83 and Ada 95 are ISO standards
    • C is ANSI standard; “It will probably be years before the C++ standard is finally adopted.” H. Schildt, ANSI C++ committee,1995
  • Lifecycle Productivity
    • Training, programmer productivity, reuse, maintainability
  • Process and tools
    • High cost of Ada 83 compilers; Ada 95 GNAT is freeware
    • Added cost of C/C++ “process” to provide features inherent in Ada
  • Reliability and safety
    • Ada compiler/runtime validation
    • Ada technical features: type checking, run-time range checks, restricted pointer use, library consistency, determinism, etc
dod weapon systems
3GL (g.p.) M SLOC

Ada 83 49.70

C 32.50

FORTRAN 19.55

CMS-2Y/M 18.55

Jovial 13.80

C++ 5.15

Pascal 3.91

PL/1 1.00

Other 3GLs 4.22

TOTAL 148.38

Generation M SLOC

First 3.90

Second 26.30

Third (gen.purp.) 148.38

Third (special) 3.70

Fourth 5.00

Fifth 0.29

TOTAL 187.57

DOD WEAPON SYSTEMS

Source: Institute for Defense Analyses survey, P-3054, Jan 95

non dod ada examples
NON-DOD Ada EXAMPLES
  • Non-DOD Government Use
    • DOE AdaSage (200K SLOC)
    • FAA Display System Replacement (DSR) (2.3M SLOC)
    • NASA Space Station
  • Commercial Use
    • Boeing 777 (10M SLOC; 2-4M will be inherited/reused)
    • “DEC Design” tool
    • Motorola Cellular Phone
    • Nippon Communication Products (over 4M SLOC)
    • Rockwell Beech Starship (375K SLOC)
    • Rockwell Global Positioning System
    • GM Heavy Truck transmission computer
    • Volvo Automated Parts Delivery
    • Weirton Steel Automated Rolling Mill (500K SLOC)
    • Genesis Prompt Paymaster (250K SLOC)
    • Reuters NY Stock Exchange Trader program (250K SLOC)
commercial ada use
Air Traffic Control

Australia

Belgium

Brazil

Canada

China

Czech Republic

Denmark

Finland

France

Germany

Greece

Hong Kong

Hungary

India

Ireland

Kenya

Netherlands

New Zealand

Pakistan

Scotland

Singapore

South Africa

Spain

Sweden

United Kingdom

United States

Vietnam

COMMERCIAL Ada USE

Banking and Financial Networks

Reuters news service

Swiss Postbank Electronic Funds Transfer system

Commercial Aircraft

Airbus 330

Airbus 340

Beechjet 400A (US business jet)

Beech Starship I (US business turboprop)

Beriev BE-200 (Russian forest fire patrol)

Boeing 737-200, -400, -500, -600, -700, -800

Boeing 747-400

Boeing 757

Boeing 767

Boeing 777

Canadair Regional Jet

Embraer CBA-123 and CBA-145 (Brazilian-made regional airliners)

Fokker F-100 (Dutch DC-9-size airliner - American Airlines flies these)

Ilyushin 96M (Russian jetliner)

Saab 2000

Tupolev TU-204 (Russian jetliner)

Communication and Navigational Satellites and Receivers

INMARSAT - voice and data communications to ships and mobile communications

Intelsat VII

NSTAR (Nippon Telephone and Telegraph)

PanAmSat (South American Intelsat-like consortium)

United States Coast Guard Differential Global Positioning System (GPS)

Rockwell Collins NavCore V GPS receiver

ESA/Alcatel-SEL GPS receiver

TDRSS Ground Terminals - NASA

Scientific Satellites

Cassini command subsystem

ENVISAT-1 - European Space Agency (ESA), Earth observation satellite

XMM - ESA

EOS - NASA's Earth Observing System

GOES

RadarSat (Canada)

UK Space Technology Research Vehicle, auxillary payload on Ariane4

Railway Transportation

Cairo Metro

Calcutta Metro

Caracas Metro

Channel Tunnel

Conrail (major U.S. railway company)

French High-Speed Rail (TGV)

French National Railways

Hong Kong Suburban Rail

London Underground

Paris Metro

Paris Suburban Rail

Television Industry

Canal+ (French pay-per-view TV, remote cable box control software)

Medical Industry

JEOL Nuclear Magnetic Resonance

Source: George Washington University EE & Comp. Science Dept.

language use
“What are your top three development tools?”

Percentage of

Tool Companies using

PowerBuilder 44

Visual BASIC 42

COBOL 40

C++ 20

Access (DBMS) 18

Oracle (DBMS) 14

Borland Delphi 8

Source: Forrester Research Inc. survey responses from 50 Fortune 1000 companies

LANGUAGE USE

Changing Language Use

Percent Change

Language from 1993 to 1994

C / C++ -32

FORTRAN 49

Visual BASIC 60

COBOL 75

Smalltalk 200

Source: Dataquest survey of Microsoft Windows application programmers, Communications Week, Aug 1995

Source: IEEE Computer, March 1996

foundation languages

Pascal

Ada

Modula

C

C++

Scheme

Others

Pascal

Pascal

36%

40%

FOUNDATION LANGUAGES

WORLDWIDE

USA

Scheme

Scheme

Others

12%

Others

C++

11%

12%

6%

10%

C++

8%

C

11%

C

9%

Modula

5%

Modula

8%

Ada

Ada

16%

17%

Source: University of Michigan Computer Science Dept. survey

ada as a foundation
Ada AS A FOUNDATION
  • University of Alabama
  • Auburn University
  • California State Long Beach
  • Clemson University
  • Gallaudet University
  • Georgia State University
  • University of Maryland
  • University of Missouri
  • University of New Orleans
  • State University of New York
  • Penn State University
  • University of Texas Austin
  • West Virginia University

Number of institutions teaching Ada as a Computer Science foundation

Year CS1 CS2/7 Total

1991 20 20 40

1992 30 27 57

1993 52 33 85

1994 63 37 100

1995 97 41 138

1996 110 36 146

1997 114 36 150

Source: George Washington University EE & CS Dept. survey

standardization
STANDARDIZATION
  • Ada 83 is an ISO standard
  • Ada 95 is an ISO standard
  • C is an ANSI standard
  • C++ is not yet a standard
    • “It will probably be years before the C++ standard is finally adopted.” H. Schildt, ANSI C++ committee,1995
    • Results of recent ISO canvas for C++ standard:
      • 10 in favor
      • 6 against
      • USA abstained
      • Britain lodged approximately 85 pages of comments
ada viability

Ada market appears stable or increasing

Ada VIABILITY
  • Increasing acceptance in USA
    • 50M SLOC 3GL code base in DOD Weapon Systems
    • Increasing non-DOD and commercial use
    • Ada increasingly taught in universities
    • Ada 95 provides enhanced object oriented features
      • GNAT Ada95 freeware compiler likely to encourage use
      • JAVA WWW language has partial C++ syntax and Ada95 semantics
  • High degree of acceptance in Europe
    • NATO requires Ada; European vendors rarely request waivers
  • High degree of acceptance in Far East
    • Compiler sales greater than US and Europe combined
outline19
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
  • Project Examples
  • Findings
language studies
LANGUAGE STUDIES
  • USAF Study, “Ada and C++: A Business Case Analysis,” 1991
    • Sponsored by Lloyd K. Mosemann, SAF/AQK
  • USAF Software Technology Support Center (STSC) surveys
    • Les Dupaix of STSC tracked software business case info since 1990
    • Monitored numerous government studies (over 100M SLOC)
    • Survey of 11 European aerospace and defense contractors, 1995
  • Institute for Defense Analyses survey
  • MITRE Software Maintenance study
    • “Ada in the Maintenance Arena,” Schrank, Boyce & Davis, 1995
  • Other sources: NASA, IEEE, ACM, AT&T, Ada Information Clearinghouse, etc.
  • AEGIS Experience
air force study
AIR FORCE STUDY
  • “Ada and C++: A Business Case Analysis,” 1991
    • Five independent studies sponsored by Lloyd Mosemann, SAF/AQK
  • Institute for Defense Analyses study of tools and training
    • Tools and courses are available
  • Software Engineering Institute used IBM / FAA ranking method
    • Bottom line scores (scale 0-100): C++ = 64, Ada = 79
  • CTA Inc. analyzed cost factors from Reifer Consultants database
    • Productivity (KSLOC/SM): All = 183; C++ = 187; Ada = 210
    • Error rate (Errors/KSLOC): All = 33; C++ = 31; Ada = 24
  • TRWdetailed analysis of typical info systems & C3I projects
    • Info system ranking: C++ = 1324; Ada = 1631 (23% better)
    • C3I system ranking: C++ = 1401; Ada = 1738 (24% better)
  • Naval Postgraduate School addressed policy issues
    • Recommended continued investment in Ada
stsc european survey
BT Systems, Sweden

CelsiusTech, Sweden

CRI, Denmark

Dassault Electronique, France

FMV, Sweden

Heise Software, Germany

Note: Software products from the above companies represent an Ada code base of over 25M SLOC

SATT Control, Sweden

Sextant Avionique, France

TERMA, Denmark

Thompson CSF, France

Volvo, Sweden

STSC EUROPEAN SURVEY
outline23
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
    • Productivity
    • Program Integration
    • Reliability & Maintenance
  • Project Examples
  • Findings
domain productivity

600

500

400

300

Productivity (SLOC/MM)

200

100

0

Avionic/

Command

Data

Environ.

Comm.

AI

Sonar

& Control

Processing

Ada

All Lanugages

(including Ada)

DOMAIN PRODUCTIVITY

Source: USAF Software Technology Support Center

Based on over 100M SLOC of military and commerical software

domain cost

200

180

160

$

/

S

O

L

C

140

120

100

80

60

40

20

0

Avionic/Sonar

Cmd & Control

Data Processing

Environment

Telecomm.

All Lanugages

(including Ada)

Ada

DOMAIN COST

Source: USAF Software Technology Support Center

Based on over 100M SLOC of military and commerical software

productivity

250

627%

Improvement

Source: CelsiusTech, Sweden

12

200

S

10

L

O

150

8

C

SLOC / MM

118%

Improvement

/

6

100

H

4

o

50

u

2

r

0

0

Historical

Ada

(First Ship)

Ada & Reuse

Standard (all lang.)

First Ada Project

Ada Long Term

Source: “Ada vs C++: A Business Case Analysis,” CTA Substudy, July 1991

PRODUCTIVITY
nasa ada reuse
NASA Ada REUSE

% Reused

Source: NASA/Goddard Space Flight Center, Oct 91

diseconomy of scale

400

350

300

250

Productivity (SLOC/SM) *

200

150

100

50

0

2

8

32

128

Program Size (KSLOC)

DISECONOMY OF SCALE
  • Barry Boehm:*
    • “The more members that are added to a team, the more . . . time is consumed in communication with other team members . . .”
    • “This decrease in [programmer] productivity on larger projects is called a diseconomy of scale in economic terms.”
  • Methods with different impacts on productivity/cost will have a relatively greater impact as program size increases

* Source: Software Engineering Economics, Barry Boehm, Prentice-Hall (COCOMO model)

productivity improvement
PRODUCTIVITY IMPROVEMENT

Ada productivity compared to other HOLs

Source: USAF Software Technology Support Center

Based on over 100M SLOC of military and commerical software

outline30
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
    • Productivity
    • Program Integration
    • Reliability & Maintenance
  • Project Examples
  • Findings
program errors
PROGRAM ERRORS

Source of Errors - %'s

Communications of the ACM, Jan. '84

50%

30%

10%

Requirements

Definition

Software

Design

Coding

Testing

Deployment

$ 10

Relative Cost to Correct Errors - $1000's

Source: AT&T Bell Labs Estimates

$ 5

Software

Design

Coding

Testing

Deployment

Requirements

Definition

development phases

50

45

40

35

30

Percnet of Total Effort (%)

25

20

15

10

5

0

Design

Code & Debug

Non-Ada

Ada

Test

Source: NASA/Goddard Space Flight Center, 1982-89

DEVELOPMENT PHASES
development phases33
DEVELOPMENT PHASES

Source: USAF STSC European survey

Percent of Total Effort (%)

program integration

90%

80%

70%

60%

50%

40%

30%

20%

10%

0%

Analysis, Design, Code

Historical

Integration

Ada (First Ship)

Source: CelsiusTech, Sweden

PROGRAM INTEGRATION
  • Errors found at integration are costly to fix
    • “Integration is the most costly phase”
      • Requires the most people and equipment
    • “Integration is the most repeated phase”
      • Required after major upgrades
  • Tools that reduce integration time also reduce cost
csc experience
CSC EXPERIENCE

Program Lang. SLOC Design Code U/T I&T

AEGIS CMS-2Y 31M* 38 12 13 37

ADM Ada 75K 39 19 22 20

Australian Sub Ada 100K 42 16 21 21

JCALS Ada 400K 38 21 21 20

ENWGS Ada 511K 16 40 26 18

AN/BSY-2 Ada 700K 42 16 21 21

IPS Ada 718K 16 23 24 37

JCALS C 7K 38 21 21 20

TGC C 43K 35 29 15 22

E-CALS C 91K 40 20 10 30

Note: design, code, unit test, and integration & test values are percent of total effort

* Baselines 1 through J2.2, 1984-1995

outline36
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
    • Productivity
    • Program Integration
    • Reliability & Maintenance
  • Project Examples
  • Findings
reliability

35

Source: USAF study - “Ada vs C++: A Business Case Analysis,” CTA Substudy, July 1991

30

25

20

Error Rates

Errors / KSLOC

15

10

5

0

Integration

Formal Qual. Test

Standard (all lang.)

Average Ada

RELIABILITY
  • New York, Chicago telephone system crashs
    • Crashs caused by C pointer problems
  • Baltimore Memorial Hospital X-ray machine
    • 6 deaths, 250 injuries
    • Defect caused by C pointer problem
  • Smog sensor
    • $1M+ fine by EPA
  • Internat’l Energy Commission
    • “150 features of C language are unsafe for nuclear use”
airbus brakes
AIRBUS BRAKES

Source: Thompson, France

Data with-held

Number of Errors

maintenance

Maintenance cost advantage of Ada over other languages

40

35

30

25

20

Percent Advantage for Ada

in Cost to Make Change

15

10

5

0

-5

-10

72 LOC

87 LOC

350 LOC

550 LOC

870 LOC

10,000

100,000

1,000,000

LOC

LOC

LOC

10% Change

30% Change

Source: “Ada Technology: Current Status and Cost Impact,” IEEE Vol. 79 No. 1

MAINTENANCE
mitre study
MITRE STUDY
  • “Ada in the Maintenance Arena,” Schrank, Boyce & Davis, MITRE, 1995
    • Used Lockheed Martin’s Programmed Review of Information for Costing and Evaluation (PRICE) Software (PRICE-S) model
    • Examined military airborne avionics software
    • Used Capers Jones’ “function point” data base
      • Compares equal functionality vice equal SLOC
    • Estimated 10-year maintenance cost for
      • Ada
      • C
      • “Other HOL” (Pascal & FORTRAN)
    • Assumed experienced programmers and good tools
annual maintenance
ANNUAL MAINTENANCE

270,000 LOC

225,000 LOC

135,000 LOC

1994 dollars X $1000

150,000 LOC

112,500 LOC

75,000 LOC

Airborne avionics software

Function Points

Source: MITRE Study, Schrank, Boyce & Davis, 1995

outline42
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
  • Project Examples
  • Findings
projects
PROJECTS
  • Perceived Failures
  • Real-time course at the State University of New York (SUNY), Plattsburgh NY
  • Air Force Improved Many-On-Many (IMOM) reengineering and Idaho National Engineering Laboratory (INEL) studies
  • CelsiusTech, Swedish defense contractor (corvette class)
  • Rational Software Corporation experience with Verdix Ada Development Systems (VADS)
perceived failures
PERCEIVED FAILURES

SYSTEM

Federal Aviation Administration Advanced AutomatIon System (AAS) - program was restructured and descoped in 1994

F16 Avionics - system worked but had cost and schedule overruns

SUBACS - Failed to deliver “on schedule”

P3C Update 4 - Cancelled while behind schedule

ASSESSMENT

Lincoln Lab report: Shifting requirements. “[T]he benefits of using Ada for the development and maintenance of large systems are well-known.”

Development team unfamiliar with Ada and F16, had 18 mo. schedule, used new parallel processor w/shared memory, changed runtime and methodology, used rate monotonic scheduling.

Well into the project the sponsor cut one year off the schedule; product delivered on original schedule.

Mission need diminished due to declining Soviet threat. Technology transferred to allies.

faa aas
FAA AAS
  • $4B program to replace FAA air traffic control system hardware and software tower, terminal and enroute facilities; 2M SLOC Ada on distributed IBM RS/6000
    • In 1994 the program was restructured: terminal part cancelled; tower part descoped; enroute part became Display Replacement System (DSR)
  • “The Role of Ada in the Restructuring of the Advanced Automation System Program”
    • Abstract of paper by Jonathan Dehn and Michael Glasgow, Loral Air Traffic Control
  • “Root problems in the AAS”
    • “Inadequate requirements baseline control”
    • “Extremely high availability requirements that led to high complexity in the implementation”
    • “Changing mission needs”
  • “[Ada] had little to do with the problems that caused the restructuring of the program.”
    • Note: beneficial aspects of Ada use not yet addressed in the draft paper
    • “Shortage of truly knowledgable Ada programmers. . .”
    • “Ada is frequently maligned for being a poor [execution] performer . . . We reject this notion.”
    • “Resource intensive in the development environment”
    • “Ada suffers from a severe image problem . . . viewed as a dead-end language”
project x
PROJECT “X”
  • Project “X” (also perceived by some as an Ada “failure”)
    • Company and project name withheld by agreement with source
  • Large, real-time, distributed system on a COTS UNIX paltform
    • Command and control system with a high reliability requirement
  • Average level of programmer experience
  • Approximately 1M SLOC of Ada
  • Approximately 110K SLOC lines of C code
    • Handled interface with a COTS network product
  • Project development completed
    • Currently in system test phase
project x results
PROJECT “X” RESULTS
  • Productivity rates for both Ada and C (SLOC per staff month)
    • 300: Includes time spent writing code, unit and string testing
    • 200: Including design and CDR time
    • 160: Including integration time
    • 150: Including system test time
  • 11 defects observed per KSLOC, regardless of language
  • C defects took 4 times longer to fix than Ada defects
    • C fix rate may have been impacted by low-level nature of services (communication code) implemented in C
suny real time course
SUNY REAL-TIME COURSE
  • Real-time Course at the State University of New York (SUNY), Plattsburgh NY
    • “A Model Railroad for Ada and Software Engineering”, Communications of the ACM, November 1992
    • POC John W. McCormick, Ph.D.
  • Teams of 3-4 students design and build real-time model railroad control system
    • Students have background in Pascal or Modula-2
    • 5,000-15,000 lines of code
    • 30-60 loosely coupled threads of control
    • 27 independently powered blocks of track
    • 6 reversing loops, 25 turnouts (switches)
    • 150 toggle switches would be needed to manually control layout
suny results
SUNY RESULTS
  • Used C as the programming language for the first five years
    • No team ever completed its project, even when the instructor provided up to 60% of the project code
  • Five years ago the programming language was changed to Ada
    • Initially about 50% of the teams completed their projects without instructor support code
    • With instructor support code, about 75% of the teams now complete their project
dr mccormick s comments
Dr. McCORMICK’S COMMENTS
  • Students produced working systems significantly faster with Ada
  • Students were able to focus on software engineering issues rather than language issues
    • Elimination of single keystroke errors (e.g., using = instead of ==)
    • High level of abstraction for multi-tasking
    • Higher level of abstraction for bit manipulation and data types (far less pointer manipulation)
    • Ada program library (team members know when a specification changes)
    • Exception handlers to separate normal processing from error handling
    • Modularity and information hiding through packages
    • Encapsulation through private and limited private types
    • Code reuse through generic units
imom reengineering
IMOM REENGINEERING
  • Air Force Improved Many-On-Many (IMOM) reengineering and Idaho National Engineering Laboratory (INEL) studies
    • “Electronic Combat Model Reengineering”, Ada Information Clearinghouse, March 1995
    • “Improved Many-On-Many (IMOM) Model Research Study”, United States Air Force Electronic Warfare Center, May 1991
    • POC Kurt Welker
  • Developed in 1984 in FORTRAN for proprietary hardware
    • 333,400 lines of code
  • Translated to C in 1988 for users without proprietary hardware
    • Used automated translation tool to convert FORTRAN to C
    • C required significant manual clean-up
    • Maintained original software design and architecture
imom maintenance
IMOM MAINTENANCE
  • High maintenance costs
    • Maintaining two systems in different languages
    • Original software design deteriorated significantly
  • Air Force sponsored study by INEL; the study recommended:
    • Reengineer and redesign the system
      • Translated C harder to maintain than FORTRAN original
      • Code produced by translator not optimized
    • Use object-oriented techniques
      • Modularity, data abstraction, and process abstraction
    • Use the Ada programming language
      • Ada implementation more efficient, compact (data types and structures)
      • Ada support environment provides needed tools (e.g., debugger)
      • Package abstraction improves program maintainability
imom ada redesign
IMOM Ada REDESIGN
  • Redesigned and recoded in Ada 83
    • 213,000 SLOC
  • FORTRAN to C conversion required 54 MM
    • “Final C implementation required a significant amount of clean-up”
  • Reengineering of IMOM required 72 MM
  • Reengineering of three other IMOM-based models required a total of 20 MM
    • Significant amount of reuse in Ada among IMOM models
    • 65% of the code modules were reused in one or more models
maintainability index
MAINTAINABILITY INDEX
  • Maintainability Index - a measure of success
    • Set of polynomial metrics developed at the University of Idaho
    • Uses Halstead’s effort/module and McCabe’s cyclomatic complexity/module, plus other factors
    • Validated in the field by Hewlett-Packard
    • Language independent
    • Index is a number between 0 and 100
    • Used primarily to determine if modules have a high, medium, or low degree of difficulty to maintain
  • HP concluded “modules with a MI less than 65 are considered difficult to maintain”
imom mi history

80

A IMOM 1.0

A IMOM 2.0

70

60

DIFFICULT TO MAINTAIN

50

F IMOM 4.0

40

F IMOM 4.4

Maintanability

F IMOM 5.0

30

C IMOM 1.0

20

C IMOM 2.0

10

0

Ada IMOM

Functionality

FORTRAN IMOM

C IMOM

IMOM MI HISTORY
  • FORTRAN MI was low due to poor adaptability of original design to meet changing requirements
  • C MI was low due to the fact that the C code was originally generated from the FORTRAN code
  • Ada MI was high, which resulted in a very maintainable system
celsiustech
CelsiusTech
  • CelsiusTech, Swedish defense contractor (corvette class)
    • On the verge of bankrupcy in 1988; switched to Ada
    • $350M profit in 1992; key to profitability is reuse
    • POC Ulf Olsson
  • Eleven real-time combat system applications delivered in Ada
    • VME-based shared memory compute nodes (non-UNIX)
    • Processing distributed over 20 nodes via Ethernet & TCP/IP
    • Designed to minimize network traffic; high frequency operations allocated within individual nodes
    • Ada tasks communicate asynchronously
  • Total code base: approximately 3M SLOC Ada
    • Ada required significant initial investment
    • Swedish & Danish ships shared only one interface; had 65% reuse
    • Ported 500K+ SLOC from 68000 to RS/6000; changed 0.6% of code
reuse
REUSE
  • CelsiusTech approach: design for reuse from the beginning
  • Built an architecture for shipboard use
    • Delivered to 10 customers
  • Extended to ground-based intercept system
  • Reuse level depends on number of common interfaces

Source: CelsiusTech Sweden

rational ada system
RATIONAL Ada SYSTEM
  • Comparison of C and Ada at Rational Software Corporation
    • “Comparing Development Costs of C and Ada”, Rational Software Corporation, March 1995
    • POC Stephen F. Zeigler, Ph.D.
  • Productivity data on Verdix Ada Development System* (VADS) product line from March 1986 through June 1994
    • Products include compilers, builders, runtimes, and debug tools written in a combination of Ada and C
    • Includes data for development and maintenance activities
    • Automated data collection
  • Product line originally written entirely in C, achieved “approximate” language parity in 1991
    • 1.51M SLOC in C (as of October 1994)
    • 1.27M SLOC in Ada (as of October 1994)

*Verdix merged with Rational Corp. in 1994

rational cont
RATIONAL (cont.)
  • Same developers worked on Ada and C
    • Same design methods used regardless of language
    • Low personnel turnover (5%) throughout life of project
  • Used DOD rule to decide what to rewrite
    • Anything new written in Ada
    • Anything changed by more than 1/3 rewritten in Ada
  • Exercised more careful control of C code during development
    • Avoided C’s higher optimization levels
    • Avoided complex data structuring of nested unions and structures
  • Equivalent degrees of difficulty for VADS components
    • Code generator still written in C
    • Runtime, optimizer, cross linker, library services, and support tools were rewritten in Ada
rational results
RATIONAL RESULTS

Verdix Ada System Other Projects

Metric C Ada Factor C++ Ada Factor

Source

KSLOC

Fixes per

KSLOC

Fixes per

“feature”

Defects *

per KSLOC

Cost per

SLOC

1509 1273 883 589

9.21 4.59 2.0

0.52 0.25 2.0

.676 .096 7.0(!) .978 .222 4.4

$10.52 $6.62 1.7

* Defects: customer-reported problems

dr zeigler s comments
Dr. ZEIGLER’S COMMENTS
  • Ada “reduces the effective complexity of the overall developer’s job”
    • “encourages better program design”
    • “encourages its users to spend more time in writing to describe their code”
  • Ada provides “better tool support” (i.e., language features)
    • Particularly in the area of parallel processing (i.e., tasking)
  • Ada provides “better locality of errors”
    • Local in time and space
outline62
OUTLINE
  • Introduction
  • Cost Factors
  • Language Studies
  • Project Examples
  • Findings
sources63
George Washington University

State Univ. of New York

University of Michigan

AT&T Bell Atlantic

Barry Boehm (COCOMO)

Capers Jones

Celsius Tech, Sweden

Computer Sciences Corp.

CTA Inc. / Reifer Consultants

Lockheed Martin Corp.

Loral Air Traffic Control

MITRE / LMC PRICE-S model

OC Systems

Rational Corp.

Thompson, France

TRW

ACM

Ada Information Clearinghouse

DISA

Idaho National Eng. Lab

IEEE

Institute for Defense Analyses

NASA/GSFG

Naval Postgraduate School

NSWCDD Cost Group

NSWCDD LSE CPCRs

Software Engineering Institute

SPAWAR

USAF Business Case Study

USAF IMOM

USAF STSC

SOURCES
compiler tools cost
COMPILER/TOOLS COST

Staff Number Purify Rational Apex SGI C++/GNAT

Size Licenses Tool C++ * Ada C++ * Ada

50 33 $77K $290K $574K $162K $85K

100 67 155K 561K 1104K 314K 159K

150 100 232K 825K 1672K 456K 224K

200 133 310K 1098K 2224K 585K 275K

250 167 387K 1333K 2776K 702K 315K

* Includes Purify tool

findings
FINDINGS
  • Commercial viability of Ada
    • C/C++ will continue to occupy a large market share
    • Numerous and increasing non-DOD use suggests Ada longevity
    • Ada 95 GNAT freeware compiler likely to increase Ada use
    • Java impact unknown but may enhance Ada 95 use
  • Standardization and portability
    • Ada 83, Ada 95 and C are standards; C++ is not
  • Programmer training
    • C/C++ programmers widely available but without real-time training
    • Ada not difficult to learn, may be easier to learn for real-time apps.
    • Increasing number of universities teaching Ada, esp. as foundation
  • Development cost
    • Some Ada initial development costs may be higher than C
findings cont

Absent extenuating factors, use of C/C++ cannot be substantiated

FINDINGS (cont.)
  • Lifecycle maintenance and upgrade cost
    • Ada has long term advantage due to increased maintainability
    • Ada follow-ons and upgrades less costly due to ease of reuse
  • Process and tools
    • Ada 83 compilers are expensive; Ada 95 GNAT is low cost or free
    • Lack of C/C++ reliability features suggests additional tool support
    • Cost of maintaining two language environments does not double (programmers likely to specialize in one language or the other)
  • Reliability and safety
    • Ada error rate and cost-to-fix are lower than C and C++
  • Based on available lifecycle cost data . . .
important factors
IMPORTANT FACTORS
  • Programming in the large
      • Translates to reduced lifecycle cost
  • Reliability and safety
  • Real-time and multitasking
comparison

Ada

C++

Ada

C++

Feature

Feature (cont.)

Abstraction level

Inheritance

Compiler checking

Low level operations

Compiler validation

Library consistency

Concurrency

Polymorphism

Determinism

Readability

Distribution

Real-time support

Encapsulation

Run time checks

Error handling

Standardization

full support

partial support

little or no support

COMPARISON
definitions
Abstraction level: distance from assembly language features

Compiler checking: type checks

Compiler validation: formal testing of compiler vs test case

Concurrency: semantic support for multi-threaded processing

Determinism: guarantees of timing, ordering, no priority inv.

Distribution: support for multi-computer platforms

Encapsulation: ability to hide implementation detail from user

Error handling: formal support for detecting & handling errors

Inheritance: composition from previous types and operations

Low-level operations: bit, byte, address & register operations

Library consistency: compiler detection of obsolete code units

Polymorphism: same operation on multiple entities, e.g., data types

Readability: clarity of written code

Real-time: type time, scheduling, priorities, synchronization

Run-time checks: out-of-range, type compatibility checks at dispatch time

Standardization: formal process of acceptance

DEFINITIONS
sun comparison

Java SmallTalk TCL Perl Shells C C++

Simple

Object Orient.

Robust

Secure

Interpreted

Dynamic

Portable

Neutral

Threads

Garbage Col.

Exceptions

Performance

High Medium Low Medium Low High High

SUN COMPARISON
  • Source: “The Java Language Environment, A white Paper,” James Gosling and Henry McGilton, October 1995, Sun Microsystems
  • Key:
      • Feature exists
      • Somewhat exists
      • Doesn’t exist
expert comments
EXPERT COMMENTS
  • Jean Ichbiah - inventor of Ada

“C was designed to be written; Ada was designed to be read”

  • Herbert Schildt - ANSI C++ Standards Committee

“C gives the programmer what the programmer wants; few

restrictions, few complaints . . . C++ maintains the original spirit of C,

that the programmer not the language is in charge.”

  • P.G. Plauger - ANSI C Committee

“Beyond 100,000 lines of code, you should probably be coding in Ada.”

  • Sextant - French aerospace contractor

“Lack of experience in Ada causes poor code performance;

lack of experience in C produces code errors.”

  • CelsiusTech - Swedish defense contractor

“We no longer need worry about getting more efficient at producing

software because that’s not where our cost is.”

computing cornerstones
COMPUTING CORNERSTONES
  • Capacity
    • Sufficient computing resources to perform required tasks
  • Connectivity
    • Sufficient communication bandwidth and latency among system components
  • Control
    • Bounded, deterministic management of time, computational sequence and reaction to external events
  • Continuous Availability
    • Continuously available despite failures and damage
  • Correctness
    • Free from errors that impact mission
  • Efficacy of Design
    • Lifecycle cost effectiveness, including low cost of ownership and ease of change
  • In commercial practice, user does final QA
  • Military systems must be “ready for war.”
correctness cornerstone
Bjarne Stroustrup, inventor of C++

“C makes it easy to shoot yourself in the foot. C++ makes that harder but when you do, it blows away your whole leg.”

James Gosling - Inventor of Java

Some languages, such as Ada, “fit well and are pretty straightforward” ports of the Java virutal machine. Sun will not attempt to run C and C++ code on the virtual machine, however, because it is more difficult to ensure the reliability and, therefore, the security of downloaded code.

Reference Manual for the Ada Programming Language, ANSI/MIL-STD-1815A-1983

“Ada was designed with three overriding concerns: program reliability and maintenance, programming as a human activity, and efficiency.”

“. . . emphasis was placed on program readability over ease of writing.”

“. . . error-prone notations have been avoided.”

“. . . compilers can ensure that operations on variables are compatible with the properties intended for objects of the type.”

CORRECTNESS CORNERSTONE
slide74

Name: Gary Shupe

Date submitted: 8/15/97

Requested delivery date: ASAP

Presentation title: Formerly known as “Master’s brief”

Presented by:

Presentation date: for web

Presented to:

Acetates: B/W Color

Paper:

# of originals B/W Color

# of copies B/W Color

Stapled  

Single-sided/no script  

Single-sided/script  

Double-sided  

Double-sided/script  

Presentation Request Cover Sheet

Clear Through Public Affairs

Special Instructions:

4/97

This is the reworked Masters brief, with script (Carl, John and Don Rosen did script.) The script is called “mmscript.doc.”

8/22/97

Derived from Ada_cos3.ppt - PA cleared with notes to make amendments to remove all Policy mentions (slides 1, 3, 6, 7, 21, 22, 23, 25, 32, 38, 44, 46, 64, 68 changed; slides 4 and 10 removed.)

script is mm970822.doc

Both .ppt and .doc will be put on web.

74 mm970822.ppt