Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HAL/S
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Programming language}} [[File:HAL_S.png|thumb|right|Logo]] '''HAL/S''' (''High-order Assembly Language/Shuttle'')<ref>{{cite web|title=STS Software|url=http://science.ksc.nasa.gov/shuttle/technology/sts-newsref/sts-av.html#sts-dps-software|work=NSTS 1988 News Reference Manual|publisher=NASA|accessdate=2011-03-30|archive-date=2012-02-20|archive-url=https://web.archive.org/web/20120220215516/http://science.ksc.nasa.gov/shuttle/technology/sts-newsref/sts-av.html#sts-dps-software|url-status=dead}}</ref><ref>{{Cite book|url=https://www.nap.edu/read/2222/chapter/5|title=Read "An Assessment of Space Shuttle Flight Software Development Processes" at NAP.edu|year=1993|doi=10.17226/2222|hdl=2060/19930019745|isbn=978-0-309-04880-4|language=en}}</ref> is a [[real-time computing|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).<ref>{{Cite web|url=https://archive.org/details/NASA_NTRS_Archive_19810022530|title=Current Status of the HAL/S Compiler|last=Lytle|first=P.J.|date=1981|website=Archive.org|access-date=}}</ref> It was designed by [[Intermetrics]] in 1972 for [[NASA]] and delivered in 1973. HAL/S is written in [[XPL]], a dialect of [[PL/I]].<ref>{{Cite web|url=https://www.cs.toronto.edu/XPL/hal.html|title=The Development of Hal/S|last=|first=|date=|website=Department of Computer Science, University of Toronto|access-date=}}</ref> 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]].<ref name="hal-s-specification-nov2005">{{Cite web|url = http://klabs.org/richcontent/software_content/hal_s/hal-s_language_specification.pdf|title = HAL/S Language Specification|date = November 2005|access-date = 2016-11-16|url-status = dead|archive-url = https://web.archive.org/web/20090226213557/http://klabs.org/richcontent/software_content/hal_s/hal-s_language_specification.pdf|archive-date = 2009-02-26}}</ref> ==Goals and principles== The three key principles in designing the language were reliability, efficiency, and [[Software portability|machine-independence]]. The language is designed to allow aerospace-related tasks (such as [[vector (geometry)|vector]]/[[matrix (mathematics)|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 [[computer bug|error]]s. For instance, there is no support for dynamic memory allocation. The language provides special support for [[real-time computing|real-time]] execution environments. Some features, such as "[[GOTO]]" were provided chiefly to ease mechanical translations from other languages.<ref name="hal-s-specification-nov2005"/> (page 82) <ref>{{Cite web|url = https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19790006637.pdf|title = Programming in HAL/S|date = 1979|access-date = 2016-02-14|website = |publisher = Source: NASA Technical Reports Server|last = Ryer|first = Michael J.}}</ref> "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,<ref name="hal-s-specification-nov2005" /> it says, {{bquote|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)|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|Modcomp]] IV/Classic computers. Target computer systems have included [[IBM 360|IBM 360/370]], [[IBM System/4 Pi|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 (spacecraft)|Galileo Project]]), and since 1978 the [[RCA 1802|RCA CDP1802 COSMAC]] microprocessor (Galileo Project and others).<ref name=Lytle-1981>{{Cite web|url=https://archive.org/details/NASA_NTRS_Archive_19810022530|title=Current Status of the HAL/S Compiler |last=Lytle|first=P.J. |date=1981|website=|access-date=}}</ref> ==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 (computer programming)|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 <math>x = a^2 + b_i^2</math> could be written in single-line format as: X = A ** 2 + B$(I) ** 2 [[Exponentiation]] is denoted by two [[asterisk]]s, as in PL/I and [[Fortran]]. The subscript <math>i</math> is denoted by a [[dollar sign]], with the subscript expression enclosed in [[parenthesis|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.<ref>{{cite book |last1=Ryer |first1=Michael |title=Programming in HAL/S |date=September 1978 |publisher=NASA |page=2β1 |url=http://www.bitsavers.org/pdf/intermetrics/programming_in_hal-s.pdf}}</ref> Every program begins with a labeled <code>PROGRAM</code> statement; the label consists of an identifier followed by a colon. All variables must be declared in the <code>DECLARE</code> group, which precedes any executable statements. Every program ends with a <code>CLOSE</code> delimiting statement. <pre> 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; </pre> ==Data types== HAL/S has native support for [[integer]]s, [[floating point]] [[Variable (computing)|scalars]], [[vector (mathematics and physics)|vector]], [[matrix (mathematics)|matrices]], [[boolean data type|boolean]]s and [[string (computer science)|string]]s of 8-bit characters, limited to a maximum length of 255. Structured types may be composed using a <code>DECLARE STRUCT</code> statement. ==See also== * [[Fortress (programming language)|Fortress]], a programming language with advanced syntactic support for mathematical expressions *[[IBM AP-101]], the space shuttle avionics computer ==References== {{Reflist|30em}} ==External links== *[http://klabs.org/DEI/Processor/shuttle/ NASA Office of Logic Design: Space Shuttle Computers and Avionics] **Includes [https://web.archive.org/web/20090226213557/http://klabs.org/richcontent/software_content/hal_s/hal-s_language_specification.pdf language] and [https://web.archive.org/web/20080512082825/http://www.klabs.org/richcontent/software_content/hal_s/hal-s_compiler_system_specification.pdf compiler] specifications, [https://web.archive.org/web/20080512083402/http://www.klabs.org/richcontent/software_content/hal_s/hal-s_programmers_guide.pdf programmer's guide], and [https://web.archive.org/web/20080512081848/http://www.klabs.org/richcontent/software_content/hal_s/hal-s-fc_users_manual.pdf user manual]. *[http://www.hq.nasa.gov/office/pao/History/computers/Appendix-II.html ''Computers in Spaceflight: The NASA Experience''] {{Webarchive|url=https://web.archive.org/web/20070504190403/http://www.hq.nasa.gov/office/pao/History/computers/Appendix-II.html |date=2007-05-04 }} – By George Tomayko (Appendix II: "HAL/S, A Real-Time Language for Spaceflight") {{DEFAULTSORT:Hal S}} [[Category:Spacecraft components]] [[Category:Avionics programming languages]] [[Category:High Integrity Programming Language]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Bquote
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Webarchive
(
edit
)