From modius.roman at gmail.com Sun Mar 18 05:53:43 2007 From: modius.roman at gmail.com (Modius Roman) Date: Sun, 18 Mar 2007 00:53:43 -0500 Subject: [cl-containers-devel] Possible RB-Tree bug in latest release Message-ID: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> I apologize in advance if I am misusing the library. I'm running in Win32 on Lispworks with a bunch of dependencies loaded through ASDF. I have the GZipped Tar file referenced on the CL-Containers download page. Easy repetition of the bug: (setf m (make-instance 'Red-Black-Tree)) (insert-item m 31) (size m) *; returns 1 as expected* (*delete-item* m 31) (size m) *; Should return 0, returns 1 instead.* (collect-elements m) Size returns 1, element list is empty. Size never decrements - put insert/delete in a loop of a million, size will become a million. Replace the top line with (setf m (make-instance 'binary-search-tree)) And the size goes up and down with insert/delete, as expected. I'd chase it down; but my lisp isn't incredibly strong and I figure the authors could track this down in 5 minutes. . . . Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Sun Mar 18 14:48:14 2007 From: gwking at metabang.com (Gary King) Date: Sun, 18 Mar 2007 10:48:14 -0400 Subject: [cl-containers-devel] Possible RB-Tree bug in latest release In-Reply-To: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> References: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> Message-ID: Hi, Thanks for the problem report. I'l l try to look at this later today. On Mar 18, 2007, at 1:53 AM, Modius Roman wrote: > > I apologize in advance if I am misusing the library. > > I'm running in Win32 on Lispworks with a bunch of dependencies > loaded through ASDF. > > I have the GZipped Tar file referenced on the CL-Containers > download page. > > > Easy repetition of the bug: > > (setf m (make-instance 'Red-Black-Tree)) > (insert-item m 31) > (size m) ; returns 1 as expected > (delete-item m 31) > (size m) ; Should return 0, returns 1 instead. > (collect-elements m) > > Size returns 1, element list is empty. Size never decrements - put > insert/delete in a loop of a million, size will become a million. > > Replace the top line with > (setf m (make-instance 'binary-search-tree)) > > And the size goes up and down with insert/delete, as expected. > > > I'd chase it down; but my lisp isn't incredibly strong and I figure > the authors could track this down in 5 minutes. . . . > > > Thanks, > Matt > > > > _______________________________________________ > cl-containers-devel mailing list > cl-containers-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Mon Mar 19 02:43:44 2007 From: gwking at metabang.com (Gary King) Date: Sun, 18 Mar 2007 22:43:44 -0400 Subject: [cl-containers-devel] Possible RB-Tree bug in latest release In-Reply-To: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> References: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> Message-ID: Hi Modius, I've verified the incorrect behavior and believe I have a fix; FWIW, the problem is only with the size method. Anything involving the contents of the red-black tree should work fine. I'll try to get the patch out sometime tomorrow. Thanks again for your report. On Mar 18, 2007, at 1:53 AM, Modius Roman wrote: > > I apologize in advance if I am misusing the library. > > I'm running in Win32 on Lispworks with a bunch of dependencies > loaded through ASDF. > > I have the GZipped Tar file referenced on the CL-Containers > download page. > > > Easy repetition of the bug: > > (setf m (make-instance 'Red-Black-Tree)) > (insert-item m 31) > (size m) ; returns 1 as expected > (delete-item m 31) > (size m) ; Should return 0, returns 1 instead. > (collect-elements m) > > Size returns 1, element list is empty. Size never decrements - put > insert/delete in a loop of a million, size will become a million. > > Replace the top line with > (setf m (make-instance 'binary-search-tree)) > > And the size goes up and down with insert/delete, as expected. > > > I'd chase it down; but my lisp isn't incredibly strong and I figure > the authors could track this down in 5 minutes. . . . > > > Thanks, > Matt > > > > _______________________________________________ > cl-containers-devel mailing list > cl-containers-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Mon Mar 19 20:22:53 2007 From: gwking at metabang.com (Gary King) Date: Mon, 19 Mar 2007 16:22:53 -0400 Subject: [cl-containers-devel] Possible RB-Tree bug in latest release In-Reply-To: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> References: <4d0256450703172253r7463089fp76647b0a64788540@mail.gmail.com> Message-ID: <3FF84366-39E7-4AB5-A37C-C5ED9E38E975@metabang.com> Hi Modius, I have fixed the code but wasn't able to upload it to common-lisp.net today (server problems, I think). I'll let you know when the fix does go out. thanks, On Mar 18, 2007, at 1:53 AM, Modius Roman wrote: > > I apologize in advance if I am misusing the library. > > I'm running in Win32 on Lispworks with a bunch of dependencies > loaded through ASDF. > > I have the GZipped Tar file referenced on the CL-Containers > download page. > > > Easy repetition of the bug: > > (setf m (make-instance 'Red-Black-Tree)) > (insert-item m 31) > (size m) ; returns 1 as expected > (delete-item m 31) > (size m) ; Should return 0, returns 1 instead. > (collect-elements m) > > Size returns 1, element list is empty. Size never decrements - put > insert/delete in a loop of a million, size will become a million. > > Replace the top line with > (setf m (make-instance 'binary-search-tree)) > > And the size goes up and down with insert/delete, as expected. > > > I'd chase it down; but my lisp isn't incredibly strong and I figure > the authors could track this down in 5 minutes. . . . > > > Thanks, > Matt > > > > _______________________________________________ > cl-containers-devel mailing list > cl-containers-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Wed Mar 21 17:49:19 2007 From: gwking at metabang.com (Gary King) Date: Wed, 21 Mar 2007 13:49:19 -0400 Subject: [cl-containers-devel] Announce: CL-containers 0.9.5 Message-ID: <1D2F35F4-25F3-4569-8D84-368920D83CA5@metabang.com> The main change is a fix for a bug first noticed by Modius Roman: [red-black][] trees were reporting an incorrect size whenever elements were deleted (the deletion was happening but the size was not going down). There are also a few minor cleanup bits and pieces in the system definitions but otherwise [CL-Containers][] remains your faithful friend. Enjoy [red-black]: http://en.wikipedia.org/wiki/Red_black_tree [cl-containers]: http://common-lisp.net/project/cl-containers/ -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM