>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: System shutdown on this piece of code...
Alain.AMIOUNI
System shutdown on this piece of code...
Posted: Thursday, August 04, 2005 10:44 AM (EST)

(APL+Win 5.2.10 Win98SE)

System shutdown on the following:

 

A„1›0½›0 0
††A

 

Deadly prototypes...

 

Any comments from support about the scan operator problem I reported lately?

 


Comments:

Author Thread:
brent.hildebrand
System shutdown on this piece of code...
Posted: Thursday, August 04, 2005 8:55 PM (EST)

What Evolution Level do you have set?   I believe that diadic enclose (partition enclose) is EVLEVEL 1 only.  In EVLEVEL 2, use []PENCLOSE.  John?

 

     

Alain.AMIOUNI
Brent
Posted: Friday, August 05, 2005 7:41 PM (EST)

APL+Win defaults to Evolution 2

and I do not modify this setting.

Partition enclose is an Evolution 2

primitive.

 

You could try this on your system.

On Win98SE it triggers a page fault.

 

††1›0½›¼3

 

Follows the Windows Error Report

 

APLW a causé une défaillance de page dans
 le module APLW.EXE à 016f:0054e92d.
Registres :
EAX=00000000 CS=016f EIP=0054e92d EFLGS=00010246
EBX=01220060 SS=0177 ESP=008df7a8 EBP=00000002
ECX=00000001 DS=0177 ESI=01220060 FS=1a2f
EDX=0000001c ES=0177 EDI=00000004 GS=0000
Octets à CS : EIP :
8b 48 04 5f 41 5e 89 48 04 5b c3 8a 48 0b 84 c9
État de la pile :
00000018 01220060 00000000 00571ec3 01220060 00000800 006003b0 0d1bea8e 005322ff 00000000 01220030 00000001 00531edb 006003b0 00567b01 00000000

     

Alain.AMIOUNI
Brent
Posted: Friday, August 05, 2005 8:38 PM (EST)

 

 I guess you typed Evolution 1 meaning in fact Evolution 2.

To sum it up, the crash occurs as I use the "modern" 

 Partition (enclose) in  a "modern" context !

 

 Alain.

     

brent.hildebrand
Brent
Posted: Friday, August 05, 2005 10:16 PM (EST)

No, I think I mean exactly what I said.  Partition Enclose ( the diadic enclose ) is EVLEVEL 1 only.   It is not defined in EVLEVEL 2.  In that case, you use the quad function []PENCLOSE.

 

From the on-line helps:

 

Partitioned Enclose (evolution level 1 only)
Using the ones in L as starting points, convert sections of array R into nested scalars, making a nested vector. L is a boolean vector the length of the last (or ith) dimension of R. To generate this behavior at evolution level 2, use ŒPENCLOSE.
 
A „ L › R or A „ L ›[i] R
 
Example
½¨1 0 0 1 0 0 0 1 0 0 › 8 10 ½ ¼80
8 3 8 4 8 3 
Note: See the description of Œpenclose for the Evolution Level 1 dyadic ›, Partitioned enclose.

     

brent.hildebrand
Brent
Posted: Friday, August 05, 2005 10:19 PM (EST)
Perhaps, the problem really is, that the interpreter should have thrown an EVOLUTION ERROR instead of crashing?  Regardless, the solution is to use []PENCLOSE.

     

Support
Brent
Posted: Saturday, August 06, 2005 12:16 AM (EST)
Brent is almost correct.  In evolution 2, the interpreter should have reported a NONCE ERROR instead of terminating APL+Win. 

Alain, thank you for reporting this bug.

APL2000 Support

     

brent.hildebrand
Re:Brent
Posted: Saturday, August 06, 2005 2:33 AM (EST)
How did my name become the subject of this thread? <g>

     

Alain.AMIOUNI
Partition
Posted: Monday, August 08, 2005 10:58 AM (EST)

In the APL+Wins Manuals whether printed (p60 of the User's Manual)

or in Word format, the partition primitive is referred to as of Evolution

Level 2.

The confusion arises from the unfortunate denominations similarity.

"Partition" referring to the current, up-to-date,  partition primitive and

"Partitioned Enclose "  to its ancient form whose QuadPenclose is

the cover function allowing to emulate this obsolete "Dyadic <" at

Level 2 so that its left argument be interpreted as expected.

That is, not as the modern APL+Win partion primitive, identical in

every respect to its APL2 workstation counterpart, would understand it.

QuadPenclose is all the more necessary that Partion, unlike Partitioned

Enclose, always treat zeroes as compression specifications.

Since the partition primitive does partition and enclose its right argument,

one is tempted to use the "Partittion Enclose" or the above mentioned

"Partitioned Enclose" expressions instead of simply "Partition", thereby

adding to the confusion.

The "genuine" partition primitive operates smoothly at Evolution Level 2

without any Evolution Level related message. Interprting its left argument

as APL2 does.

The bug I have reported crops up when the prototype of the first item

of the result of the application of the partition primitive to an empty but

nested right argument, is accessed.

If you break down the process as below, the crash will occur when

the protype of A's first item is referenced, not before.

This bug is not related to any predictable behaviour of the interpreter

and presumably results, as well as the two previous bugs I reported,

from the use of non-initialized or non-updated pointers, somewhere

in the prototypes implementation code.

Snags of this kind are almost unavoidable in very large C-programs.

 

A„1›0½›¼3
††A

 

 

 

 

 

 

 

 

 

 

 

     



APL2000 Official Web Site

Most good judgment comes from experience. Most experience comes from bad judgment.
--- Anonymous

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |