The following crashes both J6 and J7 if debug is set, the test case is run,
then debug is turned off.

NB.* crashJ6NameMissing.ijs: name error->crash J6 and J7: run test case
under 13!:0]1,
NB. then 13!:0]0 when assertion fails.

NB. permutesTC1_TC1_: test that difference between y and its permutation
totals 0.
permutesTC1_TC1_=: 1 : 0
   assert. 0=+/y-u y
NB.EG aa=. permuteN permutesTC1_TC1_&.>1e3?@$&.>1e4?@$1e3
)

NB.* permuteN: re-arrange vector y->random permutation using standard RNG.
permuteN=: 3 : 0
   rnd=. ~.(i.sz),~<.sz*sz?@$0 [ sz=. #y
   y=. (y{~rnd) (|.rnd)}y
NB.EG permuteN i.10
)

Here are example sessions showing the problem in both J6 and J7.

NB. J6 session:
   JVERSION
Installer: j602a_win.exe
Engine: j602/2008-03-03/16:45
Library: 6.02.051
   load 'c:/amisc/J/NYCJUG/201105/crashJ6NameMissing.ijs'
   permuteN
3 : 0
   rnd=. ~.(i.sz),~<.sz*sz?@$0 [ sz=. #y
   y=. (y{~rnd) (|.rnd)}y
)
   permutesTC1_TC1_
1 : '   assert. 0=+/y-u y'

   aa=. permuteN permutesTC1_TC1_&.>1e3?@$&.>1e4?@$1e3
|assertion failure
|   0=+/y-u y

   13!:0]1
   aa=. permuteN permutesTC1_TC1_&.>1e3?@$&.>1e4?@$1e3
|value error: permuteN
|   0=+/y-    u y
|permutesTC1_TC1_[0]
      permuteN
|value error: permuteN
*   0=+/y-    u y
|permutesTC1_TC1_[0]
      permuteN_base_
3 : 0
   rnd=. ~.(i.sz),~<.sz*sz?@$0 [ sz=. #y
   y=. (y{~rnd) (|.rnd)}y
)
      13!:0]0


[Tue 04/26/2011 | 21:25:28.93 | C:\Program Files\j602\bin]
>

NB. J6 crashed (returned to DOS prompt)

NB. Try same with J7:

   JVERSION
Engine: j701/2011-01-10/11:25
Library: 7.01.048
Platform: Win 32
Installer: j701a_win.exe
InstallPath: c:/program files/j701

   load 'c:/amisc/J/NYCJUG/201105/crashJ6NameMissing.ijs'
   13!:0]1
   aa=. permuteN permutesTC1_TC1_&.>1e3?@$&.>1e4?@$1e3
|value error: permuteN
|   0=+/y-    u y
|permutesTC1_TC1_[0]
      $y
1000
      +/y-u y
|value error: permuteN
|   +/y-    u y
      u=. permuteN_base_
      +/y-u y
0
      13!:0]0

[Tue 04/26/2011 | 21:26:26.78 | C:\amisc\JSys\J7]
>

-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to