[Soot-list] Some variable names retained, and some not

Dhriti Khanna dhritik at iiitd.ac.in
Thu Oct 10 15:40:16 EDT 2019


I use Java 1.7's rt.jar on classpath.

On Mon, Oct 7, 2019 at 9:28 PM Eric Bodden <eric.bodden at uni-paderborn.de>
wrote:

> Sorry about the slow response.
>
> When you write that it work with JDK-1.7 and soot-2.5.0, do you mean that
> you use Java 1.7 to run Soot or that you use Java 1.7’s rt.jar on Soot’s
> classpath?
>
> Best wishes
> Eric
>
> > On 3. Oct 2019, at 22:11, Dhriti Khanna <dhritik at iiitd.ac.in> wrote:
> >
> > By the way, it is working fine with JDK-1.7 and soot-2.5.0.
> > It is when I use JDK-1.8 and soot-3.3.0, then it causes the
> above-mentioned issue.
> > Is it a bug or some optimization being done?
> >
> > On Thu, Oct 3, 2019 at 2:08 PM Dhriti Khanna <dhritik at iiitd.ac.in>
> wrote:
> > I have also tried compiling the file with -g on command line and then
> running soot via command line with this command:
> >
> > java -cp ~/soot-3.3.0/target/sootclasses-trunk-jar-with-dependencies.jar
> soot.Main -src-prec java -p jb use-original-names:true -f J -cp
> .:/home/dhriti/jdk1.8.0_191/jre/lib/rt.jar Sample
> >
> > Still, the problem persists.
> >
> > On Thu, Oct 3, 2019 at 1:39 PM Dhriti Khanna <dhritik at iiitd.ac.in>
> wrote:
> > Yes, I have this option enabled. Also, I have checked the box to 'Add
> variable attributes to generated class files (used by the debugger)' in
> eclipse. This is identical to the -g option with javac so as to have the
> debugging information enabled.
> >
> > On Tue, Oct 1, 2019 at 5:46 PM Eric Bodden <eric.bodden at uni-paderborn.de>
> wrote:
> > Hi Dhriti.
> >
> > This looks a bit odd. Just to make sure. Do you have the option "-p jb
> use-original-names:true” enabled?
> >
> > Cheers
> > Eric
> >
> > > On 30. Sep 2019, at 14:23, Dhriti Khanna <dhritik at iiitd.ac.in> wrote:
> > >
> > > Hello,
> > > When I generate jimple file for the following code:
> > >
> > > class Point {
> > >   int p;
> > > }
> > >
> > > class Example {
> > >   int a;
> > >   String b;
> > >   Point point;
> > >   Example() {
> > >
> > >   }
> > >   Example(int a) {
> > >   this.a = a;
> > >   }
> > > }
> > >
> > > class Sample {
> > >   LinkedList<Example> allocationQueue;
> > >   Sample() {
> > >     allocationQueue = new LinkedList<Example>();
> > >   }
> > >   public void func(int a) throws InterruptedException {
> > >     int x;
> > >     x = a+10;
> > >     allocationQueue = new LinkedList<Example>();
> > >     Example example = new Example();
> > >     example.point = new Point();
> > >     Point p = example.point;
> > >     System.out.println(example);
> > >   }
> > > }
> > >
> > > Why is it that some variable names are retained like Point 'p', and
> some not? In this case, 'example' is not retained. It is instead replaced
> with $stack6 as you can see in the jimple file attached.
> > >
> > > --
> > > Regards
> > > Dhriti Khanna
> > > PhD Scholar
> > > IIIT Delhi
> > > <Sample.jimple>_______________________________________________
> > > Soot-list mailing list
> > > Soot-list at CS.McGill.CA
> > > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> >
> >
> >
> > --
> > Regards
> > Dhriti Khanna
> > PhD Scholar
> > IIIT Delhi
> >
> >
> > --
> > Regards
> > Dhriti Khanna
> > PhD Scholar
> > IIIT Delhi
> >
> >
> > --
> > Regards
> > Dhriti Khanna
> > PhD Scholar
> > IIIT Delhi
>
>

-- 
Regards
Dhriti Khanna
PhD Scholar
IIIT Delhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20191011/220f9751/attachment.html>


More information about the Soot-list mailing list