VHDL Issue Number: 0056 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Unclear requirements on prefix in predefined attribute names. Related Issues: Relevant LRM Sections: 6.1, 6.5, 14.1 Key Words and Phrases: Attribute name, appropriate for, prefix Current Status: Analyzed 1076-1993 Disposition: Superseded (ISAC Issues Outstanding) Disposition Rationale: ?? Superseded By: 1005 ----------------------- Date Submitted: 1989/02/10 Author of Submission: Doug Dunlop Author's Affiliation: Intermetrics, Inc. Author's Post Address: 4733 Bethesda Ave #415 Bethesda, MD 20814 Author's Phone Number: (301) 657-3775 Author's Fax Number: Author's Net Address: dunlop@inmet.inmet.com ----------------------- Date Analyzed: 1991/11/19 Author of Analysis: Stephen Bailey Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/05/13 21:53:48 $ Description of Problem ---------------------- The LRM says that the prefix in a 'RANGE attribute name may be "appropriate for an array object, or alias thereof". However, the notion of appropriateness of prefixes (LRM Section 6.1) is defined for types and not objects. Is the intent here to require the prefix to be an object or to require the prefix to be appropriate for an array type (as in Ada)? Proposed Resolution ------------------- The wording appears to have been deliberately altered when taken from the Ada LRM. Hence we assume the prefix must be an array object, an alias thereof, or a constrained array subtype. The same is true for all predefined attributes whose prefix is required to be "appropriate for an array object, or alias thereof, ...". VASG-ISAC Analysis & Rationale ------------------------------ The usage of the phrases "appropriate for an array object" (LRM 14.1) and "appropriate for a one-dimensional array object" (LRM 6.5) appear to be errors in the LRM and not deliberate alterations from the Ada LRM as suggested. The rationale for this position is that: 1. The LRM contains no definition of appropriateness as applied to objects, but does define it for types, and 2. The definition of appropriateness for types as applied to the context of prefixes (which is the context of LRM 14.1) includes prefixes which are objects. "A prefix is said to be _appropriate_ for a type in either of the following cases: The type of the prefix is the type considered. The type of the prefix is an access type whose designated type is the type considered." In both cases, it is not the prefix that is being considered but the type (or type accessed) of the prefix. The definition does not refer directly to the prefix. Furthermore, the definition of appropriateness for types allows the application of an attribute to a prefix that is an object that is of an access type without requiring the use of ".all." It is difficult to conceive of a definition of appropriateness as applied to objects that would have the same power of the definition of appropriateness of types while also being meaningfully different from the type appropriateness definition. Therefore, it is reasonable to conclude that inattention to detail in the writing of the LRM resulted in the two phrases above in sections 6.5 and 14.1. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- Recommend that the 1st sentence of the 2nd paragraph of LRM section 6.5 be changed to: The prefix of a slice must be appropriate for a one- dimensional array type. Recommend that all occurrences of the phrase "that is appropriate for an array object, or an alias thereof, or that denotes a constrained array subtype" in section 14.1 be replaced by: that is appropriate for an array type or that denotes a constrained array subtype NOTE: Since aliases are typed, the phrase "appropriate for an array type" applies to aliases as well as to other objects and "denotes a constrained array subtype" allows the attribute to be applied directly to a constrained subtype name. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Future versions of the LRM should be modified according to the above recommendation.