[comp.lang.apl] APL, J syntax descriptions; PD software

mgkst1@unix.cis.pitt.edu (Michael G Koopman) (05/17/91)

Any suggestions on the best texts, manuals, dialogs, libraries of APL,
APL2, J syntax and routines?  Are there good sources of PD APL, J
interpreters and routines?  I am especially interested in software for
SGI workstations.  I used APL long ago, ran into a regular user and now
hope to rediscover APL.

Are there any compilers for APL variants?  If not what makes a compiler
for APL so difficult?  With the almost advent of Fortran 90 is anyone
considering these compiler designs with respect to APL designs?

Thanks,
Mike K. <mgkst1@unix.cis.pitt.edu>

rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) (05/18/91)

In article <129234@unix.cis.pitt.edu> mgkst1@unix.cis.pitt.edu (Michael G Koopman) writes:
>
>Are there any compilers for APL variants?  If not what makes a compiler
>for APL so difficult?  With the almost advent of Fortran 90 is anyone
>considering these compiler designs with respect to APL designs?

Tim Budd has a free APL compiler, written as a university project.

STSC offered an APL compiler, but I believe they no longer actively
(or at all??) market it.

Recent rumour suggests that someone has obtained rights to distribute
YAT (Yorktown Apl Translator (apl to Fortran)), written at IBM's T.J.
Watson Labs.

I am working on a J compiler. Stay tuned.

Why is an compiler so difficult? Partially because it was common
knowledge that it was nearly impossible. Once that belief got walked
on, it became less hard. 

More seriously, the major problems of compiling APL to get more speed
(I presume that's the major reason you'd want to compile it) are
things like:

a. Dynamic scoping rules. You need to examine the entire possible calling
]  tree.

b. execute, function fix, function expunge, and similar goodies.

c. Ability for arrays to change type, rank, and shape underfoot.

However, even a naive compiler won't do bad on certain problems in
which large arrays are being used. See Bernecky, et al., in APL90
(Acorn: APL to C on Real Numbers). A toy compiler did about half as
good as hand-unrolled Fortran on real seismic problems.

Robert Bernecky      rbe@yrloc.ipsa.reuter.com  bernecky@itrchq.itrc.on.ca 
Snake Island Research Inc  (416) 368-6944   FAX: (416) 360-4694 
18 Fifth Street, Ward's Island
Toronto, Ontario M5J 2B9 
Canada

hui@yrloc.ipsa.reuter.COM (Roger Hui) (05/18/91)

J is available for the Silicon Graphics Irix machine.  Contact
Prof. Lee Dickey at Waterloo (ljdickey@watmath.waterloo.edu)
for ftp procedures.

"Programming in J" by Ken Iverson is an introduction to
programming using J as the language.  It includes the Dictionary
of J (21 pp.), which is the language specification and reference.

-----------------------------------------------------------------
Roger Hui
Iverson Software Inc., 33 Major Street, Toronto, Ontario  M5S 2K9
(416) 925 6096