RE: [sv-ec] Reading a non-existent associative array element when a user specifies a default value

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Wed Jan 25 2006 - 13:25:27 PST
Dave,

 

Your statement "...default should not change the operation on the
associative array", implies

that the compiler does not check for such conditions. Since this is not
an error, it is simply a 

user guideline, and I believe that is already appropriately covered
insection 18.13.1:

 

If the type key, default key, or replication operator is used on an
expression with side effects, the 

number of times that expression evaluates is undefined.

 

Plus, why should this restriction apply only to associative arrays? 

 

Conversely, I think it would be useful to restrict these default
expressions to constant expressions,

such that the expression is evaluated once only, at the time of the
assignment, and the resulting

value is returned thereafter. That would simplify the implementation and
minimize the uncertainty.

 

            Arturo

 

________________________________

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Rich, Dave
Sent: Wednesday, January 25, 2006 11:16 AM
To: sv-ec@eda.org
Subject: [sv-ec] Reading a non-existent associative array element when a
user specifies a default value

 

should not generate a warning message. Also, a user specified default
should not change the operation on the associative array methods. They
are still non-existent elements.

 

Mantis issue generated

http://www.eda.org/svdb/bug_view_page.php?bug_id=0001315

 

David Rich
Verification Technologist
Design Verification & Test Division
Mentor Graphics Corporation
dave_rich@mentor.com
Office:   408 487-7206
Cell:     510 589-2625

 
Received on Wed Jan 25 13:25:37 2006

This archive was generated by hypermail 2.1.8 : Wed Jan 25 2006 - 13:26:34 PST