Folks, While working on external names (FT-7), the following question came up. If we want to define an alias for an external name, there is a rule that the aliased name be static. This suggests that an external name should be static, which seems quite reasonable. One of the things we want to be able to reference with an external name is a shared variable, which must be of a protected type. However, the current rules for static names preclude a name that denotes an object of a protected type. I can't think of a good reason why. Any ideas? With the current rule, it would be illegal to declare an alias as follows: package types is type T is protected...end protected; end package types; architecture a of e is shared variable V : work.types.T; alias V1 is V; end architecture a; Extending this to external names, it would then be illegal to write in another design unit: ... alias V2 is <<variable .e.V1 : work.types.T>>; ... Since the only kind of variable we can denote with an external name is a shared variable, we would never be able to legally write an external variable name. Wouldn't it make sense to allow a name denoting an object of protected type to be a static name? My understanding of staticness of a name is that it means you can statically determine what is denoted by the name. For a name denoting a shared variable of protected type, the fact of it being of that type doesn't affect being able to determine the denotation statically. Further, a selected name denoting a method of the shared variable could also be considered static. It's only a function call to the method that is not static, and that's precluded by a prefix that is a function call being non-static. In summary, it would appear that the LRM writers defining protected types didn't properly understand staticness of names when they added that rule in 6.1. Either that, or I've got it messed up in my head and need to be straightened out. Anyone care to help me? Thanks. Cheers, PA -- Dr. Peter J. Ashenden peter@ashenden.com.au Ashenden Designs Pty. Ltd. www.ashenden.com.au PO Box 640 VoIP: 0871270078@sip.internode.on.net Stirling, SA 5152 Phone (mobile): +61 414 709 106 AustraliaReceived on Thu Mar 23 23:12:20 2006
This archive was generated by hypermail 2.1.8 : Thu Mar 23 2006 - 23:12:22 PST