HAL/S

Last updated
Logo HAL S.png
Logo

HAL/S (High-order Assembly Language/Shuttle) [1] [2] is a real-time aerospace programming language compiler and cross-compiler for avionics applications used by NASA and associated agencies (JPL, etc.). It has been used in many U.S. space projects since 1973 and its most significant use was in the Space Shuttle program (approximately 85% of the Shuttle software was coded in HAL/S). [3] It was designed by Intermetrics in 1972 for NASA and delivered in 1973. HAL/S is written in XPL, a dialect of PL/I. [4] Although HAL/S is designed primarily for programming on-board computers, it is general enough to meet nearly all the needs in the production, verification, and support of aerospace and other real-time applications. According to documentation from 2005, it was being maintained by the HAL/S project of United Space Alliance. [5]

Contents

Goals and principles

The three key principles in designing the language were reliability, efficiency, and machine-independence. The language is designed to allow aerospace-related tasks (such as vector/matrix arithmetic) to be accomplished in a way that is easily understandable by people who have spaceflight knowledge, but may not necessarily have proficiency with computer programming.

HAL/S was designed not to include some constructs that were thought to be the cause of errors. For instance, there is no support for dynamic memory allocation. The language provides special support for real-time execution environments.

Some features, such as "GOTO" were provided chiefly to ease mechanical translations from other languages. [5] (page 82) [6]

"HAL" was suggested as the name of the new language by Ed Copps, a founding director of Intermetrics, to honor Hal Laning, a colleague at MIT. On the Preface page of the HAL/S Language Specification, [5] it says,

fundamental contributions to the concept and implementation of MAC were made by Dr. J. Halcombe Laning of the Draper Laboratory.

A proposal for a NASA standard ground-based version of HAL named HAL/G for "ground" was proposed, but the coming emergence of the soon to be named Ada programming language contributed to Intermetrics' lack of interest in continuing this work. Instead, Intermetrics would place emphasis on what would be the "Red" finalist which would not be selected.

Host compiler systems have been implemented on an IBM 360/370, Data General Eclipse, and the Modcomp IV/Classic computers. Target computer systems have included IBM 360/370, IBM AP-101 (space shuttle avionics computer), Sperry 1819A/1819B, Data General Nova and Eclipse, CII Mitra 125, Modcomp II and IV, NASA Std. Spacecraft Computer-l and Computer-2, ITEK ATAC 16M (Galileo Project), and since 1978 the RCA CDP1802 COSMAC microprocessor (Galileo Project and others). [7]

Syntax

HAL/S is a mostly free-form language: statements may begin anywhere on a line and may spill over the next lines, and multiple statements may be fitted onto the same line if required. However, non-space characters in the first column of a program line may have special significance. For instance, the letter 'C' in the first column indicates that the whole line is a comment and should be ignored by the compiler.

One particularly interesting feature of HAL/S is that it supports, in addition to a normal single line text format, an optional three-line input format in which three source code lines are used for each statement. In this format, the first and third lines are usable for superscripts (exponents) and subscripts (indices). The multi-line format was designed to permit writing of HAL/S code that is similar to mathematical notation.

As an example, the statement could be written in single-line format as:

X = A ** 2 + B$(I) ** 2 

Exponentiation is denoted by two asterisks, as in PL/I and Fortran. The subscript is denoted by a dollar sign, with the subscript expression enclosed in parentheses. The same code fragment could be written in multiple-line format as:

E       2     2 M  X = A  + B S            I 

In the example, the base line of the statement is indicated by an 'M' in the first column, the exponent line is indicated by an 'E', and the subscript line is indicated by an 'S'.

Example

The following is a simple HAL/S program. [8] Every program begins with a labeled PROGRAM statement; the label consists of an identifier followed by a colon. All variables must be declared in the DECLARE group, which precedes any executable statements. Every program ends with a CLOSE delimiting statement.

   SIMPLE: PROGRAM; C  CODE IN THIS TYPEFACE IS C  HAL/S SOURCE    DECLARE PI CONSTANT (3.14159266);    DECLARE R SCALAR;    READ(5) R;    WRITE(6) PI R**2;    CLOSE SIMPLE; 

Data types

HAL/S has native support for integers, floating point scalars, vector, matrices, booleans and strings of 8-bit characters, limited to a maximum length of 255. Structured types may be composed using a DECLARE STRUCT statement.

See also

Related Research Articles

<span class="mw-page-title-main">Ada (programming language)</span> High-level programming language first released in 1980

Ada is a structured, statically typed, imperative, and object-oriented high-level programming language, inspired by Pascal and other languages. It has built-in language support for design by contract (DbC), extremely strong typing, explicit concurrency, tasks, synchronous message passing, protected objects, and non-determinism. Ada improves code safety and maintainability by using the compiler to find errors in favor of runtime errors. Ada is an international technical standard, jointly defined by the International Organization for Standardization (ISO), and the International Electrotechnical Commission (IEC). As of May 2023, the standard, called Ada 2022 informally, is ISO/IEC 8652:2023.

<span class="mw-page-title-main">ALGOL</span> Family of programming languages

ALGOL is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the Association for Computing Machinery (ACM) in textbooks and academic sources for more than thirty years.

In computing, a compiler is a computer program that translates computer code written in one programming language into another language. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a low-level programming language to create an executable program.

<span class="mw-page-title-main">COBOL</span> Programming language with English-like syntax

COBOL is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily used in business, finance, and administrative systems for companies and governments. COBOL is still widely used in applications deployed on mainframe computers, such as large-scale batch and transaction processing jobs. Many large financial institutions were developing new systems in the language as late as 2006, but most programming in COBOL today is purely to maintain existing applications. Programs are being moved to new platforms, rewritten in modern languages or replaced with other software.

<span class="mw-page-title-main">Fortran</span> General-purpose programming language

Fortran is a third generation, compiled, imperative programming language that is especially suited to numeric computation and scientific computing.

PL/I is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has been in continuous use by academic, commercial and industrial organizations since it was introduced in the 1960s.

MAD is a programming language and compiler for the IBM 704 and later the IBM 709, IBM 7090, IBM 7040, UNIVAC 1107, UNIVAC 1108, Philco 210-211, and eventually IBM System/370 mainframe computers. Developed in 1959 at the University of Michigan by Bernard Galler, Bruce Arden and Robert M. Graham, MAD is a variant of the ALGOL language. It was widely used to teach programming at colleges and universities during the 1960s and played a minor role in the development of Compatible Time-Sharing System (CTSS), Multics, and the Michigan Terminal System computer operating systems. The original version of the chatbot ELIZA was written in MAD-SLIP.

Abbreviated Test Language for All Systems (ATLAS) is a specialized programming language for use with automatic test equipment (ATE). It is a compiled high-level computer language and can be used on any computer whose supporting software can translate it into the appropriate low-level instructions.

In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, most commonly to design ASICs and program FPGAs.

MIL-STD-1750A or 1750A is the formal definition of a 16-bit computer instruction set architecture (ISA), including both required and optional components, as described by the military standard document MIL-STD-1750A (1980). Since August 1996, it has been inactive for new designs.

A guidance system is a virtual or physical device, or a group of devices implementing a controlling the movement of a ship, aircraft, missile, rocket, satellite, or any other moving object. Guidance is the process of calculating the changes in position, velocity, altitude, and/or rotation rates of a moving object required to follow a certain trajectory and/or altitude profile based on information about the object's state of motion.

RPG is a high-level programming language for business applications, introduced in 1959 for the IBM 1401. It is most well known as the primary programming language of IBM's midrange computer product line, including the IBM i operating system. RPG has traditionally featured a number of distinctive concepts, such as the program cycle, and the column-oriented syntax. The most recent version is RPG IV, which includes a number of modernization features, including free-form syntax.

ALGOL 60 is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a key advance in the rise of structured programming. ALGOL 60 was one of the first languages implementing function definitions. ALGOL 60 function definitions could be nested within one another, with lexical scope. It gave rise to many other languages, including CPL, PL/I, Simula, BCPL, B, Pascal, and C. Practically every computer of the era had a systems programming language based on ALGOL 60 concepts.

<span class="mw-page-title-main">IBM System/4 Pi</span> Family of avionics computers

The IBM System/4 Pi is a family of avionics computers used, in various versions, on the F-15 Eagle fighter, E-3 Sentry AWACS, Harpoon Missile, NASA's Skylab, MOL, and the Space Shuttle, as well as other aircraft. Development began in 1965, deliveries in 1967.

XPL, for expert's programming language is a programming language based on PL/I, a portable one-pass compiler written in its own language, and a parser generator tool for easily implementing similar compilers for other languages. XPL was designed in 1967 as a way to teach compiler design principles and as starting point for students to build compilers for their own languages.

AverStar was a software company founded in Cambridge, Massachusetts in 1969 by several veterans of M.I.T.'s Instrumentation Laboratory who had worked on the software for NASA's Apollo Program including the Apollo Guidance Computer.

<span class="mw-page-title-main">Space Shuttle design process</span> Development program of the NASA Space Shuttle

Before the Apollo 11 Moon landing in 1969, NASA began studies of Space Shuttle designs as early as October 1968. The early studies were denoted "Phase A", and in June 1970, "Phase B", which were more detailed and specific. The primary intended use of the Space Shuttle was supporting the future space station, ferrying a minimum crew of four and about 20,000 pounds (9,100 kg) of cargo, and being able to be rapidly turned around for future flights.

In computer programming, a function, subprogram, procedure, method, routine or subroutine is a callable unit that has a well-defined behavior and can be invoked by other software units to exhibit that behavior.

<span class="mw-page-title-main">Jack Clemons</span>

Jack Clemons is an aerospace engineer and air and space industry professional. He was a lead engineer on NASA's Apollo and Space Shuttle Programs, and later an aerospace company executive. He appeared as himself in the "Command Module" episode of the 2008 Discovery Science Channel six-part documentary Moon Machines. He also appeared as himself in the 2019 National Geographic Channel documentary Apollo: Back To The Moon. Following retirement from the aerospace industry, Clemons was a consultant and a professional writer as well as a speaker and presenter on NASA's space programs.

<span class="mw-page-title-main">Josephine Jue</span> Chinese-American mathematician and programmer

Josephine Jue is a Chinese-American computer programmer and mathematician who is best known for being the first Asian-American woman working in NASA, where she worked for 37 years. Jue is a founding member of the Chinese Baptist church of Houston, Texas.

References

  1. "STS Software". NSTS 1988 News Reference Manual. NASA. Retrieved 2011-03-30.
  2. Read "An Assessment of Space Shuttle Flight Software Development Processes" at NAP.edu. 1993. doi:10.17226/2222. hdl:2060/19930019745. ISBN   978-0-309-04880-4.
  3. Lytle, P.J. (1981). "Current Status of the HAL/S Compiler". Archive.org.
  4. "The Development of Hal/S". Department of Computer Science, University of Toronto.
  5. 1 2 3 "HAL/S Language Specification" (PDF). November 2005. Archived from the original (PDF) on 2009-02-26. Retrieved 2016-11-16.
  6. Ryer, Michael J. (1979). "Programming in HAL/S" (PDF). Source: NASA Technical Reports Server. Retrieved 2016-02-14.
  7. Lytle, P.J. (1981). "Current Status of the HAL/S Compiler".
  8. Ryer, Michael (September 1978). Programming in HAL/S (PDF). NASA. p. 2-1.