FW: converting apl2 to j 
Author Message
 FW: converting apl2 to j

Following is from a reply to a conversion question.

Does anyone have experience with converting significant quantities of Apl2
to J ?

Is it possible to trace and step through J verbs ?


 ---------- reply follows --------------------------

Subject: RE: converting apl2 to j
Date: 17. July 1995 10:11

> We are looking for some experience reports on converting significant

quantities of code from APL to J.

This is a very interesting question and as for many interesting questions
there is no easy answer.

Apl2 is significantly different from J as you probably already know

As far as I know there are no such reports available.

I would imagine that not many people have done any converting of significant
quantities of code from Apl2 to J.

Simple Apl2 as well as any simple APL is relatively easy and straight
forward. Mostly replacing the apl chars with corresponding J/ASCII chars.

I personally have not done much converting of advanced Apl2 code to J
in most cases a rewrite is necessary.

Problem is of course that most interesting systems are using the advanced
of the systems and can therefore be very hard to convert.

Not only is the boxing mechanism different but the way you write verbs
(functions) is
also significantly different.

I certainly do not want to deter you from continuing. I think this kind of
effort is to be
recommended and you will benefit from it in the end.

What I would do is get a hold of the book Strand is said being working on.

(my question to comp.lang.apl recently.....

>Has anyone done any kind of index where old APLers could look up their apl
>operations and get the corresponding syntax in J ?

 Strand Software will be releasing a new J text called the "J Phrasebook"
 which sounds like what you want.)

I have not seen it yet but this kind of book would probably help you in your


You will probably need to take each function in the system and analyse it
create corresponding J verb or use some of the utilities that come with the

You most probably need to look at the datastructures your system is using
see if it needs to be converted first before you begin converting the code.

My experience tells me that the structure of the data is often the most
part of the project. Get the structures right and the rest of the job is

Breaking the system into well defined objects is also very important and use
utilities. If you can do that then you can use locales in J to isolate
groups of verbs
and execute them there without the risk of interfering with the rest of the
Locales are similar to the QuadNA in APL2 only easier to use.

One thing that could be a difficult part of your conversion phase is tracing
verbs you yourself create.

I do not know how you do that in J.

Individual lines are easy. You just enter them on the terminal or execute
from a script one by one.

How you step through a verb in J is something I do not know how to do yet.

I think I will send this to the comp.lang.apl forum and see if someone can
help us
on this issue.

Being able to take your Apl2 code and mechanically convert it to J would
that you would need an option of being able to step through the verbs and/or
what is going on and analyse things as you go along.

This is particularly important when the verb does not fail to operate
because you
need to know if it performed the operation you expected it to. Being able to
the data before and after without adding a loads of control lines in the
verbs is
essential to the work you are about to do.

As far as I know there is no easy way of taking an Apl2 WS and let some verb
operate on it to create J verbs or scripts though it is certainly something
of interest.

In any case I believe there is going to be quite a lot of manual effort in
such an
undertaking. I also believe it will be worth your while.


Fri, 02 Jan 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Fw: Re: linking to an external routine in ibm apl2/win -- figured

2. How Convert MS EXCEL Spreadsheet to an APL2 Array

3. Converting APL2 defined operators to APL*PLUSII WORKSPACE

4. Converting APL2 to J

5. Fw: Fw: Beyond Java?

6. Fw: Fw: Beyond Java?

7. Fw: Fw: startup and x86 ALU

8. FW: FW: Compiling Python v1.5 with DJGPP

9. APL2/2 to APL2/W95/NT

10. Fw: Re: what would be a GREAT way to do these in APL2?

11. Need help with assembler program - convert.asm - convert.asm (1/2)

12. Need help with assembler program - convert.asm - convert.asm (2/2)


Powered by phpBB® Forum Software