Re: [sv-bc] 2097 comments/thoughts

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Tue Jan 15 2008 - 08:15:18 PST
Steven Sharp wrote:
>> From: Gordon Vreugdenhil <gordonv@model.com>
> 
> 
>> I think that it is pretty easy to argue that this should be
>> allowed since "x" is really the same as a distinct variable
>> declaration; it is primarily its name scoping that is different.
>>
>> So, two aspects -- first, does everyone agree that forcing a
>> static class property should be legal?  Second, if you do
>> agree, do we need to clarify that in 2097 (or elsewhere)?
> 
> From an implementation viewpoint, I agree that a static class
> property is pretty much the same as a distinct static variable,
> that happens to have a scope that is inside the class declaration.
> From that implementation viewpoint, it isn't really part of the
> class aggregate object.
> 
> However, the OO conceptual model is that it is part of the class
> aggregate object.  It seems to me that this more relevant to the
> issue than the implementation detains.

I don't really agree with this view.  The LRM is avoiding
issues with forcing of *dynamic* values.  A class static
doesn't have that problem and given that in all other
scenarios at least a reference of the form class_name::static_var
is treated in the same manner as a normal variable, it seems
strange to me that the procedural continuous assignments
would be an exception.


By the way, on a related issue, is it valid to force a variable in an
interface instance when referenced by way of a virtual interface?
The LRM explicitly says that procedural assignments are valid and that
continuous assignments are not.  What are procedural continuous
assignments?  My expectation here is that the "continuous" aspect
is the dominant consideration and thus such forces should likely
be illegal.

Both of these aspects should likely be clarified in 2097.

Gord.

> Also, there are some ways other than scoping that the static
> properties are considered part of the class.  For example, a wait
> on a class method can re-evaluate the class method to check for a
> change any time a class property changes, and that presumably
> includes static properties.
 >
> So I would say that a straightforward interpretation of the LRM
> would be that the static class property is not an independent
> variable, and cannot be forced.
> 
> Steven Sharp
> sharp@cadence.com
> 

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jan 15 08:15:53 2008

This archive was generated by hypermail 2.1.8 : Tue Jan 15 2008 - 08:16:03 PST