APL\3000: Difference between revisions

Jump to navigation Jump to search
528 bytes added ,  22:06, 8 August 2023
m
no edit summary
(Added link to the APL\3000 Reference Manual at Bitsavers.)
mNo edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 5: Line 5:
| numeric types            = 64-bit float
| numeric types            = 64-bit float
| unicode support          = no
| unicode support          = no
| released                = 1977
| released                = November 15, 1976
| developer                = [[wikipedia:Hewlett-Packard|Hewlett-Packard]]
| developer                = [[wikipedia:Hewlett-Packard|Hewlett-Packard]]
| platforms                = [[wikipedia:HP 3000|HP 3000]] Series II / III
| platforms                = [[wikipedia:HP 3000|HP 3000]] Series II / III
| operating systems        = [[wikipedia:HP Multi-Programming Executive|HP MPE]]
| operating systems        = [[wikipedia:HP Multi-Programming Executive|HP MPE]]
| documentation            = [http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1977-07.pdf HP Journal (pdf)]
| documentation            = [https://web.archive.org/web/20201109035508/http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1977-07.pdf HP Journal (pdf)] [http://www.bitsavers.org/pdf/hp/3000/mpeII/32105-90002_APL3000_Reference_Manual_Nov1976.pdf Reference Manual (pdf)]
| influenced by            = [[APL.SV]]
| influenced by            = [[APL.SV]]
}}
}}


'''APL\3000''' was an APL implementation for the [[wikipedia:Hewlett-Packard|Hewlett-Packard]] [[wikipedia:HP 3000|HP 3000]] Series II and III minicomputers. Its design and new features were published in the July 1977 issue of [[wikipedia:Hewlett-Packard Journal|HP Journal]].<ref>Hewlett-Packard. [http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1977-07.pdf Hewlett-Packard Journal], July 1977.</ref> Marketed as "the first time a large-machine APL has been available on a small computer" (that is, not a mainframe), APL\3000 followed the [[APL.SV]] model closely, and featured exactly the same set of primitives. However, it featured the new implementation techniques of a [[wikipedia:Dynamic compilation|dynamic compiler]] and [[subscript calculus]], usability features like a [[workspace]] transparently backed by disk space and improved interactive debugging, and the first commercially available [[APLGOL]] implementation. The development of APL\3000 was led by John Walters, and Rob Kelley worked on the compiler and APLGOL design. [[Larry Breed]] and [[Phil Abrams]] assisted in developing the APL compiler.
'''APL\3000''' was an APL implementation for the [[wikipedia:Hewlett-Packard|Hewlett-Packard]] [[wikipedia:HP 3000|HP 3000]] Series II and III minicomputers. Its design and new features were published in the July 1977 issue of [[wikipedia:Hewlett-Packard Journal|HP Journal]].<ref>Hewlett-Packard. [https://web.archive.org/web/20201109035508/http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1977-07.pdf Hewlett-Packard Journal], July 1977.</ref> Marketed as "the first time a large-machine APL has been available on a small computer" (that is, not a mainframe), APL\3000 followed the [[APL.SV]] model closely, and featured exactly the same set of primitives. However, it featured the new implementation techniques of a [[wikipedia:Dynamic compilation|dynamic compiler]] and [[subscript calculus]], usability features like a [[workspace]] transparently backed by disk space and improved interactive debugging, and the first commercially available [[APLGOL]] implementation. The development of APL\3000 was led by John Walters, and Rob Kelley worked on the compiler and APLGOL design. [[Larry Breed]] and [[Phil Abrams]] assisted in developing the APL compiler.


== History ==
== History ==
Line 31: Line 31:
The system implemented [[Phil Abrams]]' [[subscript calculus]] by storing the [[rank]] and [[shape]] of an array, along with delta and offset vectors, separately from its data—that is, the [[ravel]], but not necessarily in [[ravel order]]. This system allowed [[Take]], [[Drop]], [[Reverse]], [[Transpose]], and [[Reshape]] to be implemented only by manipulating the shape and other fields, not the data itself. In combination with APL\3000's [[reference count]]ing system, this allowed even arrays with different shapes to share the same data. Arrays whose data was a linear function of the index were stored as [[arithmetic progression vector]]s, omitting the data entirely.
The system implemented [[Phil Abrams]]' [[subscript calculus]] by storing the [[rank]] and [[shape]] of an array, along with delta and offset vectors, separately from its data—that is, the [[ravel]], but not necessarily in [[ravel order]]. This system allowed [[Take]], [[Drop]], [[Reverse]], [[Transpose]], and [[Reshape]] to be implemented only by manipulating the shape and other fields, not the data itself. In combination with APL\3000's [[reference count]]ing system, this allowed even arrays with different shapes to share the same data. Arrays whose data was a linear function of the index were stored as [[arithmetic progression vector]]s, omitting the data entirely.


Multiple functions could be combined into a single step using [[deferred evaluation|dragalong]] and beating, also designed by Abrams. Dragalong was implemented by walking up a syntax tree to propagate rank and shape information before compilation, while beating refers to subscript calculus optimizations performed during this process. Combined functions such as <source inline lang=apl>RANK</source>, produced from two adjacent [[Shape]] functions, and <source inline lang=apl>POLYCAT</source>, from multiple copies of [[Catenate]] could be generated in this step.
Multiple functions could be combined into a single step using [[deferred evaluation|dragalong]] and beating, also designed by Abrams. Dragalong was implemented by walking up a syntax tree to propagate rank and shape information before compilation, while beating refers to subscript calculus optimizations performed during this process. Combined functions such as <syntaxhighlight inline lang=apl>RANK</syntaxhighlight>, produced from two adjacent [[Shape]] functions, and <syntaxhighlight inline lang=apl>POLYCAT</syntaxhighlight>, from multiple copies of [[Catenate]] could be generated in this step.


APL\3000's unlimited [[workspace]] size was implemented using a [[wikipedia:virtual memory|virtual memory]] system capable of paging parts of the workspace to disk. The least recently accessed page was always chosen to be paged out. To implement the required flat 32-bit address space on a minicomputer with a segmented, stack-oriented architecture, where a process could normally only address up to 64KiB of memory, they developed ten new CPU instructions whose microcode was included with the purchase of APL\3000 as a set of PROM chips that would be installed in the host HP-3000 Series II or III by an HP Customer Engineer. These instructions included virtual load and store between the 16-bit stack and 32-bit virtual addresses of 16-bit words and 8-bit bytes, as well as word and byte moves between virtual and stack addresses. There was also a virtual to virtual move, and two special instructions to support the "emachine" virtual machine execution engine, a fetch-and-dispatch for the 8-bit ecode instructions, and a single word load that allowed unaligned addresses relative to the current ecode program pointer, which was used by the virtual machine to load ecode parameters and immediates. The virtual memory instructions operated by searching a list of VM pages (typically 24 pages of 512 or 1,024 bytes each) that were stored at a known location in the APL process stack. If the target address was not found, control was passed to a fault handler provided by the APL system. To resolve faults, the appropriate page would be read from the on-disk workspace file into the least-recently-accessed stack page. A []VM system variable was provided that allowed user code to access and dynamically reconfigure the paging scheme and page-search mechanism.
APL\3000's unlimited [[workspace]] size was implemented using a [[wikipedia:virtual memory|virtual memory]] system capable of paging parts of the workspace to disk. The least recently accessed page was always chosen to be paged out. To implement the required flat 32-bit address space on a minicomputer with a segmented, stack-oriented architecture, where a process could normally only address up to 64KiB of memory, they developed ten new CPU instructions whose microcode was included with the purchase of APL\3000 as a set of PROM chips that would be installed in the host HP-3000 Series II or III by an HP Customer Engineer. These instructions included virtual load and store between the 16-bit stack and 32-bit virtual addresses of 16-bit words and 8-bit bytes, as well as word and byte moves between virtual and stack addresses. There was also a virtual to virtual move, and two special instructions to support the "emachine" virtual machine execution engine, a fetch-and-dispatch for the 8-bit ecode instructions, and a single word load that allowed unaligned addresses relative to the current ecode program pointer, which was used by the virtual machine to load ecode parameters and immediates. The virtual memory instructions operated by searching a list of VM pages (typically 24 pages of 512 or 1,024 bytes each) that were stored at a known location in the APL process stack. If the target address was not found, control was passed to a fault handler provided by the APL system. To resolve faults, the appropriate page would be read from the on-disk workspace file into the least-recently-accessed stack page. A []VM system variable was provided that allowed user code to access and dynamically reconfigure the paging scheme and page-search mechanism.
Line 46: Line 46:


The following [[control structure]]s were provided in APLGOL:
The following [[control structure]]s were provided in APLGOL:
* <source inline lang=apl>BEGIN statement list END</source>
* <syntaxhighlight inline lang=apl>BEGIN statement list END</syntaxhighlight>
* <source inline lang=apl>IF test DO statement</source>
* <syntaxhighlight inline lang=apl>IF test DO statement</syntaxhighlight>
* <source inline lang=apl>IF test THEN statement ELSE statement</source>
* <syntaxhighlight inline lang=apl>IF test THEN statement ELSE statement</syntaxhighlight>
* <source inline lang=apl>WHILE test DO statement</source>
* <syntaxhighlight inline lang=apl>WHILE test DO statement</syntaxhighlight>
* <source inline lang=apl>REPEAT statement list UNTIL test</source>
* <syntaxhighlight inline lang=apl>REPEAT statement list UNTIL test</syntaxhighlight>
* <source inline lang=apl>CASE expression OF constant BEGIN ... END CASE</source>
* <syntaxhighlight inline lang=apl>CASE expression OF constant BEGIN ... END CASE</syntaxhighlight>


Functions were written with the <source inline lang=apl>PROCEDURE</source> command:
Functions were written with the <syntaxhighlight inline lang=apl>PROCEDURE</syntaxhighlight> command:
<source lang=apl>PROCEDURE header: statement list END PROCEDURE</source>
<syntaxhighlight lang=apl>PROCEDURE header: statement list END PROCEDURE</syntaxhighlight>
An <source inline lang=apl>ASSERT</source> command was also provided to allow the programmer to check conditions during execution.
An <syntaxhighlight inline lang=apl>ASSERT</syntaxhighlight> command was also provided to allow the programmer to check conditions during execution.
<source lang=apl>ASSERT level: boolean expression</source>
<syntaxhighlight lang=apl>ASSERT level: boolean expression</syntaxhighlight>
The <source inline lang=apl>level</source> parameter allowed for inline execution.
The <syntaxhighlight inline lang=apl>level</syntaxhighlight> parameter allowed for inline execution.


== Publications ==
== Publications ==


* [http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1977-07.pdf HP Journal (pdf)]
* [https://web.archive.org/web/20201109035508/http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1977-07.pdf HP Journal (pdf)]
* APL\3000 Reference Manual (1976) [http://www.bitsavers.org/pdf/hp/3000/mpeII/32105-90002_APL3000_Reference_Manual_Nov1976.pdf]  
* [http://www.bitsavers.org/pdf/hp/3000/mpeII/32105-90002_APL3000_Reference_Manual_Nov1976.pdf APL\3000 Reference Manual (1976) (pdf)]
* Ronald L. Johnston. [http://www.softwarepreservation.org/projects/apl/Papers/DYNAMICINCREMENTAL "The Dynamic Incremental Compiler of APL\3000"]. [[APL79]]. doi:[https://doi.org/10.1145/800136.804442 10.1145/800136.804442].
* Ronald L. Johnston. [http://www.softwarepreservation.org/projects/apl/Papers/DYNAMICINCREMENTAL "The Dynamic Incremental Compiler of APL\3000"]. [[APL79]]. doi:[https://doi.org/10.1145/800136.804442 10.1145/800136.804442].
* Alan M. Marcum. "Secure application environments in APL\3000". [[APL79]]. doi:[https://doi.org/10.1145/800136.804470 10.1145/800136.804470].
* Alan M. Marcum. "Secure application environments in APL\3000". [[APL79]]. doi:[https://doi.org/10.1145/800136.804470 10.1145/800136.804470].
Line 71: Line 71:
<references />
<references />


{{APL dialects}}[[Category:APL dialects]][[Category:Flat array languages]]
{{APL dialects}}[[Category:APL dialects]][[Category:Dynamic compilers]][[Category:Flat array languages]]
33

edits

Navigation menu