[Soot-list] How to propagate constant defined in class fields to class methods ?

Xinxin Jin xinxinjin89 at gmail.com
Sat Feb 7 13:49:27 EST 2015


Hello,

I have a question about how constants propagate from class fields to class
methods. I have a simple testing code:

public class MyActivity extends ActionBarActivity {
    private int DEFAULT_TIMEOUT = 30000;

    @Override
  protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new FetchItemsTask().execute();
  }
  private class FetchItemsTask extends AsyncTask<Void,Void,String>{
@Override
protected String doInBackground(Void... arg0) {
            int timeoutConnection = DEFAULT_TIMEOUT;
  HttpParams httpParameters = new BasicHttpParams();
  HttpConnectionParams.setConnectionTimeout(httpParameters,
timeoutConnection);
        }
}

​Basically I want to get the value of timeoutConnection called by
setConnectionTimeout. I used both ConstantPropagatorAndFolder() defined in
soot and InterproceduralConstantValuePropagator() defined in Soot-infoflow,
and expect DEFAULT_TIMEOUT should propagate to the parameter of
setConnnectionTimeout. However, I cannot get the integer constant from
setConnectionTimeout.

I guess if neither  ConstantPropagatorAndFolder() nor
InterproceduralConstantValuePropagator() propagate the class fields to
class methods ?  Then what is the correct way to do this ?
Please help me out !

Thank you for your help in advance !


-- 
Xinxin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150207/2e820349/attachment.html 


More information about the Soot-list mailing list