Re: [sv-ec]E-mail Vote: Closes 12am PST December 15 2007

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Mon Dec 17 2007 - 06:50:04 PST
Mark Hartoog wrote:
> I am surprised at this. I thought your original issue was that you
> wanted to make name binding more deterministic. In this case you 
> are arguing for less deterministic name binding.  

This is quite amusing.

The consensus of the group was that the more dynamic forms were
preferable -- the set of rules in play for inline constraints are
the prime example.  I've conceded to that desire and now just
want things to be consistent.  Yet here you want something
irregular with the rest of the resolution.  Why would you want
such an ad hoc approach?  Or are you suggesting that we
re-open the entire discussion again?

I still have yet to here any reason for why "this.x" and "x"
pose different problems and why "this.x" is so difficult.


In terms of your example, can you explain why things are
more "deterministic" if the user had "x < y" instead?
Or are you arguing that "x < y" should also be disallowed?

If you want obviousness in name binding, you shouldn't
have had the current rules for inline constraints in
the first place.


If you are arguing that the **reason** for the special
"this." rule is specifically to *force* resolution into the
target, well, we have a way to do that -- "local::v.x" or similar.


Using "this." to achieve that effect is inconsistent
with the rest of the rules and will introduce a completely
ad hoc inconsistency in terms of rules for class member
access.


Gord.


 > Consider this
> pathological example:
> 
> class A;
>   int x, y;
> endclass
> 
> class B;
>   int x;
> endclass
> 
> class C #(type TP);
>    function void doRand(TP v);
>      v.randomize with { this.x < this.y; };
>    endfunction
> 
>    int x, y;
> endclass
> 
> C #(A) c1 = new;
> C #(b) c2 = new;
> 
> A a = new;
> B b = new;
> 
> initial 
> begin
>    c1.doRand(a);  // In c1, 'this.y' binds to field 'y' of class 'A'
>    c2.doRand(b);  // In c2, 'this.y' binds to field 'y' of class 'C'
> end
> 
> Is this the type of non-deterministic binding you really want?
> 

-- 
--------------------------------------------------------------------
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 Mon Dec 17 06:50:38 2007

This archive was generated by hypermail 2.1.8 : Mon Dec 17 2007 - 06:50:55 PST