<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 14, 2015 at 7:49 AM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Jan 13, 2015 at 11:26 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On 13 January 2015 at 22:11, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is caused by CFLAA returning PartialAlias for a query that BasicAA can prove is NoAlias.</div></blockquote><div><br></div></span><div>One of them is wrong. Which one? </div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> <br></div></div></div></div></blockquote></span><div>CFL-AA.</div><div><br></div><div>Right now it checks whether two things come out to be the same stratified info and have the same index, and if so, returns PartialAlias. This is wrong, because it never knows why two things got unified, only that they did.  </div></div></div></div></blockquote><div><br></div><div>Someone asked what I meant by this, so, two things:<br>First, CFL-AA does not know whether the statements it processes will ever be executed or where they occur in the function.. The results also do not depend on the order in which statements are processed.</div><div><br></div><div>So even if it only sees one assignment and nothing else, and unifies those two variable, the result is no different whether the assignment is in a branch or whether it is the only statement in the function.</div><div><br></div><div>IE</div><div><br></div><div>int *a;</div><div>int *b;</div><div><br></div><div>a = b</div><div><br></div><div>and </div><div><br></div><div>if (c)<br>  a = b</div><div><br></div><div><br></div><div>should produce the same pointer-analysis result with CFL-AA (and all flow + path -insensitive analysis).</div><div><br></div><div>If these are the only pointer assigning statements in the function, the first is must-alias, the second is may-alias.</div><div>Because it cannot distinguish these two, IMHO, it can never return must-alias (or partialalias).</div><div><br></div><div>Second, the process of pointer info unification is not and should not be related to the process of assignments in practice (and thus, even if you could distinguish the above, the fact that it believes two pointers equivalent does not make them must-alias).</div><div> </div><div>Variables may get unified because we lack info and it's the conservatively safe thing to do, or even because we are trying to lower the time bounds and decide losing precision is okay.</div><div><br></div><div>In short, unless i'm missing something drastic, i can't see how CFL-AA can ever produce must-alias or partial-alias info.<br></div><div><br></div></div></div></div>