<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
h2
{mso-style-priority:9;
mso-style-link:"Überschrift 2 Zchn";
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:18.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.berschrift2Zchn
{mso-style-name:"Überschrift 2 Zchn";
mso-style-priority:9;
mso-style-link:"Überschrift 2";
font-family:"Calibri",sans-serif;
font-weight:bold;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Umar,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US">You can get the left side and right side of AssignStmt in soot using getLeftOp() and getRightOp(). The return value of these two functions are of type Value. Just check the subinterfaces of Value, you will find InstanceFieldRef. Assume you
have an AssignStmt called a, here is an example for your purpose:<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US" style="color:#2F5597;mso-style-textfill-fill-color:#2F5597;mso-style-textfill-fill-alpha:100.0%"><o:p> </o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US" style="color:#2F5597;mso-style-textfill-fill-color:#2F5597;mso-style-textfill-fill-alpha:100.0%">Value leftOp=a.getLeftOp();<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US" style="color:#2F5597;mso-style-textfill-fill-color:#2F5597;mso-style-textfill-fill-alpha:100.0%">if(leftOp instanceof Local)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US" style="color:#2F5597;mso-style-textfill-fill-color:#2F5597;mso-style-textfill-fill-alpha:100.0%"> //assignment to a local.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US" style="color:#2F5597;mso-style-textfill-fill-color:#2F5597;mso-style-textfill-fill-alpha:100.0%">else if(leftOp instanceof InstanceFieldRef)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US" style="color:#2F5597;mso-style-textfill-fill-color:#2F5597;mso-style-textfill-fill-alpha:100.0%"> //assignment to an instance field.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:7.5pt;margin-right:0cm;margin-bottom:7.5pt;margin-left:0cm;background:white">
<span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Linghui Luo<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>Von:</b> Soot-list [mailto:soot-list-bounces@CS.McGill.CA]
<b>Im Auftrag von </b>Umar Farooq<br>
<b>Gesendet:</b> Donnerstag, 22. Februar 2018 00:58<br>
<b>An:</b> soot-list@cs.mcgill.ca<br>
<b>Betreff:</b> [Soot-list] [Soot] identify write operation on Local<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Hi All,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">I want to identify the read and write operations on local. In order to identify a write operation, it can be a simple assignment to object or it can any small update like "</span><span style="font-family:"Courier New"">object.a
= 11</span><span style="font-family:"Arial",sans-serif">". Similar for the read, it can be complete object or some part of it. </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Is there any API or helper method inside the Soot that can help me out for this purpose? </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Thanks,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Umar</span><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>