Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!f.gp.cs.cmu.edu!sippy From: sippy@f.gp.cs.cmu.edu (Jay Sipelstein) Newsgroups: comp.lang.misc Subject: Re: Translating from APL (Was: Translating to/from APL) Keywords: APL language translators conversion Message-ID: <7221@pt.cs.cmu.edu> Date: 6 Dec 89 00:40:25 GMT References: <628@ubbpc.UUCP> <2811@water.waterloo.edu> <629@ubbpc.UUCP> Organization: Carnegie-Mellon University, CS/RI Lines: 47 In article <629@ubbpc.UUCP> wgh@ubbpc.UUCP (William G. Hutchison) writes: >In article <2811@water.waterloo.edu>, ljdickey@water.waterloo.edu (L.J.Dickey) writes: >> >> In article <628@ubbpc.UUCP> wgh@ubbpc.UUCP (William G. Hutchison) writes: >> >> > 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. >> 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 sippy@cs.cmu.edu