VHDL Issue Number: 0017 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Can predefined operators be attributed? Related Issues: 0012, 0014 Relevant LRM Sections: 3, 4.4, 5.1, 6.6, 7.2, 10.3 Key Words and Phrases: User-defined attributes, attribute names, predefined operators Current Status: ISAC-Approved 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: All issues addressed in VHDL-93 LRM. Superseded By: N/A ----------------------- Date Submitted: 1989/02/07 Author of Submission: Paul Menchini Author's Affiliation: CAD Language Systems, Inc. Author's Post Address: P.O. Box 13036 Research Triangle Park, NC 27709-3036 Author's Phone Number: (919) 361-1913 Author's Fax Number: Author's Net Address: mench@clsi.com ----------------------- Date Analyzed: 1991/03/21 Author of Analysis: Clive Charlwood Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/08/02 23:45:12 $ Description of Problem ---------------------- The LRM is unclear on the semantics of associating user-defined attributes with the predefined operators (and on functions overloading them). Consider the following example: type T is range 1 to 10; attribute Predefined: Boolean; attribute Predefined of "=", "/=", "+", "-", "*", "/", "mod", "rem", "abs", "**": function is True; This is syntactically allowed; the entity designator of an attribute specification may be either a simple name or an operator symbol. However, is the entity class _function_ appropriate to these predefined operators? The LRM is unclear; some places (e.g., when considering named association), the LRM maintains a distinction between predefined operators and user-defined functions, even when those functions overload a predefined operator. (For example, a user-defined "+" function may be called with named association, the predefined operator with the same parameter and result-type profile may not.) In Section 5.1, the LRM seems to meld the concepts. Proposed Resolution ------------------- Explicitly state in Section 5.1 that the entity class _function_ applies both to user-defined functions and predefined operators. Alternatively, introduce a new entity class _operator_ that specifically designates predefined operators. VASG-ISAC Analysis & Rationale ------------------------------ This is very similar to IR0012. We will follow the same recommendation. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- Assume that the first paragraph on page 5-2: "The attribute designator must denote an attribute. The entity name list identifies those entities that inherit the attribute, as defined below:" refers to both implicit and explicit subprograms. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Re-word the first paragraph on page 5-2 as follows: "The attribute designator must denote an attribute. The entity name list identifies those entities ***, both implicit and explicit,*** that inherit the attribute, as defined below:"