ArticleslgStudy

science

HAL/S

HAL/S is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HAL/S rather than just read about it. In short: HAL/S (High-order Assembly Language/Shuttle) 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).

HAL/S — main illustration
HAL/S — illustration

Key takeaways

  • HAL/S belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HAL/S to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HAL/S from memory before moving on to harder problems.

Reference excerpt

HAL/S (High-order Assembly Language/Shuttle) 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). It was designed by Intermetrics in 1972 for NASA and delivered in 1973. HAL/S is written in XPL, a dialect of PL/I. 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.

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. (page 82) "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, 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).

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 x = a 2 + b i 2 {\displaystyle x=a^{2}+b_{i}^{2}} 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 i {\displaystyle i} 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. 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 Fortress, a programming language with advanced syntactic support for mathematical expressions IBM AP-101, the space shuttle avionics computer

References

External links NASA Office of Logic Design: Space Shuttle Computers and Avionics Includes language and compiler specifications, programmer's guide, and user manual. Computers in Spaceflight: The NASA Experience Archived 2007-05-04 at the Wayback Machine – By George Tomayko (Appendix II: "HAL/S, A Real-Time Language for Spaceflight")

Illustrations

HAL/S: Logo
Logo

Worked examples

Example 1 — a first encounter with HAL/S

Start with the simplest possible case. Write down what HAL/S claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HAL/S before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HAL/S ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HAL/S

In research
HAL/S appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HAL/S in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HAL/S is common in secondary-school and first-year university syllabi. It links to neighbouring topics Avionics programming languages, High-integrity programming languages, Spacecraft components, so understanding it makes those chapters shorter.
In everyday life
Look for HAL/S outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HAL/S” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study HAL/S in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HAL/S means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HAL/S out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HAL/S in simple terms?

HAL/S (High-order Assembly Language/Shuttle) 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 Sh…

Why does HAL/S matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HAL/S?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HAL/S.

Tags

  • Avionics programming languages
  • High-integrity programming languages
  • Spacecraft components

Keep exploring