Aerospace, Programming Languages, and Information Technology Co-Development: Space Shuttle Software as Engineering Landmark
Filed under: history, technology, aerospace
This eighth article of the twelve-part series covers the Space Shuttle primary avionics software system hereafter PASS as the first large-scale demonstration that safety-critical software could be built to airline-comparable reliability targets. The Shuttle software, developed at International Business Machines Corporation hereafter IBM Federal Systems Division under contract to National Aeronautics and Space Administration hereafter NASA between 1974 and the early 1980s and maintained through the program’s operational life to 2011, established the specific engineering practices that the subsequent aerospace software tradition adopted as standard. HAL/S, the purpose-built aerospace programming language in which PASS was written, and the IBM Federal Systems Division software process, later formalized as the origin of what became the Capability Maturity Model, together supplied the specific engineering vocabulary that the discipline used for the following four decades.
The Space Shuttle software effort followed and drew on the Apollo Guidance Computer software effort treated in A242. Where the AGC software was written in assembly for a purpose-built 16-bit machine at approximately 36,000 lines of Colossus and 32,000 lines of Luminary, the Shuttle software was written in a high-level language for a general-purpose avionics computer at approximately 400,000 lines of HAL/S. The order-of-magnitude increase in software size crossed the specific threshold at which the Apollo assembly-language approach became infeasible and required the specific engineering discipline that the Shuttle program developed. The specific reliability record that the Shuttle software achieved, with no software-caused loss of vehicle across 135 missions between STS-1 in April 1981 and STS-135 in July 2011, established the specific empirical proposition that safety-critical software at this scale can be built to reliability targets comparable with commercial aviation.
Shuttle Avionics Architecture
The Space Shuttle used a fault-tolerant avionics architecture with five general-purpose computers per orbiter, described comprehensively in the primary treatment by Hanaway and Moorehead 1989 as NASA Special Publication 504. Four of the five computers ran identical copies of PASS and voted on their outputs at each computational cycle. The fifth ran the Backup Flight System hereafter BFS, a separately developed program running dissimilar software developed by Rockwell International, the airframe contractor, on independently written code intended to protect against common-mode software errors in PASS. The specific redundancy-management technique used by the Shuttle computers is documented in the primary IBM Systems Journal paper by Sklaroff 1976. The five-computer redundant architecture, treated at the reliability-analysis level in the framing article A237, gave the Shuttle avionics fault tolerance against single computer hardware failures and against certain classes of common-mode software failures. The reliability of the four-computer PASS voting group under majority rule and independent-failure assumption is
\[R_{\text{PASS vote}} = \sum_{i=3}^{4} \binom{4}{i} R^i (1 - R)^{4-i} = 4R^3 - 3R^4\]which for per-machine hardware reliability $R = 0.99$ per mission gives group reliability of approximately 0.9994, or roughly two additional nines beyond a single machine. The specific value of the BFS as a fifth dissimilar-software element was to defend against the residual common-mode software failure fraction that voting cannot detect.
The computers were IBM AP-101 general-purpose machines, initially the AP-101B variant with 32-bit words, approximately 424,000 words of magnetic-core memory, and instruction rates of approximately 420,000 instructions per second, later upgraded through the AP-101S variant with substantially larger memory and faster execution as the Shuttle program’s software requirements grew. The AP-101 was originally developed for military avionics applications and represented substantially more computing capability than the Apollo Guidance Computer described in A242. Comparing the two directly
\[\frac{r_{\text{AP-101}}}{r_{\text{AGC}}} \approx \frac{420{,}000}{85{,}000} \approx 5\]understates the practical capability difference because the AP-101 also had substantially larger word width, larger memory, floating-point hardware, and a mature software development toolchain, while the AGC required assembly programming with a specialized interpretive layer for vector and matrix operations.
The five computers communicated with each other and with the Shuttle’s sensors and actuators through a serial data bus called the Multiplexer-Demultiplexer Data Bus. The bus operated at approximately one megabit per second with time-division multiple access among the connected units. Sensor data flowed from the vehicle instruments to the computers, computed commands flowed from the computers to the actuators, and inter-computer synchronization messages coordinated the four-way vote among the PASS computers. The specific engineering discipline of bus scheduling, bus fault detection, and bus recovery formed a substantial part of the Shuttle avionics engineering practice.
The Primary Avionics Software System
PASS was developed by IBM Federal Systems Division at Owego, New York, under contract to NASA and to Rockwell International as the prime Shuttle contractor. The initial development period was approximately 1974 through 1980, culminating in the software delivery for the first orbital test flight STS-1 in April 1981. Peak development team size was approximately 250 engineers, and total development effort through the initial delivery was approximately 22,000 person-months, per the account in Madden and Rone 1984 previously cited in A237. Effective per-engineer productivity across the multi-year development satisfied approximately
\[\bar{p}_{\text{PASS}} \approx \frac{L_{\text{initial}}}{E_{\text{total}}} \approx \frac{4 \times 10^{5} \text{ lines}}{2.2 \times 10^{4} \text{ person-months}} \approx 18 \text{ lines per person-month}\]or roughly 220 lines per person-year, one to two orders of magnitude below the informal productivity of small commercial programs of the same era but consistent with the productivity figures for SAGE cited in A240 and reflective of the specific coordination-cost scaling from the Brooks law introduced in A237. Subsequent development through the operational life of the program added functionality for successive Shuttle missions and adapted to hardware upgrades and mission profile changes.
PASS occupied the four voting computers on each orbiter and provided the primary functional software for essentially all mission phases including launch, ascent guidance, on-orbit operations, deorbit, atmospheric entry, and landing. The specific mission-phase software modules called Operational Programs each contained approximately 100,000 to 200,000 lines of HAL/S, with only one Operational Program active at a time and the others loaded from mass storage as the mission progressed. This overlay approach was necessary because the AP-101 memory could not hold the complete mission software simultaneously, and the memory-management engineering to load and initialize an Operational Program without disrupting the flight-critical computation was itself a substantial engineering artifact.
The total PASS software base grew from approximately 400,000 source lines of HAL/S at STS-1 to approximately 500,000 to 600,000 source lines by the end of the operational program. This growth over approximately three decades of active development is consistent with the Lehman software-size growth law introduced in the framing article, at approximately
\[L(t) = L_0 \cdot 2^{(t - t_0) / T_L}\]with doubling time $T_L$ of order 40 to 50 years for the PASS software specifically, substantially slower than the 6 to 8 year doubling time typical of major aerospace programs, reflecting the specific engineering discipline that Shuttle software adopted against uncontrolled growth.
The Backup Flight System
The BFS was developed by Rockwell International separately from PASS with the specific requirement of protecting against common-mode software failures in PASS. The Rockwell team was organizationally isolated from the IBM PASS team, and the two teams were prohibited from sharing detailed design information. Both teams received the same NASA-supplied requirements specifications but implemented them independently. The BFS was substantially smaller than PASS, at approximately 90,000 lines of HAL/S, providing only the specific functionality required to complete an atmospheric entry and landing in the event of PASS failure. The BFS was silent during normal operation, monitoring the PASS output through the data bus without producing commands. If the crew engaged the BFS manually through a cockpit switch, the BFS took control and the PASS computers were disabled.
The STS-1 first launch experienced a notable software incident involving the BFS synchronization with the PASS computers. During the pre-launch sequence, the BFS was unable to synchronize its data-bus timing with the four PASS computers due to a timing race condition that occurred once per 67 initialization attempts, corresponding to a per-attempt failure probability of
\[P_{\text{sync fail}} \approx \frac{1}{67} \approx 1.5 \text{ percent}\]which is at the specific level where ground testing runs of order 10 to 100 attempts would encounter the failure only rarely by chance, and the specific 20 to 30 initialization tests that had been performed during pre-launch verification indeed had not encountered it. The launch was scrubbed on 10 April 1981 when the synchronization failure occurred, and the specific timing race was diagnosed and patched over the following two days. STS-1 launched successfully on 12 April 1981. The specific first-hand account of the incident from the NASA guidance officer involved is Garman 1981 “The Bug Heard ‘Round the World,” a widely cited primary source in the aerospace software literature on race conditions and testing coverage.
The BFS design remained controversial within the aerospace software community throughout the Shuttle program. The specific argument for dissimilar redundant software was that common-mode failures in PASS would be caught by the differently implemented BFS. The counterargument, drawing on the Knight and Leveson 1986 empirical result cited in the framing article, was that independently developed software versions exhibit statistically correlated failures at rates substantially higher than the independence assumption predicts, undermining the theoretical protection that dissimilar redundancy is supposed to provide. The Shuttle experience did not conclusively resolve this argument in either direction, but the specific decision by NASA and Rockwell to retain the BFS throughout the program indicated their operational judgment that the incremental protection justified the incremental cost.
The HAL/S Programming Language
HAL/S was developed by Intermetrics under contract to NASA specifically for the Shuttle software program. The language design began in 1972 and the compiler was operational by 1974 in time for PASS development. The primary design paper is Newkirk 1971 presenting HAL/S as a higher-order programming language for real-time aerospace applications. HAL/S was based on PL/I in its general syntax but added several specific features for aerospace applications including compile-time verification of array bounds, single-precision and double-precision floating-point primitives with explicit conversion, vector and matrix primitives as first-class types, real-time constructs for periodic tasks and interrupts, and a range of restrictions on constructs that the language designers considered dangerous for safety-critical use including recursion, dynamic memory allocation, and unstructured control flow. The specific design intent was to make the compiler enforce the coding standards that the Apollo team had enforced by manual review, reducing the reviewer burden and providing statically checked correctness properties.
HAL/S source was compiled to AP-101 machine code by a compiler that ran on IBM 360 mainframes at the IBM Federal Systems Division facility and later at NASA Johnson Space Center. Compilation cycle times of hours were typical for complete rebuilds of PASS, and the specific software configuration management practices for HAL/S source, compiled objects, and load-image files became a substantial engineering discipline in their own right. The HAL/S language was not adopted outside the Shuttle program. Subsequent aerospace software programs generally used Ada, C, or C++ rather than HAL/S because the specific NASA-Intermetrics implementation was not commercially available and because the Ada language treated in a later article of this series absorbed many of the specific safety features that had motivated HAL/S.
The load-bearing engineering property of HAL/S was that the compiler enforced the coding standards. Coding standards enforcement at compile time is substantially more reliable than coding standards enforcement by human review because the compiler applies the check to every line of every source file at every compilation, without fatigue and without variability. The specific class of errors that HAL/S made impossible at compile time included several categories that had caused problems in the Apollo assembly-language software, and the reduction in this class of errors was one of the specific factors that permitted the Shuttle software to scale to ten times the Apollo software size at comparable defect density.
The IBM Federal Systems Division Software Process
The IBM Federal Systems Division software process for PASS became one of the most-studied examples of large-scale safety-critical software engineering. The process is described technically in the Sperling and Weinstock 1985 paper, in the primary IBM Owego account by Kolkhorst and Macina 1988, and in the retrospective in Fishman 1996 published in Fast Company magazine, which supplied the specific defect-density figures that the aerospace software community subsequently cited for two decades.
The PASS defect density in delivered software was reported at approximately 0.11 defects per thousand lines of code for the initial STS-1 delivery and improved to approximately 0.004 defects per thousand lines of code for later releases, per the Fishman 1996 figures. Compared with commercial software of the same period at typical defect densities of 1 to 10 defects per thousand lines, the PASS software achieved defect densities two to four orders of magnitude lower. The improvement over time from 0.11 to 0.004 defects per thousand lines followed approximately
\[D(t) = D_0 \cdot e^{-t / T_D}\]with time constant $T_D$ of order 3 to 5 years, reflecting the specific process improvements that the IBM team introduced iteratively over the operational life of the program.
The specific process elements that produced these defect-density results included several practices later formalized as the origin of what became the Capability Maturity Model, whose intellectual foundation is documented in Humphrey 1988 in IEEE Software as the characterizing paper on software process maturity. Formal design and code inspection following the specific procedure documented in Fagan 1976 at IBM Systems Journal caught approximately 60 percent of defects before they reached testing. If $D_{\text{introduced}}$ defects are introduced during design and coding, the residual defect count reaching testing under inspection efficiency $f_{\text{inspection}}$ is
\[D_{\text{to test}} = D_{\text{introduced}} \cdot (1 - f_{\text{inspection}})\]which for $f_{\text{inspection}} = 0.6$ reduces the testing load by 60 percent and, combined with the escalating cost of defect fix at successively later development phases per the approximate exponential
\[C_{\text{fix}}(\text{phase}) \approx C_0 \cdot r^{n}\]with cost multiplier $r$ of approximately 3 to 10 per phase and $n$ the phase-count offset from design, produces the specific engineering-economics argument for inspection that IBM used to justify the inspection cost. Configuration management tracked every change at the level of individual instructions. Formal specification of requirements and detailed design preceded implementation, with formal signoff between phases. Post-release defect analysis fed back into process improvement, with each defect traced to the specific process step that permitted its introduction and the process step revised to prevent recurrence.
Reliability Record and Verification Cost
The operational Shuttle software achieved a specific reliability record across 135 missions between STS-1 in April 1981 and STS-135 in July 2011. Zero software-caused loss of vehicle occurred during the operational program. Zero software-caused loss of crew occurred. Aggregated across the average mission duration of approximately 200 hours, the operational record supplies an empirical Shuttle-software mean-time-between-catastrophic-failure lower bound of
\[T_{\text{PASS, MTBF}} \gtrsim N_{\text{missions}} \cdot T_{\text{per mission}} \approx 135 \cdot 200 \approx 27{,}000 \text{ mission-hours}\]with the true value bounded below only by the observed zero catastrophic failures rather than characterized by them, analogous to the AGC empirical MTBF treatment in A242. The two Shuttle losses that did occur, Challenger on 28 January 1986 during STS-51-L and Columbia on 1 February 2003 during STS-107, were caused by non-software factors including cold-weather effects on the solid rocket booster O-rings for Challenger and impact damage to the reinforced carbon-carbon leading edge for Columbia. Both losses were extensively investigated and neither implicated the Shuttle software. The specific operational reliability record for Shuttle software is one of the load-bearing empirical anchors in the aerospace software literature for the proposition that safety-critical software at this scale can be built to reliability targets comparable with commercial aviation.
The specific verification cost that produced this reliability was substantial. Total software development cost for the Shuttle program is variously estimated at approximately 500 million to 1 billion United States dollars in 1980s currency, or approximately 1 to 2 billion in current dollars. Divided across the approximately 400,000 lines of initial delivery, the per-line cost approaches
\[C_{\text{per-line, PASS}} \approx \frac{5 \times 10^{8}}{4 \times 10^{5}} \approx 1{,}250 \text{ United States dollars per line}\]on the low end of the cost estimate and approximately 2,500 dollars per line on the high end. The Boehm 1981 verification-effort scaling law introduced in the framing article with exponent $\gamma$ approximately 1.2 for safety-critical software gives verification cost as a specific fraction of total cost that consumed approximately 40 to 60 percent of the total development effort. These figures established the specific cost proposition that safety-critical software at this scale is expensive to produce but is nonetheless commercially viable given adequate mission value.
Framework Application to Space Shuttle Software
The six-axis framework introduced in A237 applies to Shuttle software with axis weightings reflecting the specific character of the largest aerospace safety-critical software program of the 1980s and the reference point against which subsequent programs including the Boeing 777 flight-control system and the F-35 Lightning II mission systems were later benchmarked.
The first axis is numerical computation demand. Shuttle software computed guidance solutions, control laws, sensor fusion, and displays at rates matching the flight-dynamics timescale. Total operation counts per mission were of order $10^{13}$ operations, roughly three orders of magnitude larger than the AGC’s per-mission count treated in A242, reflecting both the AP-101’s higher instruction rate and the longer mission durations of the Shuttle era.
The second axis is real-time control. Shuttle software closed guidance and control loops at rates matching the specific flight-dynamics requirements of each mission phase, with control-loop rates typically 25 Hertz and guidance-loop rates typically 5 Hertz. The synchronous four-computer voting architecture imposed additional real-time constraints on inter-computer synchronization that were substantially tighter than the individual loop rates.
The third axis is reliability and verification. Shuttle software established the specific reliability standards that the subsequent safety-critical software tradition treated as the benchmark. The 0.004 defects per thousand lines figure for late-program releases remains a widely cited empirical anchor in the software engineering literature, though achieving it required verification investment substantially higher than commercial software programs sustain.
The fourth axis is networking and distribution. The Shuttle data bus at one megabit per second was a substantial distributed real-time system, though small by comparison with the ground-based networks treated in A243. The specific engineering discipline of avionics data bus design, including deterministic scheduling and cross-computer synchronization, drew on and contributed to the broader real-time computing tradition treated in A241.
The fifth axis is software engineering as a discipline. The IBM Federal Systems Division software process became one of the most-studied examples of industrial software engineering discipline. The specific practices formalized later as the Capability Maturity Model, and the specific measurement of defect density, verification cost, and process-improvement effectiveness that IBM tracked across the Shuttle program, supplied the specific empirical basis on which the subsequent large-scale software engineering discipline developed.
The sixth axis is semiconductor economics and dual-use. The AP-101 series was a general-purpose military avionics computer whose Shuttle use extended and refined the manufacturing base without originating it. The specific dual-use pattern that characterized the earlier Apollo program was less pronounced in the Shuttle era because the underlying computing capability had already been established for other applications.
Conclusion
The Space Shuttle software was the first large-scale demonstration that safety-critical software could be built to airline-comparable reliability targets. The 400,000-line PASS software written in HAL/S at the IBM Federal Systems Division achieved defect densities two to four orders of magnitude below commercial software of the same period, and the operational program of 135 missions produced no software-caused loss of vehicle or crew across three decades of operation. The specific engineering practices that produced this record established the vocabulary that the subsequent safety-critical software tradition adopted as standard, including formal design and code inspection, phase-based development with formal signoff, systematic configuration management, and post-release defect analysis feeding back into process improvement. HAL/S as the purpose-built aerospace programming language for the Shuttle program illustrated the specific value of compiler-enforced coding standards, though HAL/S itself was not adopted beyond the Shuttle program because subsequent aerospace software adopted Ada and later C and C++ for the specific ecosystem-support and portability reasons that dictated commercial language selection.
The next article in the series treats safety-critical software as an engineering discipline in its own right, including industry consensus standards, formal verification adoption, model-based development, and the ongoing tension between waterfall and iterative processes in aerospace contexts.
References
Books
Reference
Related Posts
- A237 Framing and the Co-Development Mechanism
- A240 Early Cold War Air Defense and SAGE
- A241 Aerospace Simulation and Real-Time Systems
- A242 The Apollo Guidance Computer
- A243 ARPANET and Networking Origins