PR# 15487 Program doesn't run with some contract clauses
Problem Report Summary
Submitter: nadya_kenguru
Category: Compiler
Priority: Medium
Date: 2009/03/09
Class: Bug
Severity: Serious
Number: 15487
Release: 6.4.7.6930
Confidential: No
Status: Analyzed
Responsible:
Environment: $ISE_EIFFEL = C:\Program Files\EiffelStudio\6.4
$ISE_LIBRARY = C:\Program Files\EiffelStudio\6.4
$ISE_PLATFORM = windows
$ISE_C_COMPILER = msc
OS Windows XP
Synopsis: Program doesn't run with some contract clauses
Description
There are two "problem" contracts clauses: one in the postcondition of CONTAINER.has and another in the invariant of ACTIVE. With either of them the program compiles, but doesn't run: just silently exits right after the start of the execution (if you go step-by-step, not even a single step is done).
To Reproduce
Attached you will find my version of the elks cluster of EiffelBase with model-based contracts, MML library and the tester application. To reproduce the bug uncomment one of the two contract clauses mentioned in the description (they are marked with "ToDo: If uncommented doesn't run") and try compiling and running the tester application.
Problem Report Interactions
I don't quite understand why the `bag' attribute was missing: it is defined in the CONTAINER class (I checked once again in my old archive, and it's there). I checked that in 6.4 release the bug still exists. To reproduce it you don't even have to really merge the two libraries: just take ELKS from 6.4, take a newer version of MML from my new archive (attached to this message), include MML as a library in the base.ecf (also make sure that MML references this modified version of base.ecf, e.g. by setting MYBASE environment variable to its location) and replace the CONTAINER class with the class from my new archive. All the modifications I've made to the CONTAINER class is adding the `bag' and `equal_elements' features and adding the model-based postcondition for `has'.
I tried to compile the test project but found it was not possible due to the absence of the attribute `bag'. I'm assuming it should have been declared in ANY but cannot find it. I've had to merge changes from your ELKs with ours as there have been many changes. Do you still have the problem or can I close this bug? If the bug persists can we have an updated version of your edition of ELKs?