history and future of fortran

3
systems History and futureof FORTRAN Includinga look at plansfor the new standard by IAN D CHIVERS and MALCOLM W CLARK T he original team which deve- loped FORTRAN was led by John Backus and worked for IBM. The language was developed over a three-year period, from 1954 to 1957. It is informative to consider some of the technological background of that era and examine the effect that this had on the design of the language’. Abstract: FORTRAN is one of the most widely used programming languages in the scientific sector. This article examines FORTRAN and its history and gives some clues to the success of the language in the Light of more modern programming languages. The common thread, where any, is that of problem solving and programming using a computer system. Keywords: computer languages, programming, problem solving. Ian D Chivers and Malcolm W Clark are senior analysts and programmers at Imperial College Computer Centre, University of London. The past The 1940s saw the development and use of mechanical and electro-mecha- nical devices. One of the first electro- nic machines (ENIAC) used valves and was developed by Mauchly and Eckert of Pennsylvania University. The main drawback of ENIAC was that an essential part of the problem- solving process, and hence pro- gramming, was the ability to patch electric circuits. The next major breakthrough was the work of John von Neumann and the idea that the program could be stored inside the memory of the machine. Note that this is still a long way from the modern definition and understanding of what a program- ming language is. The first languages were, as one might have expected, assembly lan- guages. Programming was thus, an activity that demanded a significant knowledge of the machine on which the program was to run. It is impor- tant to realize that at this time compu- ter manufacturers did not supply collections of programs that could be used with the machine. When IBM released details of the 704 they had a meeting with their 701 users (all 20 of them) and discussed ways in which the users could help themselves in transferring programs from the 701 to the 704. Chomsky’s work on language and grammars was not published until 1956 and thus much of the work on grammars and programming lan- guages that one takes for granted today was not available for Backus and his team to draw on. The open literature at the time had no articles known to the Backus team on com- piler design, though other work on language design was of course being done, e.g. the work of Grace Murray Hopper at Remington Rand Univac. Enter FORTRAN It is against this background that IBM set up a research team, led by John Backus, to develop the world’s first high-level programming language. Some of the problems facing this group were organizational, e.g. the group had to develop techniques to break the problem down into manage- able parts. One of the group’s objectives was to produce a compiler that would gener- ate highly efficient code, a task in which it succeeded. In fact, in engi- neering terms the group surpassed itself in this area. In engineering it is not usual for an achievement to re- main the best in its field for more than three or four years. This first compiler remained the best optimizing com- piler for 20 years, and set the standard by which other optimizing compilers ~0127 no 1 january/february 1985 0011-684x/85/01003%03$03.00 0 1985 Butterworth & Co (Publishers) Ltd. 39

Upload: ian-d-chivers

Post on 25-Aug-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: History and future of FORTRAN

systems

History and future of FORTRAN Including a look at plans for the new standard

by IAN D CHIVERS and MALCOLM W CLARK

T he original team which deve- loped FORTRAN was led by John Backus and worked for IBM.

The language was developed over a three-year period, from 1954 to 1957. It is informative to consider some of the technological background of that era and examine the effect that this had on the design of the language’.

Abstract: FORTRAN is one of the most widely used programming languages in the scientific sector. This article examines FORTRAN and its history and gives some clues to the success of the language in the Light of more modern programming languages. The common thread, where any, is that of problem solving and programming using a computer system.

Keywords: computer languages, programming, problem solving.

Ian D Chivers and Malcolm W Clark are senior analysts and programmers at Imperial College Computer Centre, University of London.

The past

The 1940s saw the development and use of mechanical and electro-mecha- nical devices. One of the first electro- nic machines (ENIAC) used valves and was developed by Mauchly and Eckert of Pennsylvania University. The main drawback of ENIAC was that an essential part of the problem- solving process, and hence pro- gramming, was the ability to patch electric circuits.

The next major breakthrough was the work of John von Neumann and the idea that the program could be stored inside the memory of the machine. Note that this is still a long way from the modern definition and understanding of what a program- ming language is.

The first languages were, as one might have expected, assembly lan- guages. Programming was thus, an activity that demanded a significant knowledge of the machine on which the program was to run. It is impor- tant to realize that at this time compu- ter manufacturers did not supply collections of programs that could be used with the machine. When IBM released details of the 704 they had a meeting with their 701 users (all 20 of them) and discussed ways in which the users could help themselves in transferring programs from the 701 to the 704.

Chomsky’s work on language and grammars was not published until 1956 and thus much of the work on grammars and programming lan- guages that one takes for granted today was not available for Backus and his team to draw on. The open literature at the time had no articles known to the Backus team on com- piler design, though other work on language design was of course being done, e.g. the work of Grace Murray Hopper at Remington Rand Univac.

Enter FORTRAN

It is against this background that IBM set up a research team, led by John Backus, to develop the world’s first high-level programming language. Some of the problems facing this group were organizational, e.g. the group had to develop techniques to break the problem down into manage- able parts.

One of the group’s objectives was to produce a compiler that would gener- ate highly efficient code, a task in which it succeeded. In fact, in engi- neering terms the group surpassed itself in this area. In engineering it is not usual for an achievement to re- main the best in its field for more than three or four years. This first compiler remained the best optimizing com- piler for 20 years, and set the standard by which other optimizing compilers

~0127 no 1 january/february 1985 0011-684x/85/01003%03$03.00 0 1985 Butterworth & Co (Publishers) Ltd. 39

Page 2: History and future of FORTRAN

are often judged. Thus, at a very early stage, efficiency of code became a criterion by which FORTRAN compi- lers were judged.

FORTRAN was developed over a three-year period and took 18 years to develop. Other versions of FORTRAN were developed and FORTRAN II was released by IBM in 1958. This version introduced the idea of separate com- pilation. FORTRAN IV followed in 1961, and represented a significant improvement over FORTRAN III. The majority of the development work up to 1960 was restricted to IBM machines, and 1960 saw some of the first non IBM implementations, e.g. CDC and Seymour Cray’s effort.

FORTRAN established the feasib~ity of using high-level languages in prob- lem-solving. Early users included Westinghouse-Bettis for nuclear power reactor development, the Law- rence Livermore National Laboratory for the solution of large-scale scientific problems, and the New York Univer- sity Atomic Energy Commission.

McCracken wrote the first FOR-

TRAN book which was published in 1961. By then considerably different problems faced FORTRAN users. The language was no longer restricted to a small number of users - and large numbers of people were being taught FORTRAN. This made significantly different demands on the compiler. The typical job was short, was com- piled many times and only ran once. This had a significant impact on the development of FORTRAN in certain institutions. Load and go compilers were being developed, and run time debugging help was starting to be provided. One of the most widely accepted compilers in this area was the University of Waterloos’s WAT- FOR compiler. This compiler, re- leased in 1966, was based partly on the FORGO (Wisconsin) and PUFFT (Purdue) compilers.

By 1966 a standard for FORTRAN had been developed which did a lot to elevate the status of programming languages. After 1966, FORTRAN be-

40

came a widely available and widely used programing language. Large amounts of software were becoming available in FORTRAN and could be transported from one machine to another. Thus, a significant user base started to develop.

The next major development in FORTRAN was the 1977 standard. Wider developments in the three areas of timesharing, operating sys- tems and software engineering did not have a significant impact on this standard. This meant that many fea- tures of FORTRAN were retained be- yond their life. By now BASIC had been developed by Kemeny and Kurtz at Dartmouth and was chal- lenging FORTRAN in ease of teaching in a timesharing environment, and PASCAL was seen by a growing num- ber of users as a viable alternative in certain areas of scientific program- ming. It is interesting that FORTRAN managed to survive so well in the late 1970s and 1980s.

The present

FORTRAN is still widely used today. Some of the reasons for this are:

A large amount of software already exists, and there are problems in converting to a more modern lan- guage. There is widespread availability of standard conforming compilers. Essentials can be taught fairly quickly to beginners, an aspect which should not be underesti- mated. Many people involved in programming view it as a second- ary activity. They are primarily interested in solving problems in their own discipline. A language comprises its definition and its implementation. The suc- cess of a programming language often owes more to the quality of the implementation than the defini- tion, i.e. a more modern language will suffer by comparison with an older language solely because it has

not had the necessary investment in time and effort that is required to produce a professionally imple- mented product.

This problem is especially acute with 8 and 16 bit micros and is compounded by where the real cost of the software is difficult and sometimes impossible to recover. How many people who read this article will at some time have taken a copy of a program they are interested in?

These are not all the reasons for FORTRAN'S success but just a few that are felt to be important.

Toolpak

Developments are also under way to produce a portable programmer’s en- vironment for FORTRAN. This is given the name Toolpak by its deve- lopers. Toolpak is a collaborative project between several American in- stitutions and the Numerical Algo- rithms Group (NAG). It seeks to improve the whole FORTRAN pro- gramming environment by providing a set of powerful tools which assist in the development and maintenance of software. From an historical point of view, it is possible to see this as the adoption of some of the notions of programming support environments, similar to those proposed for ADA and those touted by Alvey. Consideration of the details of Toolpak lie outside this article, but some idea can be obtained from Osterweil*.

The future

Since FORTRAN was first publicly released it has undergone many changes. There is already a draft standard for the next version of FORTRAN, called FORTRAN 8x. Many of the ideas in this version will rid FORTRAN of features that have be- devilled it, and should help it to gain wider acceptance in the computing fraternity. Other features will also

data processing

Page 3: History and future of FORTRAN

systems

help to extend its use in certain areas currently not easily tackled by FOR-

TRAN 77.

Some of the new features likely to be included are:

array operations improved facilities for numeric computation programmer-defined data types facilities for modular data and pro- cedure definitions the concept of deprecated features

Computation involving arrays has always been an extremely important part of engineering and scientific com- puting. Thus, operations on whole arrays and subarrays are included in the language and functions have been extended to process whole arrays. As a growing number of computer archi- tectures now support vector hard- ware, efficient implementations are made even easier.

One of the problems with portable programs has been the way in which precision is bound tightly to word size. The new standard proposes the ability to specify the degree of preci- sion.

The idea of derived data type is not new and this is one of ,the beauties of more modern programming languages like PASCAL. The benefits to be gained are enormous?, and derived

data types are essential in any general purpose programming language. Thus, FORTRAN 8x allows the pro- grammer to define :arbitrary data 1 ypes and operations on them. Proce- dure definitions can be used to define operations on these derived data types.

The nature of the module in the proposed standard is similar to that of the module in MODULA 2. Thus, it will become possible in FORTRAN to declare and make available data declarations, derived data types, pro- cedure declarations and procedure interface information. (Crude facilities already exist in some FORTRAN im- plementations to achieve limited ver-

~0127 no 1 januaryifebruary 1985

sions of this using a macro capability or some kind of include option to insert text into a subprogram etc. It is a significant and powerful replace- ment for the BLOCK DATA subpro- gram.

Deprecated features

The advent of the above features means that there will be much in FORTRAN that is no longer needed, but there will be much safer replace- ments. It is intended that these fea- tures will disappear with the next standard.

Complete upwards compatibility between FORTRAN 77 and FORTRAN

8x is planned. However, the newer (superior) features leave some of the older features inappropriate, inferior, redundant or even unnecessary. These will be nominated ‘deprecated’ features, and candidates for removal at subsequent standard revisions.

The new standard source form is column independent and blanks are significant. This will do away with what must be one of the most costly

programming mistakes yet. Consider the following two FORTRAN state-

ments:

DO 3 1=1.3 (an assignment DO3I= 1.3)

and DO 3 I= 1,3 (the beginning of a loop)

The first statement occurred in a program involved in a space mission to Venus. The second was the intend- ed statement. Both are syntactically correct in FORTRAN. Yet, this was a billion dollar mistake which owes much to the nature of FORTRAN,

where a blank is not significant. Can anyone imagine either taking all of the blanks out or randomly inserting blanks into a piece of text, and still being able to comprehend that text?

Other features of interest include:

l better control constructs

l recursion l event handling l dynamically allocatable arrays of

any size

Another significant concept is that of a core to the standard. The core does not contain any deprecated features. It is envisaged that modules will be used to extend the power of the language beyond the core, and pos- sible modules could be the ISA pro- cess control library, the Graphical Kernel System (GKS), and the Indus- trial Real Time FORTRAN library.

FORTRAN seems to be here to stay. Like any committee-driven pheno- menom, it is far from perfect but, messy though it is, it works and it works well. It genuinely represents a lingua franca for engineers and scien- tists. There will be problems when the compilers for the new standard are released and users will panic at this

apparently new language. However, upwards compatibility will allow at least 10 years to adapt slowly to the new standard before another change takes place - ample time for even the most recalcitrant. FORTRAN has a built-in obsolescence and inertia that precludes speedy response to fashion- able fads. Remember that the real user problems are in another disci- pline. Therefore a solid, and reliable, product is what is looked for - an old friend, with a few tricks and surprises up the sleeve yet.

References 1 Annals of the History of Computing,

Special Issue: FORTRAN'S Twenty Fifth Anniversary vol 6 (January 1984)

2 Osteweil, L J ‘Toolpak - An experimental software development environment research project’ IEEE Trans Software Engineering SE - 9pp 673-685 0

Imperial College Computer Centre, Mechanical Engineering Building, Exhibition Rd, London SW7 2BX.UK.

41