Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!wupost!darwin.sura.net!haven.umd.edu!socrates!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: Bug in J 4.1 ??
In-Reply-To: HAC041@DJUKFA11.BITNET's message of 3 Mar 92 11:44:34 GMT
Message-ID: <ROCKWELL.92Mar3081108@socrates.umd.edu>
Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Organization: Traveller
References: <92062.154800HAC041@DJUKFA11.BITNET> <ROCKWELL.92Mar3005349@socrates.umd.edu>
	<92063.114434HAC041@DJUKFA11.BITNET>
Date: Tue, 3 Mar 1992 13:11:08 GMT

Konrad Hinsen:
   I see your point, but still the situation remains confusing for me.

Hmm... I suppose it might be confusing, a variant of that seems to
dump core on me (which _is_ a J bug, and implies that there is an
untested assumption or two in the code):

   f =. a&+
   a =. 1
   f f. 1

KH:
   Your explanation seems to imply that when defining a verb in terms
   of a previously undefined verb, fixed values for the latter's ranks
   are assumed. But then applying f. shouldn't change these ranks;
   according to what the dictionary says about f., it should never
   change the behaviour of the fixed verb in any way, as long as no
   verbs used in the original definition are changed.

The dictionary definition of f. makes few claims about what it does,
since it only talks about the result of applying f. to a specific
case:

 If  sum=+/  and  g=sum f.\  then the berb sum is _fixed_ in the
 definition of g in the sense that subsequent changes in the
 definition of sum will not affect the definition of g.  ...

It just so happens that sum is a verb with infinite rank.

I dunno, maybe you're right.  Version 4 is different from version 3.4,
in that f. will resolve names which are parts of gerunds (e.g.
a`b@.(0&=)  ), so maybe a later version will fix the behavior you're
concerned with.  [I've barely even looked at that part of the code, so
I've no idea how hard it is to alter.]

   Another problem: how can I find out that infinite rank was assumed
   in the second definition of 'table'? Suppose someone presents me a
   J session with some definitions already entered, how can I
   distinguish between the two variants of my example given above?
   Normally I would display the definitions of 'op' and 'table' to
   deduce their behaviour, but the definitions look identical, just
   their behaviour isn't.

Yes, well, ... you're right.

-- 
Raul Deluth Miller-Rockwell                   <rockwell@socrates.umd.edu>
