bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Major dimension problem


From: Elias Mårtenson
Subject: Re: [Bug-apl] Major dimension problem
Date: Sun, 25 May 2014 18:08:04 +0800

Wow. Nasty. That goes to show how subtle these optimisations are. I've spent some more time coming up with a new proposal how to eliminate the excessive copying, and this bug shows just how hard it is to get right.

Anyway, I'll post a new thread at a later time with my ideas.

Regards,
Elias

On 25 May 2014 18:01, "Juergen Sauermann" <address@hidden> wrote:
Hi,

Oops - this is created by an optimization that fired back:

      ]log 38
    Log facility 'optimization messages               ' is now ON
      ⍴⍬
0
      0 42 42⍴⍬
optimizing A⍴B
      ⍴⍬
0 42 42

I will look into this. In the meantime you could change line 144 in PrimitiveFunction.cc from

   if (len_Z <= len_B && B->is_temp())

to:
   if (0)

/// Jürgen


On 05/24/2014 09:30 PM, David B. Lamkins wrote:
(I'm adding Jürgen to the Cc: list. I have evidence that this may not be
related to gnu-apl-mode, but rather to gnu-apl itself.)

It appears that reshape is somehow mutating certain empty objects to
which is applied.

      0 0⍴⍬
      ⍴⍬
0 0
      0 0⍴''
      ⍴''
0

The above is from my gnu-apl-mode session. Interestingly, I *do* see the
bug when reshaping zilde, but *not* when reshaping the empty character.

Here's the interesting bit: I *can* reproduce the reshape zilde bug
without gnu-apl-mode. The transcript in GNU APL by itself (started in a
Bash shell as `$ apl`) is identical to the transcript shown above.

Furthermore, here's evidence to suggest that the bug may only be tickled
by a reshape of a constant value. (This is a transcript of a
gnu-apl-mode session after having restarted APL to clear the mutated
zilde.)

      b←⍬
      ⍴b
0
      0 0⍴b
      ⍴b
0
      ⍴⍬
0
      0 0⍴⍬
      ⍴⍬
0 0
      ⍴b
0


On Sat, 2014-05-24 at 10:57 -0500, Blake McBride wrote:
More interesting facts in emacs mode:


      ⍴''
0
      1 1⍴' '
 
      ⍴''
0
      0 0⍴' '  ⍝ reshape of space
      ⍴''
0
      0 0⍴''  ⍝  reshape of quote quote
      ⍴''
0 0
      )CLEAR
CLEAR WS
      ⍴''
0 0











reply via email to

[Prev in Thread] Current Thread [Next in Thread]