Hi Lisa: You have a good point that 17.9 does not explain what to do when the sequence to which the subroutines are attached matches empty. I believe that if a sequence matches empty, then none of the match items should be evaluated or executed -- i.e., local variable assignements should not made and attached subroutines should not be executed. I think that the presentation in 17.9 should be changed to say that the sequence match items execute on non-empty match of the associated sequence. Can you enter a Mantis item for this? My motivation for these opinions is that we started out with only local variable assignments as match items, and originally we could only attach them to booleans. We got the local variables attached to more general sequences as a derivation: (R, v = e) \equiv (R ##0 (1, v = e)) The ##0 excludes empty matches of R from generating matches of the right side, hence also of the left. Also, in the formal semantics, there is be no change to the local variable context on an empty match: w,L,L' |== r[*0] iff |w| = 0 and L' = L I recommend that we try to follow the same rules with all sequence match items: (R, match_item) \equiv (R ##0 (1, match_item)) Intuitively, if a sub-evaluation produces an empty match of R, then it cannot combine this with ##0 to (1, match_item), and so the match_item should not execute. Best regards, John H. > ------_=_NextPart_001_01C72F90.97363E77 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > I have a question. If there is a "sequence_match_item" associated with a > potentially empty sequence, does it get executed when the sequence is > empty? Given the example in the std, there could be a > sequence_match_item associated with the potentially empty seq > (potentially empty meaning a repetition range like [*0:3]) and also a > sequence_match_item associated with the "seq". Are both executed > simultaneously? > > =20 > > Starting on page 293 of the document, page 259 of the pdf, it states: > > =20 > > " Using 0 as the repetition number, an empty sequence results, as > follows: > > a [*0] > > =20 > > An empty sequence is one that does not match over any positive number of > clock ticks. The following rules > > apply for concatenating sequences with empty sequences. An empty > sequence is denoted as empty, and a > > sequence is denoted as seq. > > - (empty ##0 seq) does not result in a match. > > - (seq ##0 empty) does not result in a match. > > - (empty ##n seq), where n is greater than 0, is equivalent to (##(n-1) > seq). > > - (seq ##n empty), where n is greater than 0, is equivalent to (seq > ##(n-1) 'true). > > =20 > > For example: > > b ##1 ( a[*0] ##0 c) > > produces no match of the sequence. > > =20 > > b ##1 a[*0:1] ##2 c > > is equivalent to > > (b ##2 c) or (b ##1 a ##2 c) > > =20 > > Lisa > > =20 > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Jan 4 06:07:47 2007
This archive was generated by hypermail 2.1.8 : Thu Jan 04 2007 - 06:07:58 PST