Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Languages and Lifecycle Cost

Similar presentations


Presentation on theme: "Programming Languages and Lifecycle Cost"— Presentation transcript:

1 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

2 PURPOSE Provide Quantitative Information on Lifecycle Cost Implications of Programming Language Use (Ada* vs C/C++) * Includes Ada 83 and Ada 95

3 OUTLINE Introduction Cost Factors Language Studies Project Examples
Findings

4 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

5 SOURCES Information Sources Commercial Examples Study conducted by:
Currie Colket (SPAWAR 332) Les Dupaix (STSC/Hill AFB) Michael Schrank (MITRE Corp.) AEGIS Community (Various) NASA, IEEE, ACM, etc. Commercial Examples Dr. John McCormick (SUNY) Kurt Welker (USAF) Ulf Olsson (CelsiusTech) Dr. Stephen Zeigler (Rational) Study conducted by: Michael Masters (NSWCDD) James Readan (NSWCDD) J. Hoppel (CSC/KGO) W. Wright (CSC/KGO)

6 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

7 SOFTWARE GROWTH Program Size (KSLOC) Year 10000 100 1000 10 1 1960 95
90 85 80 75 70 65 GEMINI 3 GEMINI 12 APOLLO 7 APOLLO 17 SKYLAB 2 MISSION CONTROL: GROUND STATION MERCURY 3 F-111 P-3A AWACS B-1A B-1B SHUTTLE/OFT SHUTTLE/OPERATIONAL F-15E B-2 GEMINI 2 APOLLO 11 S-3A MANNED SYSTEMS C-5A F-15 F-16 C/D A-7D/E PERSHING 1 TITAN E-2C TITAN 34D (IUS) PERSHING 11(ED) VIKING C-17 PROJECTED GALILEO PERSHING 11(AD) MISSILE TRIDENT C4 VOYAGER TITAN IIIC PERSHING 1A POSEIDON C3 SURVEYOR MARINER VENUS MERCURY UNMANNED UNMANNED INTERPLANETARY MANNED A/C MANNED SPACE MANNED SPACE CONTROL UNMANNED SYSTEMS ATF Program Size (KSLOC) Year Source: USAF Software Technology Support Center

8

9 OUTLINE Introduction Cost Factors Language Studies Project Examples
Findings

10 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

11 DOD WEAPON SYSTEMS 3GL (g.p.) M SLOC Generation M SLOC Ada 83 49.70
FORTRAN CMS-2Y/M Jovial C Pascal PL/ Other 3GLs TOTAL Generation M SLOC First Second Third (gen.purp.) Third (special) Fourth Fifth TOTAL Source: Institute for Defense Analyses survey, P-3054, Jan 95

12 NON-DOD Ada EXAMPLES Non-DOD Government Use Commercial 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)

13 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 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 , -400, -500, -600, -700, -800 Boeing 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.

14 LANGUAGE USE “What are your top three development tools?”
Percentage of Tool Companies using PowerBuilder 44 Visual BASIC 42 COBOL 40 C Access (DBMS) 18 Oracle (DBMS) 14 Borland Delphi Source: Forrester Research Inc. survey responses from 50 Fortune 1000 companies Changing Language Use Percent Change Language from 1993 to 1994 C / C FORTRAN 49 Visual BASIC 60 COBOL Smalltalk 200 Source: Dataquest survey of Microsoft Windows application programmers, Communications Week, Aug 1995 Source: IEEE Computer, March 1996

15 FOUNDATION LANGUAGES WORLDWIDE USA
Scheme Scheme Others 12% C++ Others 11% 12% 10% 6% C++ 8% Pascal Ada Modula C C++ Scheme Others C C 11% 9% Modula 5% Modula 8% Ada Pascal 36% Ada Pascal 40% 16% 17% Source: University of Michigan Computer Science Dept. survey

16 Number of institutions teaching Ada as a Computer Science 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 Source: George Washington University EE & CS Dept. survey

17 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

18 Ada VIABILITY Ada market appears stable or increasing
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 Ada market appears stable or increasing

19 OUTLINE Introduction Cost Factors Language Studies Project Examples
Findings

20 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

21 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 TRW detailed 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

22 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

23 OUTLINE Introduction Cost Factors Language Studies Project Examples
Productivity Program Integration Reliability & Maintenance Project Examples Findings

24 DOMAIN PRODUCTIVITY Avionic/ Sonar Command & Control Data Processing
Productivity (SLOC/MM) Avionic/ Sonar Command & Control Data Processing Environ. Comm. AI 100 200 300 400 500 600 Ada All Lanugages (including Ada) Source: USAF Software Technology Support Center Based on over 100M SLOC of military and commerical software

25 DOMAIN COST $ / S O L C Avionic/Sonar Cmd & Control Data Processing
Environment Telecomm. 20 40 60 80 100 120 140 160 180 200 Ada All Lanugages (including Ada) Source: USAF Software Technology Support Center Based on over 100M SLOC of military and commerical software

26 PRODUCTIVITY S L O C / H o u r Historical Ada (First Ship) Ada & Reuse
Source: “Ada vs C++: A Business Case Analysis,” CTA Substudy, July 1991 SLOC / MM 50 100 150 200 250 Standard (all lang.) Ada Long Term First Ada Project 2 4 6 8 10 12 S L O C / H o u r 118% Improvement 627% Historical Ada (First Ship) Ada & Reuse Source: CelsiusTech, Sweden

27 NASA Ada REUSE % Reused Source: NASA/Goddard Space Flight Center, Oct 91

28 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) Program Size (KSLOC) Productivity (SLOC/SM) * 50 100 150 200 250 300 350 400 2 8 32 128

29 PRODUCTIVITY IMPROVEMENT
Ada productivity compared to other HOLs Source: USAF Software Technology Support Center Based on over 100M SLOC of military and commerical software

30 OUTLINE Introduction Cost Factors Language Studies Project Examples
Productivity Program Integration Reliability & Maintenance Project Examples Findings

31 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 Requirements Definition Software Design Coding Testing Deployment

32 DEVELOPMENT PHASES Percnet of Total Effort (%)
Design Code & Debug Test 5 10 15 20 25 30 35 40 45 50 Non-Ada Ada Source: NASA/Goddard Space Flight Center,

33 DEVELOPMENT PHASES Percent of Total Effort (%)
Source: USAF STSC European survey Percent of Total Effort (%)

34 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 Analysis, Design, Code Integration 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% Historical Ada (First Ship) Source: CelsiusTech, Sweden

35 CSC EXPERIENCE Program Lang. SLOC Design Code U/T I&T
AEGIS CMS-2Y M* ADM Ada 75K Australian Sub Ada 100K JCALS Ada 400K ENWGS Ada 511K AN/BSY-2 Ada 700K IPS Ada 718K JCALS C 7K TGC C 43K E-CALS C 91K Note: design, code, unit test, and integration & test values are percent of total effort * Baselines 1 through J2.2,

36 OUTLINE Introduction Cost Factors Language Studies Project Examples
Productivity Program Integration Reliability & Maintenance Project Examples Findings

37 RELIABILITY Error Rates 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” Integration Formal Qual. Test 5 10 15 20 25 30 35 Standard (all lang.) Average Ada Source: USAF study - “Ada vs C++: A Business Case Analysis,” CTA Substudy, July 1991 Error Rates Errors / KSLOC

38 AIRBUS BRAKES Source: Thompson, France Data with-held Number of Errors

39 Percent Advantage for Ada
MAINTENANCE 72 LOC 87 LOC 350 LOC 550 LOC 870 LOC 10,000 LOC 100,000 1,000,000 10% Change 30% Change -10 -5 5 10 15 20 25 30 35 40 Percent Advantage for Ada in Cost to Make Change Maintenance cost advantage of Ada over other languages Source: “Ada Technology: Current Status and Cost Impact,” IEEE Vol. 79 No. 1

40 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

41 ANNUAL MAINTENANCE 1994 dollars X $1000 Airborne avionics software
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 Source: MITRE Study, Schrank, Boyce & Davis, 1995 Function Points

42 OUTLINE Introduction Cost Factors Language Studies Project Examples
Findings

43 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)

44 PERCEIVED FAILURES SYSTEM ASSESSMENT
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.

45 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”

46 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

47 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

48 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

49 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

50 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

51 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

52 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

53 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

54 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”

55 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 Functionality Ada IMOM FORTRAN IMOM C IMOM 10 20 30 40 50 60 70 80 Maintanability A IMOM 2.0 A IMOM 1.0 F IMOM 4.0 F IMOM 4.4 C IMOM 1.0 C IMOM 2.0 F IMOM 5.0 DIFFICULT TO MAINTAIN

56 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 to RS/6000; changed 0.6% of code

57 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

58 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

59 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

60 RATIONAL RESULTS Verdix Ada System Other Projects
Metric C Ada Factor C Ada Factor Source KSLOC Fixes per “feature” Defects * per KSLOC Cost per SLOC (!) $ $ * Defects: customer-reported problems

61 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

62 OUTLINE Introduction Cost Factors Language Studies Project Examples
Findings

63 SOURCES 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

64 COMPILER/TOOLS COST Staff Number Purify Rational Apex SGI C++/GNAT
Size Licenses Tool C++ * Ada C++ * Ada $77K $290K $574K $162K $85K K K K K K K K K K K K K K K K K K K K K * Includes Purify tool

65 FINDINGS Commercial viability of Ada Standardization and portability
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

66 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 . . . Absent extenuating factors, use of C/C++ cannot be substantiated

67 Programming in the large
IMPORTANT FACTORS Programming in the large Translates to reduced lifecycle cost Reliability and safety Real-time and multitasking

68 COMPARISON Feature Ada C++ Feature (cont.) Ada C++ 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

69 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

70 SUN COMPARISON Java SmallTalk TCL Perl Shells C C++ High Medium Low Medium Low High High Simple Object Orient. Robust Secure Interpreted Dynamic Portable Neutral Threads Garbage Col. Exceptions Performance 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

71 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.”

72 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.”

73 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.”

74 Presentation Request Cover Sheet
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   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 mm doc Both .ppt and .doc will be put on web. 74 mm ppt


Download ppt "Programming Languages and Lifecycle Cost"

Similar presentations


Ads by Google