What is meaning of class RexxDictionary in NetRexxR?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

What is meaning of class RexxDictionary in NetRexxR?

George Hovey-2
Unfortunately, neither I nor Wikipedia know what a "DMSRVA tree" is.
George


/* IBM Materials Licensed under International Components for Unicode  */
/* Licence version 1.8.1 (ICU Licence) - Property of IBM              */
/* IBM NetRexx                                                        */
/* Copyright (c) 1995-2009 IBM Corp.                                  */
/* Copyright (c) 2011- RexxLA                                         */
/* ------------------------------------------------------------------ */
/* netrexx.lang.RexxDictionary                                        */
/* ------------------------------------------------------------------ */
/* Copyright IBM Corporation, 1996, 1997.  All Rights Reserved.       */
/* Author    Mike Cowlishaw                                           */
/*                                                                    */
/* A Dictionary indexed by (Rexx) strings rather than by object       */
/* references.                                                        */
/*                                                                    */
/* Later: extend to be a full subclass of Dictionary, perhaps using   */
/*        DMSRVA trees.                                               */
/*                                                                    */
/* ------------------------------------------------------------------ */
/* 96.06.23 Initial version in NetRexx                                */
/* ------------------------------------------------------------------ */
package netrexx.lang
options binary strictargs nodecimal noformat  nodiag

/**
   This defines the primary dictionary class for NetRexx.
 */

class RexxDictionary /* implements Dictionary */

--- currently on hold; using Hashtable in Rexx.nrx                                     --#


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: What is meaning of class RexxDictionary in NetRexxR?

rvjansen
Must be a mainframe (Classic) Rexx structure, there is a google hit for:


which states that dmsrva is a new module for VM SP release 3.

Also, there is a message from a terminal interface block; IRX also hints at Rexx

4 DECIMAL 248 TIB2TV2F IRXTVARS TERMINATED DUE TO A FAILURE IN DMSRVA

best regards,

René.




On 10 okt. 2011, at 16:53, George Hovey wrote:

Unfortunately, neither I nor Wikipedia know what a "DMSRVA tree" is.
George


/* IBM Materials Licensed under International Components for Unicode  */
/* Licence version 1.8.1 (ICU Licence) - Property of IBM              */
/* IBM NetRexx                                                        */
/* Copyright (c) 1995-2009 IBM Corp.                                  */
/* Copyright (c) 2011- RexxLA                                         */
/* ------------------------------------------------------------------ */
/* netrexx.lang.RexxDictionary                                        */
/* ------------------------------------------------------------------ */
/* Copyright IBM Corporation, 1996, 1997.  All Rights Reserved.       */
/* Author    Mike Cowlishaw                                           */
/*                                                                    */
/* A Dictionary indexed by (Rexx) strings rather than by object       */
/* references.                                                        */
/*                                                                    */
/* Later: extend to be a full subclass of Dictionary, perhaps using   */
/*        DMSRVA trees.                                               */
/*                                                                    */
/* ------------------------------------------------------------------ */
/* 96.06.23 Initial version in NetRexx                                */
/* ------------------------------------------------------------------ */
package netrexx.lang
options binary strictargs nodecimal noformat  nodiag

/**
   This defines the primary dictionary class for NetRexx.
 */

class RexxDictionary /* implements Dictionary */

--- currently on hold; using Hashtable in Rexx.nrx                                     --#

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

RE: What is meaning of class RexxDictionary in NetRexxR?

Mike Cowlishaw
In reply to this post by George Hovey-2
Using Hashtable is probably sufficient for this. 
 
The "DMSRVA tree" is a novel data structure developed/invented by the late Laurie Griffiths and me around 1980.  It was optimized for Rexx variables lookup, with the cost of an addition/change to a variable and the cost of a lookup balanced to match the expected/measured frequency of those operations in typical Rex[x] programs.   
 
'DMS' was the three-letter prefix for all Rexx modules at the time; 'RVA' was short for "Rexx VAriables" .
 
Below is the overview of the DMSRVA tree, from the DMSRVA assembler source.  Nowadays I'd probably first consider a treap for this rather than a special form of tree.
 
Mike
 
* Variables Data structure -                                            01940000
*                                                                       01950000
*   The names of variables are held in a balanced binary tree.          01960000
*   The tree is balanced in the sense that when any new node is         01970000
*   added, the depth of left and right subtrees are 'balanced'.         01980000
*   Depth means the longest path down through the subtree from          01990000
*   the subtree root to a leaf.  Adjustment will take place if          02000000
*   the left and right depths differ by more than 1.  Currently         02010000
*   no node is deleted unless the whole subtree is deleted.             02020000
*   Balancing is applied to each node in turn from where a new          02030000
*   leaf is added to the root of the tree.  The adjustment of           02040000
*   a single node is not guaranteed to improve things (but will         02050000
*   make them no worse).  The balancing act applied to the              02060000
*   whole path will ensure that the degree of imbalance is              02070000
*   limited, and in particular trees with long paths containing         02080000
*   only one branch (i.e. either right or left subtree empty)           02090000
*   are impossible.  Such paths would give performance no               02100000
*   better than a simple linear search.                                 02110000
*                                                                       02120000
*   Each node of the tree is a VARBLOK.  The tree is sorted in          02130000
*   that all variables within a left subtree will have names no         02140000
*   longer than that of its root node.  Those with names the            02150000
*   same length will be alphabetically earlier (as defined by           02160000
*   CLC and BL).  For simple variables (no dots in name) that           02170000
*   is the whole story.  For complex variables (e.g. 'AB.I.J.')         02180000
*   only the stem of their name ('AB.') will be in the primary          02190000
*   tree.  The rest of the name ('I.J.') after any substitution         02200000
*   will lie in another tree whose anchor is pointed to by              02210000
*   VBPTR.  Note that the rest of the name can be null if the           02220000
*   substituted value is null, and in this case the "name" in           02230000
*   the subtree will be the null string.                                02240000
*                                                                       02250000
*   For EXPOSEd variables of procedures, the VBPTR high order           02260000
*   bit means that this pointer leads to an earlier generation,         02270000
*   (which in turn may, via the next VBPTR, lead to earlier             02280000
*   generations).  For EXPOSE of a stem, the VBPTR will point           02290000
*   directly to the real anchor block, without intermediate             02300000
*   chaining.  (Since an anchor cannot be extended, there is            02310000
*   no danger in having multiple pointers to it.)                       02320000
*                                                                       02330000
*   A block which is a dummy block, merely acting as a "place-          02340000
*   holder" for an EXPOSE is marked by both VBPTR and VBLEN             02350000
*   being 0.  A variable which has been dropped is marked by            02360000
*   VBPTR=0 and VBLEN=-1.                                               02370000
         EJECT                                                          02380000
* Picture of tree with the following variables:-                        02390000
*   A   = 'abc'                                                         02400000
*   B   = '15'                                                          02410000
*   C used to have the value 92 but has been dropped                    02420000
*   D   = '3'                                                           02430000
*   AA  = '2'                                                           02440000
*   A.  = '21'                                                          02450000
*   A.1 = '12'                                                          02460000
*   A.2 = '31'                                                          02470000
         SPACE                                                          02480000
* Nodes are shown as (left:right:vbptr:name:data)                       02490000
* A null pointer is shown as 0                                          02500000
* Near to each node is shown the full name of the variable it           02510000
*   represents.  The node shown for A.? is the node for all             02520000
*   variables beginning 'A.' which holds the anchor block for           02530000
*   the secondary tree.                                                 02540000
         SPACE 2                                                        02550000
* ROOTADDR-------------->(|) anchor block                               02560000
*                         |    +---+                                    02570000
*                         |    |   |                                    02580000
*                         v    |   v                                    02590000
*                         (|:|:|:D:3)     D                             02600000
*                          | |                                          02610000
*                          | +--------------+                           02620000
*    +---------------------+                |                           02630000
*    |    +---+                             |    +------+               02640000
*    |    |   |                             |    |      |               02650000
*    v    |   v                             v    |      v               02660000
*    (|:|:|:B:15)   B              A.?      (|:0:|:A.:  (|))            02670000
* +---+ |                                    |           |              02680000
* |     +-------+               +------------+           |              02690000
* |    +---+    |               |    +----+              |              02700000
* |    |   |    |               |    |    |              |              02710000
* v    |   v    v               v    |    v              |              02720000
* (0:0:|:A:abc) (0:0:0:C:92)    (0:0:|:AA:2)             |              02730000
*                                                        |              02740000
* A             C (dropped)     AA                       |              02750000
*                                                        |              02760000
*                        +-------------------------------+              02770000
*                        |    +---+                                     02780000
*                        |    |   |                                     02790000
*                        v    |   v                                     02800000
*                        (|:|:|:1:12)   A.1                             02810000
*             +-----------+ |                                           02820000
*             |             +------------------+                        02830000
*             |    +--+                        |    +---+               02840000
*             |    |  |                        |    |   |               02850000
*             v    |  v                        v    |   v               02860000
*             (0:0:|::21)   A.           A.2   (0:0:|:2:31)             02870000
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of George Hovey
Sent: 10 October 2011 15:54
To: IBM Netrexx
Subject: [Ibm-netrexx] What is meaning of class RexxDictionary in NetRexxR?

Unfortunately, neither I nor Wikipedia know what a "DMSRVA tree" is.
George


/* IBM Materials Licensed under International Components for Unicode  */
/* Licence version 1.8.1 (ICU Licence) - Property of IBM              */
/* IBM NetRexx                                                        */
/* Copyright (c) 1995-2009 IBM Corp.                                  */
/* Copyright (c) 2011- RexxLA                                         */
/* ------------------------------------------------------------------ */
/* netrexx.lang.RexxDictionary                                        */
/* ------------------------------------------------------------------ */
/* Copyright IBM Corporation, 1996, 1997.  All Rights Reserved.       */
/* Author    Mike Cowlishaw                                           */
/*                                                                    */
/* A Dictionary indexed by (Rexx) strings rather than by object       */
/* references.                                                        */
/*                                                                    */
/* Later: extend to be a full subclass of Dictionary, perhaps using   */
/*        DMSRVA trees.                                               */
/*                                                                    */
/* ------------------------------------------------------------------ */
/* 96.06.23 Initial version in NetRexx                                */
/* ------------------------------------------------------------------ */
package netrexx.lang
options binary strictargs nodecimal noformat  nodiag

/**
   This defines the primary dictionary class for NetRexx.
 */

class RexxDictionary /* implements Dictionary */

--- currently on hold; using Hashtable in Rexx.nrx                                     --#


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: What is meaning of class RexxDictionary in NetRexxR?

rickmcguire
In reply to this post by rvjansen
D'oh, I should have picked up on that reference.  That is definitely
old, since at the time Netrexx was being written, DMSRVA had been
renamed to IXXRVA.  A dmsrva tree is a balanced binary tree that was
used for the Rexx variable tree in Mike's original classic Rexx
interpreter.  There's a C++ version of that code in ooRexx.  Not sure
you'd want to port that version to complete this implementation since
it did not handle deletions.  There is a fully ooRexx implementation
in one of the examples I used in a past symposium talk.

Rick

On Mon, Oct 10, 2011 at 11:32 AM, René Jansen <[hidden email]> wrote:

> Must be a mainframe (Classic) Rexx structure, there is a google hit for:
> http://bitsavers.org/pdf/ibm/370/VM_SP/SC24-5240-0_VM_SP_Release_3_Guide_Jul83.pdf
> which states that dmsrva is a new module for VM SP release 3.
> Also, there is a message from a terminal interface block; IRX also hints at
> Rexx
> 4 DECIMAL 248 TIB2TV2F IRXTVARS TERMINATED DUE TO A FAILURE IN DMSRVA
> best regards,
> René.
>
>
>
> On 10 okt. 2011, at 16:53, George Hovey wrote:
>
> Unfortunately, neither I nor Wikipedia know what a "DMSRVA tree" is.
> George
>
>
> /* IBM Materials Licensed under International Components for Unicode  */
> /* Licence version 1.8.1 (ICU Licence) - Property of IBM              */
> /* IBM NetRexx                                                        */
> /* Copyright (c) 1995-2009 IBM Corp.                                  */
> /* Copyright (c) 2011- RexxLA                                         */
> /* ------------------------------------------------------------------ */
> /* netrexx.lang.RexxDictionary                                        */
> /* ------------------------------------------------------------------ */
> /* Copyright IBM Corporation, 1996, 1997.  All Rights Reserved.       */
> /* Author    Mike Cowlishaw                                           */
> /*                                                                    */
> /* A Dictionary indexed by (Rexx) strings rather than by object       */
> /* references.                                                        */
> /*                                                                    */
> /* Later: extend to be a full subclass of Dictionary, perhaps using   */
> /*        DMSRVA trees.                                               */
> /*                                                                    */
> /* ------------------------------------------------------------------ */
> /* 96.06.23 Initial version in NetRexx                                */
> /* ------------------------------------------------------------------ */
> package netrexx.lang
> options binary strictargs nodecimal noformat  nodiag
>
> /**
>    This defines the primary dictionary class for NetRexx.
>  */
>
> class RexxDictionary /* implements Dictionary */
>
> --- currently on hold; using Hashtable in
> Rexx.nrx                                     --#
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: What is meaning of class RexxDictionary in NetRexxR?

Aviatrexx
On 10/10/11 16:01 Rick McGuire said:
> A dmsrva tree is a balanced binary tree that was used for
> the Rexx variable tree in Mike's original classic Rexx
> interpreter. ... There is a fully ooRexx implementation
> in one of the examples I used in a past symposium talk.

And, if I'm not mistaken, the only native ooRexx contribution to the
Wiki Sample Code section.  There are some OpenOffice.org code snippets
that require BSF4Rexx, and a dead-end link for some Lotus Notes code.

-Chip-

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: What is meaning of class RexxDictionary in NetRexxR?

ThSITC
In reply to this post by rickmcguire
I personally, at this time now (2011) would like to advise to use so called
RED-BLACK trees.....

They are auto-balancing, as far as I do understand this approach. :-)

Thomas Schneider.
===================================================
Am 10.10.2011 18:01, schrieb Rick McGuire:

> D'oh, I should have picked up on that reference.  That is definitely
> old, since at the time Netrexx was being written, DMSRVA had been
> renamed to IXXRVA.  A dmsrva tree is a balanced binary tree that was
> used for the Rexx variable tree in Mike's original classic Rexx
> interpreter.  There's a C++ version of that code in ooRexx.  Not sure
> you'd want to port that version to complete this implementation since
> it did not handle deletions.  There is a fully ooRexx implementation
> in one of the examples I used in a past symposium talk.
>
> Rick
>
> On Mon, Oct 10, 2011 at 11:32 AM, René Jansen<[hidden email]>  wrote:
>> Must be a mainframe (Classic) Rexx structure, there is a google hit for:
>> http://bitsavers.org/pdf/ibm/370/VM_SP/SC24-5240-0_VM_SP_Release_3_Guide_Jul83.pdf
>> which states that dmsrva is a new module for VM SP release 3.
>> Also, there is a message from a terminal interface block; IRX also hints at
>> Rexx
>> 4 DECIMAL 248 TIB2TV2F IRXTVARS TERMINATED DUE TO A FAILURE IN DMSRVA
>> best regards,
>> René.
>>
>>
>>
>> On 10 okt. 2011, at 16:53, George Hovey wrote:
>>
>> Unfortunately, neither I nor Wikipedia know what a "DMSRVA tree" is.
>> George
>>
>>
>> /* IBM Materials Licensed under International Components for Unicode  */
>> /* Licence version 1.8.1 (ICU Licence) - Property of IBM              */
>> /* IBM NetRexx                                                        */
>> /* Copyright (c) 1995-2009 IBM Corp.                                  */
>> /* Copyright (c) 2011- RexxLA                                         */
>> /* ------------------------------------------------------------------ */
>> /* netrexx.lang.RexxDictionary                                        */
>> /* ------------------------------------------------------------------ */
>> /* Copyright IBM Corporation, 1996, 1997.  All Rights Reserved.       */
>> /* Author    Mike Cowlishaw                                           */
>> /*                                                                    */
>> /* A Dictionary indexed by (Rexx) strings rather than by object       */
>> /* references.                                                        */
>> /*                                                                    */
>> /* Later: extend to be a full subclass of Dictionary, perhaps using   */
>> /*        DMSRVA trees.                                               */
>> /*                                                                    */
>> /* ------------------------------------------------------------------ */
>> /* 96.06.23 Initial version in NetRexx                                */
>> /* ------------------------------------------------------------------ */
>> package netrexx.lang
>> options binary strictargs nodecimal noformat  nodiag
>>
>> /**
>>     This defines the primary dictionary class for NetRexx.
>>   */
>>
>> class RexxDictionary /* implements Dictionary */
>>
>> --- currently on hold; using Hashtable in
>> Rexx.nrx                                     --#
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>>
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>>
>>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: What is meaning of class RexxDictionary in NetRexxR?

Aviatrexx
Wooo... does that make me feel old.

I took "Data Structures Design" before B-trees were invented.  Knuth
was still working on _Sorting_and_Searching_.  I had to learn all that
stuff on the job which, parenthetically, was probably where I first
encountered the 'theoretical vs. practical' disdain from my boss (an
accountant who was made Director of Data Processing because he knew
how to use a non-programmable mechanical accounting machine).

I think I need a nap...

-Chip-

On 10/11/11 16:34 Thomas Schneider said:

> I personally, at this time now (2011) would like to advise to use so called
> RED-BLACK trees.....
>
> They are auto-balancing, as far as I do understand this approach. :-)
>
> ===================================================
> Am 10.10.2011 18:01, schrieb Rick McGuire:
>> D'oh, I should have picked up on that reference.  That is definitely
>> old, since at the time Netrexx was being written, DMSRVA had been
>> renamed to IXXRVA.  A dmsrva tree is a balanced binary tree that was
>> used for the Rexx variable tree in Mike's original classic Rexx
>> interpreter.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: What is meaning of class RexxDictionary in NetRexxR?

ThSITC
Hello Chip,
    I'm already feeeling *old* (with my left heart, 65) as well.
As I do have also a right heart (13), I'm still in the process to:

    - survive
    - learn
    - etc etc

RED-BLACK Trees (simply Google, as you do like so much)
are the current state of the art for self-balancing trees.

There is a lot of (scientific) doc about this.

Enjoy the reading...

Thomas.

PS: I do have Knuth's books on my desk, but as you see, time is
progressing, as well as knowledge how to solve common problems.
===================================================
Am 11.10.2011 19:56, schrieb Chip Davis:

> Wooo... does that make me feel old.
>
> I took "Data Structures Design" before B-trees were invented.  Knuth
> was still working on _Sorting_and_Searching_.  I had to learn all that
> stuff on the job which, parenthetically, was probably where I first
> encountered the 'theoretical vs. practical' disdain from my boss (an
> accountant who was made Director of Data Processing because he knew
> how to use a non-programmable mechanical accounting machine).
>
> I think I need a nap...
>
> -Chip-
>
> On 10/11/11 16:34 Thomas Schneider said:
>> I personally, at this time now (2011) would like to advise to use so
>> called
>> RED-BLACK trees.....
>>
>> They are auto-balancing, as far as I do understand this approach. :-)
>>
>> ===================================================
>> Am 10.10.2011 18:01, schrieb Rick McGuire:
>>> D'oh, I should have picked up on that reference.  That is definitely
>>> old, since at the time Netrexx was being written, DMSRVA had been
>>> renamed to IXXRVA.  A dmsrva tree is a balanced binary tree that was
>>> used for the Rexx variable tree in Mike's original classic Rexx
>>> interpreter.
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com