Re: [sv-bc] Mantis 2106

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Thu Dec 06 2007 - 07:59:17 PST
Bresticker, Shalom wrote:
> Hi,
> 
> I had sent this to Dave Rich for consultation, but Dave does not seem to
> be available and time is running out, so I am sending this to the entire
> list for feedback.
> 
> I took an action item to work on the second half of Mantis 2106, based
> on my unhappiness with the sentence and paragraph organization of 6.21.
> The attached document is a draft revision. Working on the order caused
> me to alter text as well, with intent to not change technical content.
> Please review. Ignore the colors.
> 
> In addition, I had some questions, whose answers could cause further
> changes: 
> 
> 1. "Data declared in an automatic task, function, or block have the
> lifetime of the call or activation and a local scope. This is roughly
> equivalent to a C automatic variable." 
> and
> "Data declared in a static task, function, or block default to a static
> lifetime and a local scope."
> 
> I'm a little confused. Which blocks are static and which blocks are
> automatic?

That is dependent on the context.  In a class things default to
automatic.  A module is permitted to have an "automatic" designation
to say that routines within it default to automatic.


> 2. "Variables declared inside a module, interface or program, but
> outside a task, process, or function, are local in scope and static in
> lifetime (exist for the lifetime of the module, interface or program)."
> 
> Earlier, static is defined as "exist for the whole simulation".
> 
> I think the parenthesized phrase should be deleted. It seems both
> redundant and wrong.

Redundant, yes.  Wrong, no.  The lifetime of an instance is
that of the simulation so the statements are equivalent.


> Finally, I think the last sentence in 6.18, in the first part of 2106,
> "It shall be an error if the type_identifier does not resolve to data
> type, or basic data type if specified," has a grammar problem. Should it
> be "a data type"? 

Sure.


> In any case, I'm not sure of the meaning. What are examples of a
> type_identifier resolving to a data type and to a basic data type?

The idea that Dave was trying to address (I think) was that given:
     typedef class C;
"C" has a "basic data type" of "class".  So the actual type
definition of "C" must match the basic data type (i.e. be a
class).  If no "basic data type" is given in a forward, the
actual definition can be anything.

Perhaps this should be something like:

    It shall be an error if the type_identifier does not resolve to data type.
    It shall be an error if a basic data type was specified by the forward
    type declaration and the actual type definition does not conform to the
    specified basic data type.

I used "conform" here since I couldn't use "match".  If you really
feel it necessary, you could add detail to say that a only
a class conforms to a "class basic data type" and so on, but I think
the straightforward English intent here should be Ok.

Gord.

-- 
--------------------------------------------------------------------
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 Thu Dec 6 07:59:35 2007

This archive was generated by hypermail 2.1.8 : Thu Dec 06 2007 - 07:59:57 PST