[Soot-list] my StrongLocalMustAliasAnalysis gives unexpected results

Zhoulai zell08v at orange.fr
Mon Oct 22 04:41:12 EDT 2012


Hi, Eric

Thanks for your clarifying this.

However, I was *not* using value number (i.e.
getFlowBefore.get(stmt).get(local)) as the indicator to decide whether two
locals strongly  must-alias or not.*  We were using instanceKeyString(stmt,
local)* to decide strong must alias.

 If I understand correctly, StrongMustAliasAnalysis overrides the
instanceKeyString of its super class LocalMustAliasAnalysis in such a way
that the invalid instanceKeys are bound to UNKNOWN. Below is the source
code from StrongMustAliasAnalysis

    @Override
    public String instanceKeyString(Local l, Stmt s) {
        Object ln = getFlowBefore(s).get(l);
        if(invalidInstanceKeys.contains(ln)) {
            return UNKNOWN_LABEL;
        }
        return super.instanceKeyString(l, s);
    }

So I believe it is correct to conclude that StrongMustAliasAnalysis sole
relies on instanceKeyString.  As you said, the value numbers are used to
decide the weak must-alias, and not sufficient to decide the strong
must-alias.

Zell.

But Zell, I think you are still mistaken. As I explained earlier, it
> is *not* enough to look at the value numbers! Yes, the variables may
> be assigned the same numbers but still StrongMustAliasAnalysis will
> probably return FALSE, as this value number would have been
> invalidated. For StrongMustAliasAnalysis you must not solely rely on
> the value numbers!
>
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20121022/33590a75/attachment.html 


More information about the Soot-list mailing list