VHDL Issue Number: 1073 Classification: Language Definition Problem Language Version: VHDL-93 Summary: The meaning of a qualified expression is in dispute Related Issues: 0244 Relevant LRM Sections: 7.3.4 Key Words and Phrases: Qualified expressions, matching elements Current Status: ISAC-Approved 1076-1993 Disposition: N/A Disposition Rationale: N/A Superseded By: N/A ----------------------- Date Submitted: 1991/09/19 Author of Submission: Doug Dunlop (edited by Bill Paulsen) 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: N/A Author's Net Address: dunlop@inmet.inmet.com ----------------------- Date Analyzed: 1995/04/10 Author of Analysis: Clive R. Charlwood Revision Number: $Revision: 1.8 $ Date Last Revised: $Date: 1995/05/15 21:26:37 $ Description of Problem ---------------------- (This IR supersedes IR 0244.) A customer has explained to me that Valid and CLSI give different meanings to certain qualified expressions. In particular, consider the case of a qualified expression type_mark'(expression) where type_mark is a constrained array subtype. Furthermore, suppose the direction of this subtype differs from that of the expression but nevertheless there are "matching elements" between the subtype and the value of the expression. In this case should the evaluation of the qualified expression result in a run-time error because the value of the expression does not belong "to the subtype denoted by the type mark"? Proposed Resolution ------------------- The direction mismatch in this case should cause the subtype check required in 7.3.4 to fail. VASG-ISAC Analysis & Rationale ------------------------------ 1) A qualified expression is not intended to CONVERT an operand to the specified type or subtype. It is used to explicitly state the type, and possibly the subtype, of the operand. 2) A qualified expression may COERCE the operand by providing the context required to determine its type and subtype. Therefore if an expression has an explicit subtype then this subtype must be compatible with the specified subtype. This includes that bounds and DIRECTION. The ISAC felt that the phrase "The evaluation of a qualified expression evaluates the operand and checks that its value belongs to the subtype denoted by the type mark" (Page 105, line 485) covers this point completely, and that no changes to the LRM are required to resolve this issue. VASG-ISAC Recommendation for IEEE Std 1076-1993 ----------------------------------------------- No changes are required. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- No changes are required. However, the LRM author may want to consider making this point more explicit.