John, Can you give an example of name conflict with the up to date 1549? I don't see it. Doron -----Original Message----- From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On Behalf Of John Havlicek Sent: Friday, November 02, 2007 4:26 PM To: sv-ac@server.eda.org Subject: [sv-ac] 1678 name resolution and the rewriting algorithm of 1549 Hi Folks: In 1549, we introduced a local variable declaration notation in the abstract syntax. In revising the rewriting algorithm, I deleted the parts about making local variable names unique. The rules for overshadowing in 1549 make this unnecessary in some cases. Doron asked about this, but I seemed to convince him that the overshadowing took care of the problems. However, 1678 points out that a naive treatment of local variable identifiers results in name resolution issues when local variables are passed as actual arguments to other instances. The overshadowing mechanism of 1549 does not take care of this problem. I do not think that this problem is specific to local variables. When rewriting and substituting actual arguments, we must respect name resolution. Simply looking at the identifiers, references, etc. written in the source code is not good enough. There can be incorrect aliasing for all sorts of things other than local variables. In order to resolve 1678, I think we need to add some language (hopefully a small amount) to say that name resolution still needs to be taken care of properly when following the rewriting algorithm. Name resolution is not something that we should be trying to capture in Annex F, so I don't think we should make a special point about making local variable identifiers unique. That would give the wrong impression that other references do not also need to be accounted for with care. I have uploaded to Mantis 1678 and attached below an example of carrying out the rewriting algorithm while paying attention to name resolution. I don't envision it being added to the LRM. J.H. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sun Nov 4 05:50:34 2007
This archive was generated by hypermail 2.1.8 : Sun Nov 04 2007 - 05:50:47 PST