Generic conformance in 4.3 (and possible problem advisory) 
Author Message
 Generic conformance in 4.3 (and possible problem advisory)

Later this month ISE will release ISE Eiffel version 4.3,
an important new release with many new developments including
spectacular compilation speed-up.

This message is intended to draw users' attention to a major long-term
improvement of 4.3, which may cause some short-term problems for some
existing applications. (This is the classic example of what happens
when you finally implement the correct behavior, but some existing
software may have been relying on the previous incorrect behavior.)

The issue is "generic conformance".

Eiffel type rules (chapter 13 of "Eiffel: The Language",
see http://www.*-*-*.com/ ) specify that of the two types

    A [X]
    A [Y]

the second will conform to the first if and only if type Y
conforms to type X. This is one of the very few areas of the
language that was not properly supported by releases so far
(simply because it is very difficult to implement).
According to the implementation, conformance held whenever
X and Y are reference types. (For basic expanded types,
such as INTEGER and REAL, the rule was properly followed.)

As a result, an assignment attempt

    ax ?= ay

with `ax' of type A [X] and `ay' of type A [Y], was able to
succeed (i.e. to yield a non-void `ax') when it should not have.

This is corrected now and the rule is fully implemented.
As noted, the implementation is difficult and has been
a major effort.

The rule is of course recursive, e.g. (assuming SQUARE
inherits from RECTANGLE and LINKED_LIST from LIST,
with no other inheritance links between the classes involved,
"->" used as abbreviation for "conforms to" and "-/>" for
"does not conform to"):




This change has been requested by many large users and will
simplify their software considerably, since they have had
to work around the deficiency in the past, typically by
adding an attribute that characterizes the actual generic

Other users have pointed out to us that their code actually
took "advantage" of the bug to have assignment attempts that
succeed even when they shouldn't. In such a case, the software
will of course have to be amended to follow the correct
language semantics.

We hope all users will greatly benefit from this and all
the other advances of ISE Eiffel 4.3.

-- Richard Bunbury
Interactive Software Engineering
ISE Building, 2nd floor, 270 Storke Road, Goleta CA 93117


Mon, 25 Jun 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. problem with generic types conformance

2. blaxxun Contact 4.3 Problem

3. Problems with PIC Designer (Composer) 4.3

4. DG AOS/VS II Cobol Rev 4.3 Problem

5. DG AOS/VS II Cobol Ver 4.3 Problem --- Update

6. Problem compiling php 4.3 with gd

7. Bizarre problems on Tcl 8.3.2/AIX 4.3

8. Problem with Expect 4.3

9. Conformance in generic types

10. Generic type and conformance.

11. MVS 5.2 and JES2 4.3 MAS

12. bug in ISE Eiffel 4.3 Win/NT 4


Powered by phpBB® Forum Software