Re: [sv-ac] 1704, empty match, and local variable assignments

From: John Havlicek <john.havlicek_at_.....>
Date: Tue Feb 06 2007 - 04:33:11 PST
Hi Lisa:

I like this idea.  I recommend changing

   It is illegal to attach a subroutine, or any sequence_match_item,
   to an empty match.

to

   It is illegal to attach a subroutine, or any sequence_match_item,
   to a sequence that admits an empty match.

J.H.


> X-MimeOLE: Produced By Microsoft Exchange V6.5
> Content-class: urn:content-classes:message
> Date: Mon, 5 Feb 2007 18:47:10 -0500
> X-MS-Has-Attach: 
> X-MS-TNEF-Correlator: 
> Thread-Topic: [sv-ac] 1704, empty match, and local variable assignments
> Thread-Index: Acc/WJTmTM+3is1SQCq33XgaVC2NeQKJhQsA
> From: "Lisa Piper" <piper@cadence.com>
> X-Received: By mx-sanjose.cadence.com as l15NlCVC002190 at Mon Feb  5 15:47:12 2007
> X-OriginalArrivalTime: 05 Feb 2007 23:47:16.0259 (UTC) FILETIME=[F7555F30:01C7497F]
> 
> This is a multi-part message in MIME format.
> 
> ------_=_NextPart_001_01C7497F.F57F7E59
> Content-Type: text/plain;
> 	charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
> 
> Hi John,
> 
> =20
> 
> I would like to keep the handling of local variables consistent with the
> treatment of all sequence_match_items. So to be consistent with the way
> Annex E is already written, I think we should state that it is illegal
> to attach any sequence_match_item to an empty match.  I'd like to get
> feedback from the group and then I will update the formal writeup.
> 
> =20
> 
> =20
> 
> REPLACE:
> 
> =20
> 
> 17.9 Calling subroutines on match of a sequence
> 
> Tasks, task methods, void functions, void function methods, and system
> tasks can be called at the end of a successful match of a sequence.=20
> 
> =20
> 
> WITH:
> 
> =20
> 
> 17.9 Calling subroutines on match of a sequence
> 
> Tasks, task methods, void functions, void function methods, and system
> tasks can be called at the end of a successful non-empty match of a
> sequence. It is illegal to attach a subroutine, or any
> sequence_match_item, to an empty match.
> 
> =20
> 
> Note that this section talks about Subroutines on sequence match.  I
> extended the second line to clarify that this applies to any
> sequence_match_item since there were not other corresponding places to
> state it.=20
> 
> =20
> 
> Lisa
> 
> =20
> 
> -----Original Message-----
> From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of John
> Havlicek
> Sent: Tuesday, January 23, 2007 8:38 PM
> To: sv-ac@eda-stds.org
> Subject: [sv-ac] 1704, empty match, and local variable assignments
> 
> =20
> 
> All:
> 
> =20
> 
> I thought some this afternoon about 1704 and empty match=20
> 
> assignments.
> 
> =20
> 
> It seems intuitive to me that if a sequence matches empty, then
> 
> no local variable assignment within the sequence should be=20
> 
> executed during that evaluation thread. =20
> 
> =20
> 
> It also seems intuitive that if a sequence matches empty, then=20
> 
> we do not want a local variable assignment attached to the sequence=20
> 
> to execute during that evaluation thread. =20
> 
> =20
> 
> I think these are consistent with what is written in 1704 now.
> 
> =20
> 
> What we have currently in Annex E is
> 
> =20
> 
>    (R, v=3De)  \equiv  (R ##0 (1, v=3De))
> 
> =20
> 
> Notice that this says more, namely that if we attach a local
> 
> variable assignment to a sequence, then the underlying sequence=20
> 
> is no longer allowed to match empty.  In other words, Annex E=20
> 
> today implies that
> 
> =20
> 
> (1)   (R, v=3De)  \equiv  (R intersect 1[*1:$], v=3De)
> 
> =20
> 
> (This looks clear to me, although I haven't written a proof.)
> 
> I don't think there is anything wrong with this, but it might
> 
> be criticized as too restrictive.  It is certainly not saying the
> following:=20
> 
> =20
> 
> (2)  (R, v=3De)  \equiv  (R intersect 1[*0]) or (R intersect 1[*1:$], =
> v=3De)
> 
> =20
> 
> The righthand side of (2) says that if R matches empty, ignore the=20
> 
> local variable assignment and go on; otherwise, perform the local
> variable=20
> 
> assignment at the end of a non-empty match of R.
> 
> =20
> 
> Applying the flow rules to the RHS of (2) does no seem to be the right
> 
> thing to do if R cannot match empty -- we get an artificial
> 
> requirement that v flow in in order for v to flow out of (R, v=3De).
> 
> On the other hand, if R can match empty, then applying the flow rules
> 
> to the RHS of (2) seems to give the desirable condition that v=20
> 
> flow out of (R, v=3De) only if it flows in.
> 
> =20
> 
> We may want to think about changing the semantics of (R, v=3De) from
> 
> (1) to (2), but there may be some non-trivial work to adapt the flow
> 
> rules to work with this.  In any case, such a change should be made
> 
> with great care.
> 
> =20
> 
> Best regards,
> 
> =20
> 
> John H.
> 
> =20
> 
> --=20
> 
> This message has been scanned for viruses and
> 
> dangerous content by MailScanner, and is
> 
> believed to be clean.
> 
> =20
> 
> 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Feb 6 04:33:46 2007

This archive was generated by hypermail 2.1.8 : Tue Feb 06 2007 - 04:34:21 PST