[wg11] SEDS 910 issue (Attribute renaming and short->longconver sion )

Jochen Haenisch Jochen.Haenisch at epmtech.jotne.com
Tue Jul 13 04:06:09 EDT 2004


Hi Phil,

I agree that the proposed solution does not work as it addresses the wrong
chapter in annex G.

Else, see my comments below, please.

Best regards, Jochen

> -----Original Message-----
> From:	Phil Spiby [SMTP:Phil.Spiby at eurostep.com]
> Sent:	9. juli 2004 14:34
> To:	'WG11 exploder'
> Cc:	expressIF at tc184-sc4.org
> Subject:	[wg11] SEDS 910 issue (Attribute renaming and
> short->longconversion )
> 
> 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
	JH: Should this not be G.5.7 ?

> 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>.
	JH: The text should probably be more like:
	"The redeclaration shall be 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?
> 
	JH: Does not simply the rule apply that redeclaration from DERIVE
attribute to explicit attribute is invalid?

> --------------------------------------------
> 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 
> 
> 
> _______________________________________________
> wg11 mailing list
> wg11 at steptools.com
> http://lists.steptools.com/mailman/listinfo/wg11


More information about the wg11 mailing list