RE: About IR2058

From: Peter Ashenden <peter_at_.....>
Date: Tue Mar 01 2005 - 15:06:13 PST
Folks,

Thanks to Ajay for keeping us honest!

I recall that, at an earlier telecon where we discussed this, we agreed that
a named base type should not be identified when a named subtype is
referenced in a use clause.  The rationale was that the designer
specifically mentioned just the subtype, so probably intended to constrain
values to be of the subtype.  If they wanted to have unconstrained values,
they would have mentioned the base type, either instead of or as well as the
subtype.

If the designer specifically mentions a subtype of an enumeration type, the
same rationale would suggest that they intend enumeration values outside the
subtype not to be legal in the using context.  Thus, I would argue that only
the enumeration literals that are in the subtype should be identified.

I guess my only concern about this analysis is on the implementation impact.
Is filtering out the literals based on the subtype constraint too onerous?
If so, I have no strong objection to identifying all enumeration literals of
the base type.

Comments?

Cheers,

PA

--
Dr. Peter J. Ashenden                        peter@ashenden.com.au
Ashenden Designs Pty. Ltd.                   www.ashenden.com.au
PO Box 640                                   Ph:  +61 8 8339 7532
Stirling, SA 5152                            Fax: +61 8 8339 2616
Australia                                    Mobile: +61 414 70 9106


> -----Original Message-----
> From: owner-isac@eda.org [mailto:owner-isac@eda.org] On 
> Behalf Of Ajayharsh Varikat
> Sent: Tuesday, 1 March 2005 22:47
> To: isac@eda.org
> Subject: About IR2058
> 
> 
> 
> Gentlemen,
> 
> I have a question about the wording in the recommendation for future 
> revisions. The current wording uses the phrase 'appropriate for the 
> type'. What exactly does "type" here refer to? I am assuming that
> (b) also applies to subtypes.
> 
> In fact, when the type mark denotes a subtype, I think it is 
> not very clear whether what becomes visible are the items 
> associated with 
> just the subtype or also those associated with the base type. 
> Consider 
> the following declarations:
> 
>       type enum is ( red, blue, green, yellow );
>       subtype myenum is enum range blue to green ;
> 
> In this case, if we say something like "use work.pkg.myenum", 
> then do all the enumeration literals associated with the base 
> type become visible or just blue and green?
> 
> -ajay
> 
Received on Tue Mar 1 15:06:17 2005

This archive was generated by hypermail 2.1.8 : Tue Mar 01 2005 - 15:06:18 PST