Hi John, 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. REPLACE: 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. WITH: 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. 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. Lisa -----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 All: I thought some this afternoon about 1704 and empty match assignments. It seems intuitive to me that if a sequence matches empty, then no local variable assignment within the sequence should be executed during that evaluation thread. It also seems intuitive that if a sequence matches empty, then we do not want a local variable assignment attached to the sequence to execute during that evaluation thread. I think these are consistent with what is written in 1704 now. What we have currently in Annex E is (R, v=e) \equiv (R ##0 (1, v=e)) Notice that this says more, namely that if we attach a local variable assignment to a sequence, then the underlying sequence is no longer allowed to match empty. In other words, Annex E today implies that (1) (R, v=e) \equiv (R intersect 1[*1:$], v=e) (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: (2) (R, v=e) \equiv (R intersect 1[*0]) or (R intersect 1[*1:$], v=e) The righthand side of (2) says that if R matches empty, ignore the local variable assignment and go on; otherwise, perform the local variable assignment at the end of a non-empty match of R. 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=e). 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 flow out of (R, v=e) only if it flows in. We may want to think about changing the semantics of (R, v=e) 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. Best regards, John H. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Feb 5 15:47:43 2007
This archive was generated by hypermail 2.1.8 : Mon Feb 05 2007 - 15:47:54 PST