Re: DS_BINARY_SEARCH_TREE status ?
Eric Bezault <[email protected]> Tue, 07 Jul 2009 16:43:48 +0200
| Newsgroups | gmane.comp.lang.eiffel.gobo.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniel,
You might also want to have a look at this other bug report that
Jann sent to the Gobo users mailing list:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi,
there seems to be a bug in {DS_BINARY_SEARCH_TREE_SET}.copy .
The problem is, that internal_cursor is still Void when copy is called
(by .twin). The Void call happens on internal_cursor.off .
Jann
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jann Röder wrote:
> Hi Daniel,
> I don't have a sample for all bugs. I will probably try to reproduce it
> again later, but for starters:
>
> * subtract does not reset the found_item, thus causing weird behavior in
> has_key. The has_key implementation seems strange anyway. Why do you use
> a class variable as iterator. Locals are faster and easier to
> understand. I think the search feature should set found_item to Void in
> the beginning.
>
> * subtract seems to remove the wrong node. It seems to remove the
> successor of the node that holds the item. In my code the postcondition
> is_disjoint fails.
>
> * After changing subtract to remove the node which contains the item, I
> got other weird contract violations (it claimed that l_node was not in
> the same tree)
>
> Jann
>
> Daniel Tuser schrieb:
>> Jann Röder wrote:
>>> Hi,
>>> I was wondering what the status of the DS_BINARY_SEARCH_TREE_* classes
>>> is. I was trying to use the DS_RED_BLACK_TREE_SET and found it to be
>>> quite buggy. I already spent several hours trying to fix the subtract
>>> feature. But fixing one bug always seems to uncover another one, which
>>> is quite frustrating.
>>>
>> Hi Jann
>> I am not aware of bugs in the implementation. All tests passed as far as
>> I know. If you send me a reproduction, I may have a look at the problem.
>>> Thanks,
>>> Jann
>
--
Eric Bezault
mailto:[email protected]
http://www.gobosoft.com
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry