4. LANGUAGE USAGE FINDINGS 4.1 Weapon System Findings Finding 1: Most weapon system software is being written and maintained in (general and special purpose) third generation languages. More than 150 million SLOC (i.e., 81%) of the weapon system software surveyed is written in third generation languages. Without historical data similar to Figure 6, trends such as the changing emphasis on particular language generations cannot be adequately identified. However, it is very likely that over the past 20 years there has been a gradual decline in the use of machine and assembly languages and a corresponding increase in third generation languages. Table 3 on page 20 provides a numerical presentation of the same data as Figure 6. Table 4 lists the estimated total surveyed SLOC for each third generation language. The Total SLOC Reported column in Table 3 and Table 4 has been rounded to the nearest million. Table 3. Total SLOC by Language Generation for Weapon System Responses Language Generation Total SLOC Reported (in millions) ------------------- ------------------- First 3.90 Second 26.30 Third: General Purpose 148.38 Special Purpose 3.70 Fourth 5.00 Fifth 0.29 Table 4. Total SLOC by General Purpose 3GL for Weapon System Responses Third Generation Total SLOC Reported Language and Version (in millions) -------------------- ------------------- Ada 83 49.70 C 89 32.50 Fortran pre-91/92 18.55 CMS-2 Y 14.32 Jovial 73 12.68 C++ 5.15 CMS-2 M 4.23 Other 3GLs 3.38 Pascal pre-90 3.62 Jovial pre-J73 1.12 Fortran 91/92 1.00 PL/I 87/93 subset 0.64 Basic 87/93 (full) 0.48 PL/I 76/87/93 0.36 Pascal 90 (extended) 0.29 Basic 78 (minimal) 0.17 LISP 0.10 Cobol pre-85 0.09 Cobol 85 0.00 ==================== ====== Total 148.38 The following special purpose third generation languages were also reported (Table 5). Table 5. Third Generation Special Purpose Languages Language Purpose SLOC ATLAS Equipment Checkout 1.38 VHDL Hardware Description 0.18 CDL Hardware Description 0.22 GPSS Simulation 0.04 Simulink Simulation 0.06 CSSL Simulation 0.01 ADSIM Simulation 0.02 SPL/1 Signal Processing 1.62 SPL Space Programming 0.01 Respondents were provided space on the data collection form to identify any programming languages being used that were not already listed. These languages formed the "Other 3GLs" noted in Table 4 on page 20, and included the languages listed in Table 5 and Table 6. Table 6. Third Generation "Other" Languages Language DTC LISA Language for Systolic Array Processor PIL HARM Program Implementation Language PLM PLM-51 PLM-86 Pspice REXX HOL TACL TSC VTL Finding 2: Ada is the leading third generation language in terms of existing weapon system source lines of code. Figure 7 presents the top five third generation languages in terms of estimated total SLOC surveyed. Survey responses reported an estimated 49+ million SLOC in Ada and 32+ million SLOC in C. These five languages represent about 84% of the total estimated third generation SLOC reported. Finding 3: Ada is the leading third generation language in terms of number of weapon system responses indicating usage. Figure 8 presents the top five third generation languages in terms of the number of responses reporting specific language use. As can be seen, 143 responses indicated the use of Ada and 122 responses indicated the use of C. In comparing Figure 7 and Figure 8, the key difference is the more frequent reported use of C++, albeit with fewer total estimated surveyed SLOC. Note that the data presented in Figure 7 do not represent a uniform population (i.e., survey responses address varying levels of abstraction). See Section 2.6 for details. Finding 4: Two-thirds of the weapon system responses reported on application systems of 500,000 or less SLOC. Figure 9 presents the distribution of responses in terms of the Total SLOC range selected on the response form. The large number of 1-499+K responses is due, in part, to responses at the subsystem level. Finding 5: Over 70% of the weapon system responses indicated the use of more than one programming language from all five generations. Figure 10 presents the distribution of responses in terms of the number of languages reported on a response form (single subsystem or system). Finding 6: Multiple versions of third generation languages are being used in weapon systems. The goal of the 1970s, language commonality within the weapon system community, has not been reached yet even for military standards such as Jovial and CMS-2 (Figure 11). In addition, at least two versions are being used for most Federal Information Processing Standards (FIPS). Different versions of a language are almost always incompatible. Dialects of a version present subtle but not inconsequential porting problems, particularly when they are dialects based upon older versions of the language. For example, there are 10 or more different dialects of pre-J73 Jovial still in use. 4.2 AIS Findings Finding 7: Most AIS software is being written and maintained in third generation languages. Figure 12 is the SLOC distribution of all generations of languages used in AIS application. Table 7 is the numeric presentation of Figure 12. The use of first generation language (machine language) is limited to only one of the AISs. The use of assembly (including proprietary macro languages) is inconsequential when compared to weapon system applications. Table 7. Total SLOC by Language Generation for AISs Language Generation Total SLOC Reported (in millions) First 0.30 Second 0.63 Third General Purpose 38.24 Special Purpose 0.00 Fourth 10.81 Fifth 0.05 Table 8 is the SLOC estimates in millions for third generation languages. Table 8. Total SLOC by 3GL for AISs Third Generation Total SLOC Reported Language / Version (in millions) Cobol 85 14.06 Cobol pre-85 8.59 Ada 83 8.47 Basic 87/93 2.18 C++ 2.05 C 89 1.55 Fortran 91/92 0.87 Fortran pre-91/92 0.47 ================= ===== Total 38.24 Finding 8: Cobol is the leading third generation language in terms of existing AIS source lines of code. Figure 13 presents the top five third generation languages in terms of estimated total SLOC reported. Survey responses reported an estimated 22 million SLOC in two versions of Cobol and about 8 million SLOC in Ada. These five languages represent about 89% of the total estimated third generation SLOC reported. Finding 9: Ada is the leading third generation language in terms of number of AIS responses indicating usage. Figure 14 shows that the use of Ada was reported by more respondents, although the number of lines of source code written in Ada is less than for Cobol. Finding 10: Most of the AIS responses reported on application systems are in the range of 100K-5,000K SLOC. Figure 15 depicts that 85% of the responses are evenly distributed in the mid-size range of applications. Finding 11: Ninety percent of the AISs surveyed indicated the use of one or more third generation programming languages. The first column in Figure 16 showing no use of third generation languages indicates that some applications are developed only with fourth generation languages. Fourth generation languages for such applications as database query, report writing, and screens are not applicable to weapon system applications except in the support activities required to construct or maintain applications. Finding 12: Multiple versions of third generation languages are being used in AISs. Figure 17 indicates that Cobol 85, the current FIPS version, has not had a significant effect on AIS applications, and that older versions of Fortran exceed the number of applications written in the current version. Total SLOC Total SLOC (in millions) Third Generation Languages No. of Major AIS Responses No. of 3GLs Reported Total SLOC No. of Major AIS Responses No. of Major AIS Responses Figure 6. Total SLOC by Language Generation for Weapon System Responses 3GLs with Multiple Versions No. of Major AISs No. of Languages Reported No. of Weapon Responses Figure 10. Distribution of Number of Languages Reported by Weapon System Responses Figure 13. Top Five 3GLs by Total SLOC for AIS Responses Figure 15. Distribution of Total SLOC Size for AIS Responses Figure 17. Comparison of 3GLs with Multiple Versions for AIS Responses Figure 14. Top Five 3GLs Reported by AIS Responses Figure 16. Distribution of Number of 3GLs Reported by AIS Responses Figure 9. Distribution of Total SLOC Size for Weapon System Responses Language Generation General Purpose Third Generation Languages No. of Weapon Responses Figure 11. Comparison of 3GLs with Multiple Versions for Weapon System Responses Figure 12. Total SLOC by Language Generation for AIS Responses Figure 7. Top Five 3GLs by Total SLOC for Weapon System Responses Total SLOC (in millions) No. Weapon System Responses Figure 8. Top Five 3GLs by Reported Usage for Weapon System Responses Third Generation Languages Total SLOC (in millions) Total SLOC 3GLs with Multiple Versions No. of Weapon Responses Language Generation Total SLOC (in millions)