[sv-bc] Re: name resolution

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Tue Nov 20 2007 - 10:52:16 PST
John,

The 22.8 text is pretty badly out of date and really needs
to be completely gutted.  Unfortunately that is almost
certainly not going to happen for 2008 due to time constraints.

At this point I am trying to walk a fine line of getting
enough in the LRM to be able to direct implementors to the
correct approaches while being fully aware that there are
still many inconsistencies.

In terms of your specific observations, clearly a directly
referenced identifier can escape into $unit and certainly
can also cross nested module boundaries.  Various
other bits of current and in-progress text support that but
22.8 hasn't kept up.

In terms of knowing that something is a variable, that is determinable
at analysis time via a pure lexical search and/or import.  The
reason for the "variable" comment is that scopes resolve
differently.  I've reworked the function resolution rules (see
Mantis 1809) to account for most of the effects of singleton
scope names (like functions).  Since a function or task enable is
always known to be such at analysis time (you can't have an
unparenthesized call to a bare function name), it is reasonable
for implementations to figure out what is going on.  There are
still some oddities that the LRM really doesn't account for with
respect to systf routines like $dumpvars, but that isn't going
to be clarified in this round.

I have had periodic concern with how AC changes interact with
all of this but just have not been able to keep up with all
the assumptions and expectations that AC has in terms of
name resolution and how they interact with the rest of the
language.  I hope to be able to spend a bit more time reviewing
some of that in January or so.

If you want to look at Mantis 2109 you'll see a bunch of related
items.  You may want to look at the proposals where they exist.

Gord.

John Havlicek wrote:
> Hi Gord:
> 
> In the second paragraph of 22.8 in Draft4, the upward search for
> the declaration of a directly referenced identifier is said to 
> stop at a module, interface, or program boundary if the item is
> a variable.
> 
> Does this rule apply to nested declarations?  My intuition is that 
> it should not.
> 
> [By the way, I'm not sure how one knows if the item is a variable,
> but that is a separate question.]
> 
> My guess is that there may be recent or ongoing name resolution work 
> that affects these rules, so I'm interested in the answer that 
> aligns with the latest vision for the 2008 standard.
> 
> Best regards,
> 
> John H.
> 
> 

-- 
--------------------------------------------------------------------
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 Nov 20 10:52:33 2007

This archive was generated by hypermail 2.1.8 : Tue Nov 20 2007 - 10:53:09 PST