PR# 19894 Error within implementation of {ARRAYED_SET}.disjoint

Problem Report Summary
Submitter: rosivaldo
Category: EiffelBase
Priority: Low
Date: 2023/07/06
Class: Bug
Severity: Serious
Number: 19894
Release: 22.12 (22.12.10.6463 - win64)
Confidential: No
Status: Closed
Responsible:
Environment: win64
Synopsis: Error within implementation of {ARRAYED_SET}.disjoint

Description
The body of {ARRAYED_SET}.disjoint (version inherited from {TRAVERSABLE_SUBSET} has an error. It calls {TRAVERSABLE_SUBSET}.subset_strategy, that calls {LINEAR_SUBSET}.subset_strategy_selection with no check for the latter's precondition clause item_exists: v /= Void, causing a precondition violation if the {ARRAYED_SET} object contains a Void item.
To Reproduce
- Open and compile the st_bugs.ecf project (within st_bugs.7z).
- NOTICE: {ARRAYED_SET} precondition checking is turned on by st_bugs.ecf.
- Press F5 to run the project.
- Eventually the exception below will raise.

item_exists: PRECONDITION_VIOLATION raised (PRECONDITION_VIOLATION)
******************************** Thread exception *****************************
In thread           Root thread            0x0 (thread id)
*******************************************************************************
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
ARRAYED_SET         subset_strategy_selection @1
                                           item_exists:
<00000000043985C8>  (From LINEAR_SUBSET)   Precondition violated.        Fail
-------------------------------------------------------------------------------
ARRAYED_SET         subset_strategy @4                                  
<00000000043985C8>  (From TRAVERSABLE_SUBSET)
                                           Routine failure.              Fail
-------------------------------------------------------------------------------
ARRAYED_SET         disjoint @4                                         
<00000000043985C8>  (From TRAVERSABLE_SUBSET)
                                           Routine failure.              Fail
-------------------------------------------------------------------------------
APPLICATION         reproduce_arrayed_set_disjoint_bug @3
                                           not s.disjoint (s):
<0000000004398588>                         Assertion violated.           Fail
-------------------------------------------------------------------------------
APPLICATION         reproduce_arrayed_set_disjoint_bug @3
<0000000004398588>                         Routine failure.              Fail
-------------------------------------------------------------------------------
APPLICATION         make @1                                             
<0000000004398588>                         Routine failure.              Fail
-------------------------------------------------------------------------------
APPLICATION         root's creation                                     
<0000000004398588>                         Routine failure.              Exit
-------------------------------------------------------------------------------
Problem Report Interactions
From:jfiat_es    Date:2023/09/26    Status: Closed    Download   
This is now fixed by revision 107309

From:rosivaldo    Date:2023/07/06    Download   
Attachments for problem report #19894

Attachment: st_bugs.7z     Size:1383