[wg11] EXPRESS (DERIVEd) attribute redeclaration question

Thomas Thurman thomas.r.thurman at imonmail.com
Fri Jun 1 09:42:25 EDT 2012


Phil,
This is an interesting conclusion. I look forward to hear opinions of other members of WG11.

Tom
>On Jun 1, 2012, at 12:43 AM6/1/12, Phil Spiby wrote:

> I believe Rule and Restriction (e) under section 9.2.3.4 applies:
> e) If an attribute of a supertype is redeclared in two non-mutually exclusive subtypes, an
> instance which contains both subtypes shall have a single value for that attribute which is
> valid for both redeclarations.
> 
> Phil
> 
> -----Original Message-----
> From: wg11-bounces at steptools.com [mailto:wg11-bounces at steptools.com] On Behalf Of Thomas Thurman
> Sent: 30 May 2012 18:39
> To: wg11
> Subject: [wg11] EXPRESS (DERIVEd) attribute redeclaration question
> 
> Dear WG11 experts,
> During testing of a new version of the EDMS EXPRESS compiler/shtolo, The following error report was generated by the compiler examining the concatenated arm of the test case.
> For reference, this is logged as an issue against the module EXPRESS on module 1732, ISO 10303 instance of bugzilla bug #4409.
> The complete file is attached to the bug.
> 
> The problem appears to be that a redeclaration in a "lower" subtype redeclares an attribute from the supertype when there is an existing redeclaration in an "intermediate" subtype.
> 
> 
> My question to the WG11 experts is this:
> Is the EXPRESS declaration in line 2446 (cited as an error by the EDMS compiler) valid EXPRESS?
> (I seem to recall that Lothar mentioned that this had been discussed in a meeting and it was agreed that it was valid.) If this is valid EXPRESS, the ERROR will need to be converted to a WARNING.
> If this is valid EXPRESS, what "happens" to the attribute Part_item_shape.described_element during (e.g., interface class generation, runtime) If this is valid EXPRESS, doesn't there need to be some NOTE in part 11 mentioning it?
> 
> Very best regards,
> Tom Thurman
> 
> ======Here are the details.=========
> 
> The redeclaration
> Part_usage_view.described_element references SELECT type shapeable_item. However, the redeclared attribute domain is already reduced to  Part_view_definition in the supertype Part_item_shape declaration.
> Therefore the re-redeclaration is an attempted generalization which is  not  allowed in attribute redeclaration.
> 
> ERROR  : Line   204: C3126:Conflicting implicit attribute redeclaration. in  entity: ALTERED_PACKAGE         
>        Redeclaring attribute: PART_USAGE_VIEW.DESCRIBED_ELEMENT in line:  24446         
>        Redeclared  attribute: PART_ITEM_SHAPE.DESCRIBED_ELEMENT in line:  11439         
>        Redeclaration from PART_VIEW_DEFINITION to SHAPEABLE_ITEM         
>          Additional info:           
>          Error 8105.0 SELECT tree contains an entity which is neither same  nor subtype           
>             At line :22998: Entity:PART_VIEW_DEFINITION           
>             At line :31102: Type:SHAPEABLE_ITEM           
>          Error 8104.0 Entity is not same or subtype           
>             At line :30931: Select type:SF_SHAPEABLE_ITEM           
>             At line :4244: Select member:CHARACTERIZABLE_OBJECT
> 
> 
> 
> ENTITY Part_item_shape
> SUBTYPE OF (Item_shape);
> 11439--  SELF\Item_shape.described_element : Part_view_definition; END_ENTITY;  
> 
> ENTITY Part_usage_view
>   SUBTYPE OF (Part_view_definition, Part_item_shape);
>   DERIVE
> 24446--      SELF\Item_shape.described_element : shapeable_item := SELF;
> END_ENTITY;
> 
> 22998--ENTITY Part_view_definition
> SUBTYPE OF (Product_view_definition);
> SELF\Product_view_definition.defined_version : Part_version;
> SELF\Product_view_definition.initial_context: Part_view_definition_context;
> SELF\Product_view_definition.additional_contexts: SET [0:?] OF  Part_view_definition_context; END_ENTITY;
> 
> 31102--TYPE shapeable_item = EXTENSIBLE GENERIC_ENTITY SELECT  (Product_occurrence_definition_relationship,
>  Product_view_definition,
>  View_definition_relationship);
> END_TYPE; 
> 
> ---
> SCHEMA Shape_feature_arm;
> 
> USE FROM Characterizable_object_arm; -- ISO/TS 10303-1765 USE FROM Contextual_shape_positioning_arm; -- ISO/TS 10303-1027 REFERENCE FROM Support_resource_arm(bag_to_set);  -- ISO/TS 10303-1765 USE FROM Property_assignment_arm; --  ISO/TS 10303-1030
> 
> 30931--TYPE sf_shapeable_item = SELECT BASED_ON shapeable_item WITH  (Characterizable_object); END_TYPE; 
> 
> 4244--ENTITY Characterizable_object;
> name : label;
> description : OPTIONAL text;
> END_ENTITY;
> ===========================
> proposed solution:
> ///problem is in line 24446-->
> the following should be the declaration:
> SELF\Part_item_shape.described_element : Part_usage_view := SELF; ==================end bug entry=============================
> _______________________________________________
> wg11 mailing list
> wg11 at steptools.com
> http://lists.steptools.com/mailman/listinfo/wg11




More information about the wg11 mailing list