[sv-ac] Re: [sv=ac] 16.10 Why is s8 legal? x 9s common to both threads

From: ben cohen <hdlcohen@gmail.com>
Date: Wed Aug 04 2010 - 03:48:02 PDT

Got it. In S8 x is not used after the end of the 'and' subsequences.

On 8/2/10, ben cohen <hdlcohen@gmail.com> wrote:
>
>
> The paragraph just above 16.11
> The value of a local variable that flows out of the composite sequence is
> the latest assigned value.
> The threads for the two operands are merged into one at completion of
> evaluation of the composite
> sequence.
> sequence s7;
> int x,y;
> *((a ##1 (b, x = data, y = data1) ##1 c)*
> and *(d ##1 (`true, x = data) ##0 (e==x)))* ##1 (x==data2);
> *// illegal because x is common to both threads*
> endsequence
>
> sequence s8;
> int x,y;
> *(a ##1 (b, x = data, y = data1) ##1 c)*
> and *(d ##1 (`true, x = data) ##0 (e==x)))* ##1 (y==data2);
> *// legal because y is in the difference*
> endsequence
> [Ben] But in this case, * x is also common to both threads*
> *Thus, why is this legal? *
> *LRM states:*
> **
> *d) In the case of and and intersect, a local variable that flows out of
> at least one operand shall flow*
> *out of the composite sequence unless it is blocked. A local variable is
> blocked from flowing out of*
> *the composite sequence if either of the following statements applies:*
> *1) The local variable is assigned in and flows out of each operand of the
> composite sequence,*
> **
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Aug 4 03:48:31 2010

This archive was generated by hypermail 2.1.8 : Wed Aug 04 2010 - 03:48:52 PDT