Personalized Array Translator: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
m (Text replacement - "Category:Array languages" to "")
 
(8 intermediate revisions by 2 users not shown)
Line 5: Line 5:
| unicode support          = no
| unicode support          = no
| released                = 1964
| released                = 1964
| developer                = H. Hellerman
| developer                = Herb Hellerman
| implementation language  = [[wikipedia:IBM_Basic_Assembly_Language_and_successors|BAL]]
| implementation language  = 1620 Symbolic Programming System (SPS)
| platforms                = [[wikipedia:IBM 1620|IBM 1620]]
| platforms                = [[wikipedia:IBM 1620|IBM 1620]]
| documentation            = [https://www.semanticscholar.org/paper/Experimental-personalized-array-translator-system-Hellerman/537d26ca8c4172cdd2976cffedef5422f61a00f2 ''Experimental personalized array translator system'']
| documentation            = [https://www.semanticscholar.org/paper/Experimental-personalized-array-translator-system-Hellerman/537d26ca8c4172cdd2976cffedef5422f61a00f2 ''Experimental personalized array translator system'']
| influenced by            = [[Iverson notation]]
| influenced by            = [[Iverson notation]]
| influenced              = [[IVSYS/7090]]
}}
}}


The '''Personalized Array Translator''' ('''PAT''') was an early experimental system, and together with [[IVSYS/7090]], one of the first implementations of [[Iverson Notation]] as a programming language.
The '''Personalized Array Translator''' ('''PAT''') was an early experimental system create by Dr. Herbert Hellerman of the [[IBM]] System Research Institute. It was the first implementation of [[Iverson Notation]] as a programming language, preceding even [[IVSYS/7090]]. [[Ken Iverson]] used the PAT system in his early work with students in the local secondary school, and had a profound influence on Iverson's notation, as can be seen in his book [https://code.jsoftware.com/wiki/Doc/Elementary_Functions_An_Algorithmic_Treatment ''Elementary Functions An Algorithmic Treatment''].


In lieu of most proper APL [[glyphs]], PAT used letters prefixed by the <code>@</code> symbol. [[Comparison functions]] were denoted by <code>@</code> followed by three digits 0 or 1, indicating whether the function would return 1 or 0 if the left argument would be less than, equal to, or greater than the right argument, respectively. The language only allowed application of one function per statement, with the result being assigned. Valid statements were:<ref>Hellerman, H. [https://www.semanticscholar.org/paper/Experimental-personalized-array-translator-system-Hellerman/537d26ca8c4172cdd2976cffedef5422f61a00f2 Experimental personalized array translator system]. Communications of the [[wikipedia:Association_for_Computing_Machinery|ACM]]. July 1964. [[wikipedia:doi]] https://doi.org/10.1145/364520.364573</ref>
In lieu of most proper APL [[glyphs]], PAT used letters prefixed by the <code>@</code> symbol. [[Comparison functions]] were denoted by <code>@</code> followed by three digits 0 or 1, indicating whether the function would return 1 or 0 if the left argument would be less than, equal to, or greater than the right argument, respectively. The language only allowed application of one function per statement, with the result being assigned. Valid statements were:<ref>Hellerman, H. [https://www.semanticscholar.org/paper/Experimental-personalized-array-translator-system-Hellerman/537d26ca8c4172cdd2976cffedef5422f61a00f2 Experimental personalized array translator system]. Communications of the [[wikipedia:Association_for_Computing_Machinery|ACM]]. July 1964. https://doi.org/10.1145/364520.364573</ref>


{| class=wikitable
{| class=wikitable
! Name !! PAT statement !! Modern equivalent
! Name !! PAT statement !! Modern equivalent
|-
|-
| [[Add]] || <code>Z = X + Y</code> || <source lang=apl inline>Z ← X + Y</source>
| [[Add]] || <code>Z = X + Y</code> || <syntaxhighlight lang=apl inline>Z ← X + Y</syntaxhighlight>
|-
|-
| [[Subtract]] || <code>Z = X - Y</code> || <source lang=apl inline>Z ← X - Y</source>
| [[Subtract]] || <code>Z = X - Y</code> || <syntaxhighlight lang=apl inline>Z ← X - Y</syntaxhighlight>
|-
|-
| [[Multiply]] || <code>Z = X * Y</code> || <source lang=apl inline>Z ← X × Y</source>
| [[Multiply]] || <code>Z = X * Y</code> || <syntaxhighlight lang=apl inline>Z ← X × Y</syntaxhighlight>
|-
|-
| [[Divide]] || <code>Z = X @D Y</code> || <source lang=apl inline>Z ← X ÷ Y</source>
| [[Divide]] || <code>Z = X @D Y</code> || <syntaxhighlight lang=apl inline>Z ← X ÷ Y</syntaxhighlight>
|-
|-
| [[And]] || <code>Z = X @A Y</code> || <source lang=apl inline>Z ← X ∧ Y</source>
| [[And]] || <code>Z = X @A Y</code> || <syntaxhighlight lang=apl inline>Z ← X ∧ Y</syntaxhighlight>
|-
|-
| [[Or]] || <code>Z = X @O Y</code> || <source lang=apl inline>Z ← X ∨ Y</source>
| [[Or]] || <code>Z = X @O Y</code> || <syntaxhighlight lang=apl inline>Z ← X ∨ Y</syntaxhighlight>
|-
|-
| [[Constant]] Zero || <code>Z = X @000 Y</code> || <source lang=apl inline>Z ← X(=≠=)Y</source>
| [[Constant]] Zero || <code>Z = X @000 Y</code> || <syntaxhighlight lang=apl inline>Z ← X(=≠=)Y</syntaxhighlight>
|-
|-
| [[Greater than]] || <code>Z = X @001 Y</code> || <source lang=apl inline>Z ← X > Y</source>
| [[Greater than]] || <code>Z = X @001 Y</code> || <syntaxhighlight lang=apl inline>Z ← X > Y</syntaxhighlight>
|-
|-
| [[Equal]] || <code>Z = X @010 Y</code> || <source lang=apl inline>Z ← X = Y</source>
| [[Equal]] || <code>Z = X @010 Y</code> || <syntaxhighlight lang=apl inline>Z ← X = Y</syntaxhighlight>
|-
|-
| [[Greater than or equal]] || <code>Z = X @011 Y</code> || <source lang=apl inline>Z ← X ≥ Y</source>
| [[Greater than or equal]] || <code>Z = X @011 Y</code> || <syntaxhighlight lang=apl inline>Z ← X ≥ Y</syntaxhighlight>
|-
|-
| [[Less than]] || <code>Z = X @100 Y</code> || <source lang=apl inline>Z ← X < Y</source>
| [[Less than]] || <code>Z = X @100 Y</code> || <syntaxhighlight lang=apl inline>Z ← X < Y</syntaxhighlight>
|-
|-
| [[Not equal]] || <code>Z = X @101 Y</code> || <source lang=apl inline>Z ← X ≠ Y</source>
| [[Not equal]] || <code>Z = X @101 Y</code> || <syntaxhighlight lang=apl inline>Z ← X ≠ Y</syntaxhighlight>
|-
|-
| [[Less than or equal]] || <code>Z = X @110 Y</code> || <source lang=apl inline>Z ← X ≤ Y</source>
| [[Less than or equal]] || <code>Z = X @110 Y</code> || <syntaxhighlight lang=apl inline>Z ← X ≤ Y</syntaxhighlight>
|-
|-
| [[Constant]] One || <code>Z = X @111 Y</code> || <source lang=apl inline>Z ← X(===)Y</source>
| [[Constant]] One || <code>Z = X @111 Y</code> || <syntaxhighlight lang=apl inline>Z ← X(===)Y</syntaxhighlight>
|-
|-
| "Ceiling" ([[Maximum]]) || <code>Z = X @C Y</code> || <source lang=apl inline>Z ← X ⌈ Y</source>
| "Ceiling" ([[Maximum]]) || <code>Z = X @C Y</code> || <syntaxhighlight lang=apl inline>Z ← X ⌈ Y</syntaxhighlight>
|-
|-
| "Floor" ([[Minimum]]) || <code>Z = X @F Y</code> || <source lang=apl inline>Z ← X ⌊ Y</source>
| "Floor" ([[Minimum]]) || <code>Z = X @F Y</code> || <syntaxhighlight lang=apl inline>Z ← X ⌊ Y</syntaxhighlight>
|-
|-
| [[Exponential]] || <code>Z = X @E Y</code> || <source lang=apl inline>Z ← X * Y</source>
| [[Exponential]] || <code>Z = X @E Y</code> || <syntaxhighlight lang=apl inline>Z ← X * Y</syntaxhighlight>
|-
|-
| [[Assignment]] || <code>Z = X</code> || <source lang=apl inline>Z ← X</source>
| [[Assignment]] || <code>Z = X</code> || <syntaxhighlight lang=apl inline>Z ← X</syntaxhighlight>
|-
|-
| [[Not]] || <code>Z = @N X</code> || <source lang=apl inline>Z ← ~ X</source>
| [[Not]] || <code>Z = @N X</code> || <syntaxhighlight lang=apl inline>Z ← ~ X</syntaxhighlight>
|-
|-
| [[Absolute value]] || <code>Z = @A X</code> || <source lang=apl inline>Z ← | X</source>
| [[Absolute value]] || <code>Z = @A X</code> || <syntaxhighlight lang=apl inline>Z ← | X</syntaxhighlight>
|-
|-
| [[Circular|Sine]] || <code>Z = @S X</code> || <source lang=apl inline>Z ← 1 ○ X</source>
| [[Circular|Sine]] || <code>Z = @S X</code> || <syntaxhighlight lang=apl inline>Z ← 1 ○ X</syntaxhighlight>
|-
|-
| [[Circular|Cosine]] || <code>Z = @C X</code> || <source lang=apl inline>Z ← 2 ○ X</source>
| [[Circular|Cosine]] || <code>Z = @C X</code> || <syntaxhighlight lang=apl inline>Z ← 2 ○ X</syntaxhighlight>
|-
|-
| [[Log]] (base 10) || <code>Z = @L X</code> || <source lang=apl inline>Z ← 10 ⍟ X</source>
| [[Log]] (base 10) || <code>Z = @L X</code> || <syntaxhighlight lang=apl inline>Z ← 10 ⍟ X</syntaxhighlight>
|-
|-
| [[Round up]] || <code>Z = @U X</code> || <source lang=apl inline>Z ← ⌈ X</source>
| [[Round up]] || <code>Z = @U X</code> || <syntaxhighlight lang=apl inline>Z ← ⌈ X</syntaxhighlight>
|-
|-
| [[Round down]] || <code>Z = @D X</code> || <source lang=apl inline>Z ← ⌊ X</source>
| [[Round down]] || <code>Z = @D X</code> || <syntaxhighlight lang=apl inline>Z ← ⌊ X</syntaxhighlight>
|-
|-
| [[Matrix]] [[Transpose]] || <code>Z = @T X</code> || <source lang=apl inline>Z ← ⍉ X</source>
| [[Matrix]] [[Transpose]] || <code>Z = @T X</code> || <syntaxhighlight lang=apl inline>Z ← ⍉ X</syntaxhighlight>
|-
|-
| [[Reduction]]* || <code>Z = @U X</code> || <source lang=apl inline>Z ← +/ X</source>
| [[Reduction]]* || <code>Z = @U X</code> || <syntaxhighlight lang=apl inline>Z ← +/ X</syntaxhighlight>
|-
|-
| [[Base]] || <code>Z = X @B Y</code> || <source lang=apl inline>Z ← X ⊥ Y</source>
| [[Base]] || <code>Z = X @B Y</code> || <syntaxhighlight lang=apl inline>Z ← X ⊥ Y</syntaxhighlight>
|-
|-
| [[Residue]] || <code>Z = X @W Y</code> || <source lang=apl inline>Z ← X | Y</source>
| [[Residue]] || <code>Z = X @W Y</code> || <syntaxhighlight lang=apl inline>Z ← X | Y</syntaxhighlight>
|-
|-
| [[Compression]] || <code>Z = U / X</code> || <source lang=apl inline>Z ← U / X</source>
| [[Compression]] || <code>Z = U / X</code> || <syntaxhighlight lang=apl inline>Z ← U / X</syntaxhighlight>
|-
|-
| Post <code>Z</code> with <code>X</code> controlled by <code>U</code> || <code>Z = U @P X</code> ||
| Post <code>Z</code> with <code>X</code> controlled by <code>U</code> || <code>Z = U @P X</code> ||
|-
|-
| [[Reshape|Dimension array]] || <code>@D X , C , R</code> || <source lang=apl inline>X ← R C ⍴ X</source> or <source lang=apl inline>X ⍴⍨← R C</source>  
| [[Reshape|Dimension array]] || <code>@D X , C , R</code> || <syntaxhighlight lang=apl inline>X ← R C ⍴ X</syntaxhighlight> or <syntaxhighlight lang=apl inline>X ⍴⍨← R C</syntaxhighlight>  
|-
|-
| [[Catenate|Juxtaposition]] || <code>Z = X , X</code> || <source lang=apl inline>Z ← X , X</source>  
| [[Catenate|Juxtaposition]] || <code>Z = X , X</code> || <syntaxhighlight lang=apl inline>Z ← X , X</syntaxhighlight>  
|-
|-
| Left [[rotate]] || <code>Z = K @L X</code> || <source lang=apl inline>Z ← K ⌽ X</source>  
| Left [[rotate]] || <code>Z = K @L X</code> || <syntaxhighlight lang=apl inline>Z ← K ⌽ X</syntaxhighlight>  
|-
|-
| Right [[rotate]] || <code>Z = K @R X</code> || <source lang=apl inline>Z ← (-K) ⌽ X</source>  
| Right [[rotate]] || <code>Z = K @R X</code> || <syntaxhighlight lang=apl inline>Z ← (-K) ⌽ X</syntaxhighlight>  
|-
|-
| Compare and [[branch]] || <code>X @C Y, A, B, C</code> ||
| Compare and [[branch]] || <code>X @C Y, A, B, C</code> ||
Line 93: Line 94:
| Update <code>X</code>, compare and branch || <code>@U X , Y , A , B , C</code> ||
| Update <code>X</code>, compare and branch || <code>@U X , Y , A , B , C</code> ||
|-
|-
| [[Range|Interval]] || <code>Z = @I I , J</code> || <source lang=apl inline>Z ← I … J</source>
| [[Range|Interval]] || <code>Z = @I I , J</code> || <syntaxhighlight lang=apl inline>Z ← I … J</syntaxhighlight>
|-
|-
| Mid-selection array || <code>Z = @M I , J</code> ||
| Mid-selection array || <code>Z = @M I , J</code> ||
Line 99: Line 100:
| Get data (cards) || <code>@G X</code> ||
| Get data (cards) || <code>@G X</code> ||
|-
|-
| Type data || <code>@T X</code> || <source lang=apl inline>⎕ ← X</source>
| Type data || <code>@T X</code> || <syntaxhighlight lang=apl inline>⎕ ← X</syntaxhighlight>
|-
|-
| Transform floating–alphanumeric || <code>Z = @X Y</code> || <source lang=apl inline>Z ← ⎕UCS Y</source> or <source lang=apl inline>Z ← ⎕AF X</source>
| Transform floating–alphanumeric || <code>Z = @X Y</code> || <syntaxhighlight lang=apl inline>Z ← ⎕UCS Y</syntaxhighlight> or <syntaxhighlight lang=apl inline>Z ← ⎕AF X</syntaxhighlight>
|-
|-
| Accept data from typewriter || <code>@A X</code> || <source lang=apl inline>X ← ⍞</source>
| Accept data from typewriter || <code>@A X</code> || <syntaxhighlight lang=apl inline>X ← ⍞</syntaxhighlight>
|-
|-
| Type heading message and proceed || <code>@H any heading</code> ||
| Type heading message and proceed || <code>@H any heading</code> ||
Line 113: Line 114:


== References ==
== References ==
 
<references/>
{{APL dialects}}[[Category:IBM APL dialects]][[Category:Flat array languages]]
{{APL dialects}}[[Category:Flat array languages]][[Category:IBM APL dialects]]

Latest revision as of 22:42, 24 January 2024


The Personalized Array Translator (PAT) was an early experimental system create by Dr. Herbert Hellerman of the IBM System Research Institute. It was the first implementation of Iverson Notation as a programming language, preceding even IVSYS/7090. Ken Iverson used the PAT system in his early work with students in the local secondary school, and had a profound influence on Iverson's notation, as can be seen in his book Elementary Functions An Algorithmic Treatment.

In lieu of most proper APL glyphs, PAT used letters prefixed by the @ symbol. Comparison functions were denoted by @ followed by three digits 0 or 1, indicating whether the function would return 1 or 0 if the left argument would be less than, equal to, or greater than the right argument, respectively. The language only allowed application of one function per statement, with the result being assigned. Valid statements were:[1]

Name PAT statement Modern equivalent
Add Z = X + Y Z ← X + Y
Subtract Z = X - Y Z ← X - Y
Multiply Z = X * Y Z ← X × Y
Divide Z = X @D Y Z ← X ÷ Y
And Z = X @A Y Z ← X ∧ Y
Or Z = X @O Y Z ← X ∨ Y
Constant Zero Z = X @000 Y Z ← X(=≠=)Y
Greater than Z = X @001 Y Z ← X > Y
Equal Z = X @010 Y Z ← X = Y
Greater than or equal Z = X @011 Y Z ← X ≥ Y
Less than Z = X @100 Y Z ← X < Y
Not equal Z = X @101 Y Z ← X ≠ Y
Less than or equal Z = X @110 Y Z ← X ≤ Y
Constant One Z = X @111 Y Z ← X(===)Y
"Ceiling" (Maximum) Z = X @C Y Z ← X ⌈ Y
"Floor" (Minimum) Z = X @F Y Z ← X ⌊ Y
Exponential Z = X @E Y Z ← X * Y
Assignment Z = X Z ← X
Not Z = @N X Z ← ~ X
Absolute value Z = @A X Z ← | X
Sine Z = @S X Z ← 1 ○ X
Cosine Z = @C X Z ← 2 ○ X
Log (base 10) Z = @L X Z ← 10 ⍟ X
Round up Z = @U X Z ← ⌈ X
Round down Z = @D X Z ← ⌊ X
Matrix Transpose Z = @T X Z ← ⍉ X
Reduction* Z = @U X Z ← +/ X
Base Z = X @B Y Z ← X ⊥ Y
Residue Z = X @W Y Z ← X | Y
Compression Z = U / X Z ← U / X
Post Z with X controlled by U Z = U @P X
Dimension array @D X , C , R X ← R C ⍴ X or X ⍴⍨← R C
Juxtaposition Z = X , X Z ← X , X
Left rotate Z = K @L X Z ← K ⌽ X
Right rotate Z = K @R X Z ← (-K) ⌽ X
Compare and branch X @C Y, A, B, C
Update X, compare and branch @U X , Y , A , B , C
Interval Z = @I I , J Z ← I … J
Mid-selection array Z = @M I , J
Get data (cards) @G X
Type data @T X ⎕ ← X
Transform floating–alphanumeric Z = @X Y Z ← ⎕UCS Y or Z ← ⎕AF X
Accept data from typewriter @A X X ← ⍞
Type heading message and proceed @H any heading
Type message, return to monitor @M any message
  • Any scalar dyadic function may replace + in a reduction statement.

References

APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000PometoTinyAPL
Historical A Programming LanguageA+ (A) ∙ APL#APL2CAPL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXExtended Dyalog APLIverson notationIVSYS/7090NARSngn/aplopenAPLOperators and FunctionsPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyK (Goal, Klong, Q) ∙ KamilaLispLang5LilNialRADUiua
Overviews Comparison of APL dialectsTimeline of array languagesTimeline of influential array languagesFamily tree of array languages