Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

APL to C, Matlab, Fortran, or other language translators

230 views
Skip to first unread message

Larry Carlin

unread,
Nov 9, 1998, 3:00:00 AM11/9/98
to
Are there APL to C, Matlab, Fortran, or other language translators
available?

D E Siegel

unread,
Nov 9, 1998, 3:00:00 AM11/9/98
to
"Larry Carlin" <lca...@gilfillan.de.ittind.com>
writes:

>Are there APL to C, Matlab, Fortran, or other language translators
>available?
>
>

If you mean an automated utility that does this, than not as far as I know, not
commercially available ones, anyway. Bob Bernecky's APEX compiles APL to
SISAL, but with some limitations on the APL, and this is not a currently
available commercial product.

It might be better to extract the APL design and re-code if you really need to
convert existing APL to C or Fortran, as the best APL approach is not likely to
be the best approach in either of those languages.

What kind of project are you working on?

>


-David E. Siegel
Sie...@ACM.ORG

Brian B. McGuinness

unread,
Nov 10, 1998, 3:00:00 AM11/10/98
to
Larry Carlin wrote:

> Are there APL to C, Matlab, Fortran, or other language translators
> available?

The University of Waterloo APL site has a package called CAPLIB2
for Unix and DOS. This provides APL operations in the form of a C
library and would probably be useful in porting code from APL to C.
The read.me file says:

"With CAPLIB2 you can interactively explore problem solutions in APL.
Once you've found the best solution, if you need greater efficiency, you

can incorporate that logic in a C program through calls to routines in
the CAPLIB2 C-library.

"Any APL statement involving standard APL functions and operators can be

directly translated to a single C language statement using calls to
CAPLIB2 routines."

I also recall reading about an APL-to-Fortran translator for internal
IBM
use in one of the APL Conference Proceedings volumes. I don't know if
it
would be possible to arrange to buy a copy of it.

--- Brian

Larry Carlin

unread,
Nov 11, 1998, 3:00:00 AM11/11/98
to
The purpose of the search for an APL translator is that our company has a
system analyst that will soon retire who uses APL as his programming
language. He is the only person remaining in our company using APL.
Therefore we would like to find a means to run some of his code on new data
or modify his code to run on old or new data after he has retired.

Larry Carlin wrote in message <727div$od4$1...@nnrp03.primenet.com>...

D E Siegel

unread,
Nov 11, 1998, 3:00:00 AM11/11/98
to
"Larry Carlin" <lca...@gilfillan.de.ittind.com> wrote:

I urge you to either:

1) Hire a new employee who knows APL, or an APL consultant. (APL programmers
and consultants are available.)

or

2) Train one of your existing employees in APL. Training in APL programming is
available.

or

3) Before your employee retieres, get him to document the design of the APL
code in question, preferably working with a programmer in your desired target
language.

I doubt that an automated translation of existing APL xode will get you quality
code in another language which you will want to use, much less find it easy to
maintain and enhance.

-David E. Siegel
Sie...@ACM.ORG

Jim Lucas

unread,
Nov 16, 1998, 3:00:00 AM11/16/98
to
Hi Larry,

I missed your original post (probably because of a massive server failure
here recently), but here's my advice:

Programs that automatically translate APL into other languages? Not a
reasonable requirement. I don't even know of any programs that translate
among different versions of APL that don't require some "manual" adjustment
to finish the job.

A consultant to act as "translator" to convert these programs to another
language? Doable, perhaps, but possibly expensive, depending on the size
of the systems. And depending on the nature and complexity of the
programs, Fortran and even C may not be appropriate languages. Matlab,
perhaps. Actually, specifying what the programs do and rewriting them from
scratch in the "new" language would probably be more efficient than
"translating" the old programs. The appropriate internal structure will
almost certainly be quite different.

A consultant to do the occasional bit of maintenance and upgrade work?
Much more reasonable. There are many of us who could do that. Although I
wonder at your comment about "old" and "new" data. I hope you're not
suggesting that the programs have to be rewritten for each new set of raw
data. Any programs I write are designed to handle any set of data, if it's
structured appropriately, and it's even easy to write little utilities to
restructure the data, if it's otherwise appropriate to the analysis. Or by
"new data" do you mean data generated outside of APL. That shouldn't be
dificult.

On the other hand, if the functionality of the programs your analyst has
written haven't already been duplicated by other analysts working in other
languages, then either 1) they don't seem to need those programs/analyses,
or 2) the cost of duplicating the programs in another language has been a
barrier to doing so. In the latter case, it's just possible that having a
willing individual (or even several, if you can find them) trained in APL
might be an efficient alternative.

As I said, I think there are plenty of consultants who could do maintenance
work, probably still several who could do conversion or teaching. While I
myself could do either maintenance or teaching, if you're located in
America I may be too distant, since I live in Denmark. I wouldn't
currently volunteer for work involving other languages.

I'm sure a post to this group requesting consultants, rather than a
"translator" program would get you several replies.

By the way, you didn't mention what version of APL you're using.

Best of luck, /Jim Lucas

P.S. I originally tried sending this as a private reply, but it was
returned as undeliverable by System Administrator
<postm...@de.ittind.com>. Any idea why?

Larry Carlin <lca...@gilfillan.de.ittind.com> wrote in article
<72cttp$mag$1...@nnrp03.primenet.com>...

Alastair Kinloch

unread,
Nov 17, 1998, 3:00:00 AM11/17/98
to
The advice given in the other replies to this message is sound.
However, Bob Bernecky has done much work on automatic translation
from APL to other languages. As far as I know he offers this as
part of his consultancy services and does not sell a
"shrink-wrap" translator package.

Normally I would advise users of old, poorly documented APL
systems to perform a business analysis of the requirements and
design a new system using object-oriented methods such as
Rational Rose. In my experience, however, it is impossible to
obtain a budget and clients continue to pay a "mature" APL expert
to support and maintain their "legacy" systems. After about 5
years they probably spend more than it cost to rewrite the
system. I have no complaints about this because it puts bread in
the mouths of me and the other old APL programmers.

Alastair Kinloch, Mackay Kinloch Limited, Edinburgh, Scotland

--
Alastair Kinloch, Mackay Kinloch Limited, Edinburgh, Scotland

Email: 1000...@compuserve.com
WWW: http://ourworld.compuserve.com/homepages/Alastair_Kinloch

Sam Sirlin

unread,
Nov 17, 1998, 3:00:00 AM11/17/98
to
desi...@aol.com (D E Siegel) writes:

"Larry Carlin" <lca...@gilfillan.de.ittind.com>
writes:



>Are there APL to C, Matlab, Fortran, or other language translators
>available?

aplc can generate c from pretty near iso apl. It's not production
code, and is free, and definitely not for the drag-and-drop crowd.
It's also got some hooks so it can generate matlab .mex files
(dynamically linked). That way I can keep at least a basic set of apl
tools in matlab (encode, reshape, ... in fact apl's format is much
better than matlab's).

--
Sam Sirlin
Email: s...@kalessin.jpl.nasa.gov

0 new messages