[wg11] sub-supertype constraints on USED entities

Ricardo Goncalves rg at uninova.pt
Wed Oct 27 14:02:00 EDT 2004


Dear Lothar and colleagues,

  Thank you very much for your atenton and remarks about these modules.
However, I think you are not doing your comments on the last version of
the modules available in the stepmod repository (also in attach), where
this crosswise reference does not exist. Please recheck and let us know.

  Regards

    Ricardo

  




> -----Original Message-----
> From: wg11-bounces at steptools.com 
> [mailto:wg11-bounces at steptools.com] On Behalf Of Lothar Klein
> Sent: terça-feira, 26 de Outubro de 2004 19:07
> To: 'WG11 exploder'; AP-INTEROP-L at ATICORP.ORG
> Subject: [wg11] sub-supertype constraints on USED entities
> 
> 
> Hi,
> 
> In the modules I found a situation which is wrong in my 
> opinion. Please have a look to the simplified Express below. 
> Two schemas using each other crosswise. I have doubts that 
> the ABSTRACT SUPERTYPE constraint of "Variable" is valid 
> since it calls out entities which are USED FROM. As a minimum 
> I would consider this as a bad modelling style.
> 
> 
> SCHEMA Expression_arm;
> 
>  USE FROM Generic_expression_arm;
> 
>  ENTITY String_variable
>    SUBTYPE OF (Variable);
>  END_ENTITY;
> 
>  ENTITY Numeric_variable
>    SUBTYPE OF (Variable);
>  END_ENTITY;
> 
> END_SCHEMA;
> 
> 
> SCHEMA Generic_expression_arm;
> 
>  USE FROM Expression_arm;
> 
>  ENTITY Variable
>    ABSTRACT SUPERTYPE OF (ONEOF (Numeric_variable,
>                                  String_variable))
>  END_ENTITY;
> 
> END_SCHEMA;
> 
> ------------------------
> 
> A much better and correct modelling style would be to use 
> SUBTYPE_CONSTRAINT; something like this:
> 
> SCHEMA Expression_arm;
> 
>  USE FROM Generic_expression_arm;
> 
>  ENTITY String_variable
>    SUBTYPE OF (Variable);
>  END_ENTITY;
> 
>  ENTITY Numeric_variable
>    SUBTYPE OF (Variable);
>  END_ENTITY;
> 
>  SUBTYPE_CONSTRAINT separate_variables FOR Variable;
>    ONEOF(Numeric_variable, String_variable)));  
> END_SUBTYPE_CONSTRAINT;
>  
> END_SCHEMA;
> 
> 
> SCHEMA Generic_expression_arm;
> 
>  ENTITY Variable
>  END_ENTITY;
> 
> END_SCHEMA;
> 
> Here schemas are no longer referencing each other crosswise. 
> Expression_arm is clearly build on top of Generic_expression_arm.
> 
> --------
> 
> What are others thinking about this?
> Is there a place in part 11 which clarifies the situation?
> 
> Lothar
> 
> 
> 
> -- 
> // Lothar Klein, LKSoftWare GmbH
> // Steinweg 1, 36093 Kuenzell, Germany
> // +49 661 933933-0, Fax: -2
> // url: http://www.lksoft.com
> 
> _______________________________________________
> wg11 mailing list
> wg11 at steptools.com http://lists.steptools.com/mailman/listinfo/wg11
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expression-arm.zip
Type: application/x-compressed
Size: 2589 bytes
Desc: not available
Url : http://lists.steptools.com/pipermail/wg11/attachments/20041027/04418ece/expression-arm.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generic_expression-arm.zip
Type: application/x-compressed
Size: 1078 bytes
Desc: not available
Url : http://lists.steptools.com/pipermail/wg11/attachments/20041027/04418ece/generic_expression-arm.bin


More information about the wg11 mailing list