ALTRAN


ALTRAN is a programming language for the formal manipulation of rational functions of several variables with integer coefficients. It was developed at Bell Labs in 1960s. ALTRAN is a FORTRAN version of ALPAK rational algebra package, and "can be thought of as a variant of FORTRAN with the addition of an extra declaration, the 'algebraic' type declaration."
Although ALTRAN is written in ANSI FORTRAN, nevertheless there exist differences in FORTRAN implementations. ALTRAN handles machine dependencies through the use of a macro processor called M6.
ALTRAN should not be confused with the ALGOL to FORTRAN Translator, called Altran, that "converts Extended Algol programs into Fortran IV."

History

ALPAK, written in 1964, originally consisted of a set of subroutines for FORTRAN written in assembly language. These subroutines were themselves rewritten in FORTRAN for ALTRAN.
An early version of ALTRAN was developed by M. Douglas McIlroy and W. Stanley Brown in the middle 1960s. However, soon after the completion of their ALTRAN translator, the IBM 7094 computers, on which ALPAK and ALTRAN were reliant, began to be phased out in favor of newer machines. This led to development of a more advanced ALTRAN language and implementation developed by Brown, Andrew D. Hall, Stephen C. Johnson, Dennis M. Ritchie, and Stuart I. Feldman, which was highly portable. The translator was implemented by Ritchie, the interpreter by Hall, the run-time rational function and polynomial routines by Feldman, Hall, and Johnson, and the I/O routines by Johnson.
Later, Feldman and Julia Ho added a rational expression evaluation package that generated accurate and efficient FORTRAN subroutines for the numerical evaluation of symbolic expressions produced by ALTRAN.
In 1979, ALTRAN was ported to the Control Data Corporation 6600 and Cyber 176 computers at the Air Force Weapons Laboratory. They found that "ALTRAN is about 15 times faster than FORMAC in a PL/I environment, and it is at least 12 times faster than REDUCE." It was also observed that ALTRAN was able to quickly solve problems which neither FORMAC nor REDUCE could handle on the given hardware or in reasonable time.

Sample program


PROCEDURE MAIN # SIMPLE EXAMPLE OF USE OF FTNOUT
LONG ALGEBRAIC F
ALTRAN FTNOUT
OPTS # FTNOUT REQUIRES A LINE LENGTH OF 72
F = EXPAND
WRITE F # PRINT F
WRITE " FUNCTION F"
"C EXAMPLE PROG WRITTEN WITH FTNOUT.",
F,
" RETURN"™, " END"
  1. WE HAVE WRITTEN A SIMPLE PROGRAM ON UNIT 25, NOW WE INVOKE FTNOUT TO
  2. THIS ALTRAN OUTPUT TO LEGAL FORTRAN.
FTNOUT
END

Operations