Translating to/from APL 
Author Message
 Translating to/from APL

This is a response to Douglas F. DeJulio of Carnegie Mellon U. in Pittsburgh,
PA, USA, whose complex domain-format path defeated my mailer:

"Doug:
  No, I have not seen any programming language translation products that can
 handle APL.  The difficulty is probably the parallel operations on generic
 arrays of dynamically differing size and dimension.  It could be done in
 C++, Ada, LISP, or other languages, but I have not seen it done.

   Bill Hutchison"
--
Bill Hutchison, DP Consultant   rutgers!cbmvax!burdvax!ubbpc!wgh
Unisys UNIX Portation Center    "Unless you are very rich and very eccentric,
P.O. Box 500, M.S. B121         you will not enjoy the luxury of a computer
Blue Bell, PA 19424             in your own home", Edward Yourdon, 1975.



Mon, 19 Apr 1993 13:06:00 GMT  
 Translating to/from APL


Quote:
>  No, I have not seen any programming language translation products that can
> handle APL.  The difficulty is probably the parallel operations on generic
> arrays of dynamically differing size and dimension.  It could be done in
> C++, Ada, LISP, or other languages, but I have not seen it done.

I am not sure what the original question was, Hutchinson did not say,
but translation tools from APL to other languages do exist.

One example is the APL compiler written by Tim Budd.
A key part of his APL compiler is a tool that translates
a moderately restricted subset of APL to C for compilation.
Of course Budd goes much further, since he also provides the
hooks that allow the compiled code to be integrated with the
other interpreted code in the workspace.

The company STSC provides a compilation service on their mainframe
product.  This APL compiler was developed under the leadership of
Clark Wiedmann.

Finally, there is an APL to Ada translator developed by a major
supplier of software to the US government.  The creation of this
tool was stimulated by the ease of software development in APL
and the requirement of the buyer that their software written in Ada.

--
    L. J.{*filter*}ey, Faculty of Mathematics, University of Waterloo.





Wed, 19 May 1993 13:04:00 GMT  
 Translating to/from APL

Quote:


> >  No, I have not seen any programming language translation products that can
> > handle APL.  The difficulty is probably the parallel operations on generic
> > arrays of dynamically differing size and dimension.  It could be done in
> > C++, Ada, LISP, or other languages, but I have not seen it done.

> I am not sure what the original question was, Hutchinson did not say,
> but translation tools from APL to other languages do exist.

  Sorry, I intended this to be a personal reply, not a broadcast one.

Quote:
> One example is the APL compiler written by Tim Budd.

  Who and where is Tim Budd?

Quote:
> A key part of his APL compiler is a tool that translates
> a moderately restricted subset of APL ...

  How restricted?

Quote:
> to C for compilation.
> Of course Budd goes much further, since he also provides the
> hooks that allow the compiled code to be integrated with the
> other interpreted code in the workspace.

  Does this mean the C version cannot be run except under the control of
an APL interpreter?

Quote:
> The company STSC provides a compilation service on their mainframe
> product.  [ ... ]

  This is not translation to another language (or is it?).

Quote:
> Finally, there is an APL to Ada translator developed by a major
> supplier of software to the US government.  The creation of this
> tool was stimulated by the ease of software development in APL
> and the requirement of the buyer that their software written in Ada.

  Specifics, please?

Quote:
> --
>     L. J.{*filter*}ey, Faculty of Mathematics, University of Waterloo.



 Prof.{*filter*}ey:

  You left some technical issues unanswered...

  Isn't it the case that all these APL translators must include an
interpretive runtime module?  Thus, translating to another language is not
complete unless one also has the runtime.

--
Bill Hutchison, DP Consultant   rutgers!cbmvax!burdvax!ubbpc!wgh
Unisys UNIX Portation Center    "Unless you are very rich and very eccentric,
P.O. Box 500, M.S. B121         you will not enjoy the luxury of a computer
Blue Bell, PA 19424             in your own home", Edward Yourdon, 1975.



Wed, 19 May 1993 22:18:00 GMT  
 Translating to/from APL

Quote:


>> >  No, I have not seen any programming language translation products that can
>> > handle APL.  The difficulty is probably the parallel operations on generic
>> > arrays of dynamically differing size and dimension.  It could be done in
>> > C++, Ada, LISP, or other languages, but I have not seen it done.

>> I am not sure what the original question was, Hutchinson did not say,
>> but translation tools from APL to other languages do exist.

>> One example is the APL compiler written by Tim Budd.

>  Who and where is Tim Budd?

He's at Oregon State, and has a book, An APL Compiler, which I believe is
a modified version of his disseration.

Quote:
>> The company STSC provides a compilation service on their mainframe
>> product.  [ ... ]
>> Finally, there is an APL to Ada translator developed by a major
>> supplier of software to the US government.  The creation of this
>> tool was stimulated by the ease of software development in APL
>> and the requirement of the buyer that their software written in Ada.

There is also The Yorktown APL Translator (YAP) done by a group at IBM.
Details can be found in Compiling APL: The Yorktown APL Translator,
Graham C. Driscoll and Donald L. Orth, IBM J. Res Develop. Vol 30,
No 6, 1986.   This is a translator from APL to fortran.
Given a set of APL functions, they translate at the function level: if it
is decided that a particular function, and all functions it calls can be
translated, this is done.  There are a set of criteria used to decide if
a function is translatable (bad functions use things like Execute with
unknown values, Quad Input, dynamic function creation, gotos to nonlabels
and other difficult to compile constructs.  Also deemed bad are
computations using variables whose rank cannot be inferred at compile time
(they seem to do some pretty clever stuff in order to determine rank).
They also allow the programmer to insert comments of a certain form
into the code to specify further information not deducible from the
program itself.  These comments are used by the translator to generate
better code.

        Jay Sipelstein



Wed, 19 May 1993 00:40:00 GMT  
 Translating to/from APL

Quote:

>> One example is the APL compiler written by Tim Budd.

>  Who and where is Tim Budd?

I'm tim budd.  I'm currently at oregon state university,

Quote:

>> A key part of his APL compiler is a tool that translates
>> a moderately restricted subset of APL ...

>  How restricted?

The APL compiler is described in a book called ``An APL Compiler'',
published by Springer-Verlag.  See the appendix for details.

Quote:

>  Does this mean the C version cannot be run except under the control of
>an APL interpreter?

No. The compiler is a traditional batch style compiler, which produces a
C program which is then compiled.

Quote:

>  Isn't it the case that all these APL translators must include an
>interpretive runtime module?  Thus, translating to another language is not
>complete unless one also has the runtime.

Not if you toss out the execute function.

My code is available via anonymous ftp from cs.orst.edu, directory
pub/budd/apl.  Warning - it is research software, guaranteed to be buggy
with no support.  Use at your own risk.

--tim budd



Wed, 19 May 1993 17:19:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Translating to/from APL

2. Translating COMPLEX.AWS from STSC APL-PLUS to generic APL

3. Linear regression: how to translate APL formula

4. translating APL to J

5. translating apl to J

6. I-APL, Vanguard APL, and APL.68000

7. Trying to hire APL and DYALOG APL for Dallas

8. Converting Dyalog APL Multiple Assignments to APL*PLUS

9. Special Functions for APL (and making APL atractive for Science)

10. APL! (APL bang)

11. APL News and I-APL (New World)

12. Whither APL or wither APL ??

 

 
Powered by phpBB® Forum Software