ISAC: Last chance on IRs 2077, 2084, 2087

From: Chuck Swart <cswart_at_.....>
Date: Thu Mar 16 2006 - 22:27:09 PST
These three IRs have been ISAC approved.

IR 2087  Ambiguous rule for type of an alias declaration

has been included because it has an obvious wording change.

The two IRs:

2077    Analyzed        Larry           Incorrect wording on some 
language constructs
2084    Analyzed        Peter           A record "element" is not called 
a "field"

are not included because they are identical to the version which I sent 
previously.

If I don't hear any objections within the next couple of days, I will 
mark them
ISAC-Approved and forward them to the VASG.

Chuck Swart

-------------BEGINNING OF IR----------------

VHDL Issue Number:        2087

Language_Version          VHDL-2002
Classification            Language Definition Problem
Summary                   Ambiguous rule for type of an alias declaration
Relevant_LRM_Sections     4.3.3.1 Object aliases
Related_Issues            
Key_Words_and_Phrases     object alias
Authors_Name              Peter Ashenden
Authors_Phone_Number      +61 414 709 106
Authors_Fax_Number        
Authors_Email_Address     peter@ashenden.com.au
Authors_Affiliation       Ashenden Designs
Authors_Address1          
Authors_Address2          
Authors_Address3          

Current Status:           Analyzed

Superseded By:

------------------------
Date Submitted:           9 February 2006
Date Analyzed:            13 March 2006
Author of Analysis:       Larry Soule
Revision Number:          3
Date Last Revised:        16 March 2006

Description of Problem
----------------------

In 4.3.3.1, page 69, item (b) includes the following:
    
    The base type of the name specified in an alias declaration must
    be the same as the base type of the type mark in the subtype
    indication (if the subtype indication is present); this type must
    not be a multidimensional array type.
    
    The referent of the word "this" is ambiguous. Does it refer to
    the base type of the name? If so, then any alias of a
    multidimensional array object is illegal.
    
    Alternatively, does it refer to the base type of the type mark of
    the subtype indication (if present)? If so, the following would be
    illegal:
    
      type T is array(1 to 3, 1 to 3) of integer;
      variable V : T;
      alias A:T is V;
    
    whereas the following would be legal:
    
      alias A is V;
    
    In either case, there appears to be no rationale for proscribing a
    multidimensional type. Was that intended in general, or only in
    the case of an alias of a slice?
    
    Further, in item (b)(1), it says:
    
      If the alias designator denotes a slice of an object, then the
      subtype of the object is viewed as if it were of the subtype
      specified by the slice.
    
    Presumably this should be "..., then the slice of the object is
    viewed as if it were of the subtype specified by the slice." In
    all cases of object aliases, the viewing that goes on is of the
    object, not of a subtype.
    

Proposed Resolution
-------------------

Remove the rule requiring the base type not to be a multidimensional
array type.
    
Change the incorrect use of the word "subtype" to "slice".

VASG-ISAC Analysis & Rationale
------------------------------

In Section '4.3.3.1 Object aliases', section b) requires that

    "The base type of the name specified in an alias declaration must
    be the same as the base type of the type mark in the subtype
    indication (if the subtype indication is present); this type must
    not be a multidimensional array type."

The restriction against aliasing multidimensional arrays was not
intentional and should be removed.  The only restriction that needs to
be in place is one that prohibits 're-shaping' the array (e.g., from a
2 by 4 to an 8 by 1) as this would depend on the data layout of the
implementation.  This restriction is already taken care of by b)(2) by

    "moreover, the subtype denoted by the subtype indication must
    include a matching element (see 7.2.2) for each element of the
    object denoted by the name."

Also, the typo reported in b)(1) is genuine and should be changed.


VASG-ISAC Recommendation for IEEE Std 1076-2002
-----------------------------------------------

Interpret the LRM as if the Recommendation for Future Revisions were
in effect.


VASG-ISAC Recommendation for Future Revisions
---------------------------------------------

Remove the wording that reads: "this type must not be a
multidimensional array type"

As the reported suggests, change the wording of b)(1)  to
"..., then the slice of the object is viewed as if it were of the
subtype specified by the slice."

-------------END OF IR----------------
Received on Thu Mar 16 22:27:13 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 16 2006 - 22:27:14 PST