1977 , Volume , Issue July-1977
Total Page:16
File Type:pdf, Size:1020Kb
JIM 1977 HEWLE1TPACKARD JOURNAL \ m •: "ik, ;», > i © Copr. 1949-1998 Hewlett-Packard Co. Small Computer System Supports Large-Scale Multi-User APL Powerful, interactive APL is now available for the multi lingual HP 3000 Series II Computer System. A special terminal displays the APL character set. by Kenneth A. Van Bree APL (A PROGRAMMING LANGUAGE) is an compiler allows computation to be avoided in many interactive language that allows access to the full cases, and eliminates the need for many temporary power of a large computer while maintaining a user variables to store intermediate results. interface as friendly as a desktop calculator. APL One problem that has always plagued APL users is is based on a notation developed by Dr. Kenneth the limited size of most APL workspaces. A work Iverson1 of IBM Corporation over a decade ago, and space in APL is a named data area that contains all the has been growing in popularity in both the business data variables and functions that relate to a particular and scientific community. The popularity of APL stems from its powerful primitive operations and data structures , coupled with its ease of programming Cover: In the foreground, and debugging. Model 2641 A APL Display Most versions of APL to date have been on large and Station demonstrates its therefore expensive computers. Because of the ex role as the principal user pense involved in owning a computer large enough to interface for APL3000, an run APL, most of the use of APL outside of IBM has enhanced version of APL (A been through commercial timesharing companies. Programming Language) The introduction of APL 3000 marks the first time a that is now available on the large-machine APL has been available on a small HP 3000 Series II Computer computer. APL 3000 is a combination of software for System in the background. the HP 3000 Series II Computer System2 and a CRT terminal, the HP 2641A, that displays the special In this Issue: symbols used in APL. The terminal is described in the article beginning on page 25. Small Computer System Supports Although the HP 3000 is normally considered a Large-Scale Multi-User APL, by Ken small computer, APL \3000 is not a small version of neth A. Van Bree . page 2 the APL language (see page!4). As a matter of fact, APL 3000 has many features that have never been APL Data: Virtual Workspaces and available before, even on the large computers. For Shared Storage, by Grant J. Munsey page 6 example, although APL \3000 looks to the user just APLGOL: Structured Programming like an interpreter, it is actually a dynamic compiler. Facilities for APL, by Ronald L. Code is compiled for each statement as it is encoun Johnston page 11 tered; on subsequent executions of the statement, if APL3000 Summary page 14 the compiled code is valid, it is re-executed. By eliminating the interpretive overhead, a speedup on A Dynamic Incremental Compiler for the order of a factor of ten can be obtained in some an Interpretive Language, by Eric cases, although the speedup is dependent on the J. Van Dyke page 17 amount of computation involved in the statement. A Controller for the Dynamic Compiler, by The basic data type of APL is an array, which is an Kenneth A. Van Bree, page 21. ordered collection of numbers or characters. Sub Extended Control Functions for Interactive script calculus, as defined by Philip Abrams,3 is a Debugging, by Kenneth A. Van Bree, page 23. method of selecting portions of an array by man CRT Terminal Provides both APL and ipulating the descriptors that tell how the array is ASCII Operation, by Warren W. Leong page 25 stored. The use of subscript calculus in the dynamic Printed in U.S.A. ©Hewlett-Packard Company, 1977 © Copr. 1949-1998 Hewlett-Packard Co. Dedicated APL System Multilingual System 2.98 3.06 -g 3h f 3 2.32 2.16 1.8 I 2 1.74 I ocS 1 1.04 Standard Mix Light Mix 51 2K Bytes 384K Bytes 384K Bytes 51 2K Bytes 51 2K Bytes 384K Bytes 16 Terminals 12 Terminals 12 Terminals 13 Terminals 16 Terminals 12 Terminals A Scripts 5 A Scripts 4 FORTRAN 6 BASIC 3 FORTRAN 1 COBOL B Scripts 3 B Scripts 4 BASIC 6 APL 3 BASIC 12 APL C Scripts 2 C Scripts 8 APL 6 APL D Scripts 1 E Script A Script A Script A Script 2 A Scripts E Scripts 1 F Script B Script B Script B Script 2 B Scripts F Scripts C Script C Script C Script 2 C Scripts D Script D Script D Script 2 D Scripts Fig. 1. Average response times E Script E Script E Script 2 E Scripts for a range of activities on an HP F Script F Script F Script 2 F Scripts 3000 Series II System used only APL Scripts for APL and similar data for a range of APL activities on a multi A Edit interactive program and execute. D Compute bound large workspace swapping program. lingual HP 3000 Series II System. B Edit simple calculation program and execute. E Compute bound simple calculations. A system with 51 2 K bytes of main C Assignments and addition in calculator mode. F Compute bound primes program. memory will support up to 16 APL terminals. problem or application. Most other APL systems limit any variable in the workspace and resume execution a workspace to 100,000 bytes or less. APL 3000 within any function that has not yet completed execu eliminates this limitation by giving each user a vir tion. These extended control functions can be used to tual workspace. A workspace is limited only by the implement advanced programming techniques that amount of on-line disc storage available. were previously difficult or impossible to implement in APL 3000 is the first APL system to include APL. An example is backtracking, which involves sav APLGOL4 as an integral part. APLGOL is a block- ing the control state at various points in the computa structured language that uses keywords to control the tion and returning to a previously saved control state program flow between APL statements. To facilitate the when an error is detected. editing of APLGOL programs, and to provide an en The new features of APL 3000 are described in detail hanced style of editing for APL programs and user data, in the articles that follow. a new editor was added to the APL system. This editor can be used on both programs and character data, and Performance Data includes many features never available before in APL. An HP 3000 Series II System with 512K bytes of main One of the features of APL that makes program de memory will support a maximum of 16 terminals using velopment easier is that program debugging can be APL, or a combination of terminals using APL and other done interactively. When an error is encountered in an languages. Fig. 1 shows typical response times for vari APL program, an error message is displayed along with ous combinations of terminal types, APL program a pointer to the place where the error was detected. loads, and memory sizes. Execution is suspended at this point, and control is returned to the user. In other versions of APL, the user is Acknowledgments allowed to reference or change only the variables that The authors wish to acknowledge the contributions are accessible within the function in which the error of John Walters and Rob Kelley , without whose efforts occurred, and must resume execution within that func APL 3000 would never have become a product. John tion. APL \3000 has implemented a set of extended served as project leader during the development stage control functions that allow the user to access or change and was responsible for many of the technological 3 © Copr. 1949-1998 Hewlett-Packard Co. innovations that are included in the final product. SLAG Report No. 114, Stanford University, February 1970. Rob participated in the design of the incremental 4. R.A. Kelley and J.R. Walters, "APLGOL-2, a Structured compiler and his expertise in APLGOL helped make Programming System for APL," IBM Palo Alto Scientific this facility an integral part of APL 3000. Center, Technical Report G320-3318, 1973. Many people contributed to the initial discussions that led to the design of the incremental compiler. In particular, Dick Sites was most responsible for Kenneth A. Van Bree sketching out the compiling techniques. Larry Breed Ken Van Bree received his bachelor's degree in electrical and Phil Abrams helped us develop new techniques engineering from the University of for compiling APL while maintaining compatibility Michigan in 1 967, his master's de with the original philosophy of APL. Jeff Misch- gree from Massachusetts Institute kinsky was responsible for the implementation of of Technology in 1969, and the APLGOL and the design of the APL 3000 editor. degree of Electrical Engineer, also from MIT, in 1971. During the Alan Marcum offered design suggestions from a summer of 1970 he helped de user's point of view that helped us refine the product. velop a computer-aided design Our special thanks must go to Jim Duley, Paul Stoft, program for the HP 2100A Com and Ed McCracken, whose long-standing support of puter. Since joining HP Laboratories our efforts helped us transform our ideas from a re full-time in 1971, he's done com puter-aided device modeling and search project into a product. S mask layout for a 4K RAM, and References helped design and implement the APLX3000 compiler.