[wg11] SEDS 910 issue (Attribute renaming and short->long conversion)

Phil Spiby Phil.Spiby at Eurostep.com
Fri Jul 9 08:33:38 EDT 2004


Folks,

I don't think the proposed resolution in this SEDS actually fixes the
problem. 

<SEDS>
Part/Clause Affected by the Issue: ISO/FDIS 10303-11e2 G.5.6, 4th bullet

Problem Description:
An e2 redeclaration of an attribute (see entity E4 in E2003_Schema) that is
renamed in a supertype
(see E3 in E2003_Schema) (and, thus, in e1 results in a DERIVED attribute in
E3 in E1994_Schema)
shall in e1 result in a redeclaration with reference to the original
attribute definition, not any
intermediate one (see E4 in E1994_Schema).

(* E2 schema *)

SCHEMA E2003_SCHEMA;

ENTITY T1;
END_ENTITY;

ENTITY T2
  SUBTYPE OF (T1);
END_ENTITY;

ENTITY T3
  SUBTYPE OF (T2);
END_ENTITY;

ENTITY E1;
  e1a1 : T1;
  e1a2 : T1;
END_ENTITY;

ENTITY E2
  SUBTYPE OF (E1);
END_ENTITY;

ENTITY E3
SUBTYPE OF (E2);
 SELF\E1.e1a1 RENAMED e1a1_r : T2;
 SELF\E1.e1a2 RENAMED e1a2_r : T2;
END_ENTITY;

ENTITY E4
 SUBTYPE OF (E3);
 SELF\E3.e1a1_r : T3;
 SELF\E3.e1a2_r : T3;
END_ENTITY;

END_SCHEMA;


(* E1 schema *)
SCHEMA E1994_SCHEMA;

ENTITY T1;
END_ENTITY;

ENTITY T2
  SUBTYPE OF (T1);
END_ENTITY;

ENTITY T3
  SUBTYPE OF (T2);
END_ENTITY;

ENTITY E1;
  e1a1 : T1;
  e1a2 : T1;
END_ENTITY;

ENTITY E2
  SUBTYPE OF (E1);
END_ENTITY;

ENTITY E3
 SUBTYPE OF (E2);
 SELF\E1.e1a1 : T2;
 SELF\E1.e1a2 : T2;
DERIVE
 e1a2_r : T2 := SELF\E1.e1a2;
 e1a1_r : T2 := SELF\E1.e1a1;
END_ENTITY;

ENTITY E4
 SUBTYPE OF (E3);
 SELF\E1.e1a1 : T3;
 SELF\E1.e1a2 : T3;
END_ENTITY;

END_SCHEMA;

Proposed Solution (Optional):

 change text from
- the derivations of the attribute values shall be
SELF\<supertype name>.<old attribute name>
To
- the derivations of the attribute values shall be
SELF\<supertype where attribute is defined>.<original attribute name>
</SEDS>

The change as proposed does not affect entity e4, since this does not
include the RENAMED keyword.
I think we need another section dealing with further redeclaration of
renamed attributes.

I would suggest the following:

G.5.6 Conversion of redeclared renamed attributes

For each renamed attribute that is redeclared in a subtype the following
conversion rule applies.

The attribute redeclaration SELF\<supertype name>.<renamed attribute> should
be changed to SELF\<supertype where attribute is first defined>.<original
attribute name>.

Phil

PS This does lead to an interesting issue, are we allowed to have the
following:

ENTITY e1;
 a1 : t1;
END_ENTITY;

ENTITY e2 SUBTYPE OF (e1);
DERIVE
 SELF\e1.a1 : t1 := expression;
END_ENTITY;

ENTITY e3 SUBTYPE OF (e2);
 SELF\e1.a1 : t2;
END_ENTITY;

(assuming t2 is a specialization of t1)

Is attribute a1 as it exists in instances of e3 a derived or an explicit
attribute?

--------------------------------------------
Dr. Phil Spiby		Tel: +44 1623 522940
Eurostep Limited		Fax: +44 1623 522940
73 Columbia Avenue	Mob: +44 7785 990352
Sutton-in-Ashfield
Nottinghamshire
NG17 2GZ
United Kingdom 




More information about the wg11 mailing list