[Soot-list] keep original variable names in CFG

Enoch shi enshengshi97 at gmail.com
Thu Oct 22 02:21:37 EDT 2020


Thanks!
You're right. It is a  bug with the Java source code frontend.
when i run "java -cp sootclasses-trunk-jar-with-dependencies.jar
 soot.tools.CFGViewer --soot-classpath .;"%JAVA_HOME%"\jre\lib\rt.jar
--graph=BriefBlockGraph    Triangle " twice .
OS: window10
Java 7
Soot 3.0.1

The first loaded  Triangle.java,  the 2nd loaded  Triangle.class.  The
different results (Triangle_java.dot and Triangle_calss.dot ) are generated.

 Triangle_calss.dot  is visualized as Triangle_class.png, which is
reasonable.
 And  Triangle_java.dot  is visualized as Triangle_java.png,  which looks
wrong:
              1. it remains the original name .
              2. There are some nodes name "goto label**" which is not
necessary and wrong.





Variable is

Eric Bodden <eric.bodden at uni-paderborn.de> 于2020年10月21日周三 下午11:10写道:

> Hmm this is odd.
>
> I can confirm that the Jimple code does not get generated with original
> names although it should. I wonder if there is a more general bug with the
> Java source code frontend. It seems quite related to
> https://github.com/soot-oss/soot/issues/1262
>
> Let me follow up on that.
>
> Cheers
> Eric
>
> > On 21. Oct 2020, at 11:14, Enoch shi <enshengshi97 at gmail.com> wrote:
> >
> >  I loaded  sootTest.Straight_line form a source-code   Thanks ---ensheng
> >
> > Eric Bodden <eric.bodden at uni-paderborn.de> 于2020年10月19日周一 下午6:50写道:
> > Hello.
> >
> > Are you loading sootTest.Straight_line form a source-code or bytecode
> file?
> >
> > Cheers
> > Eric
> >
> > > On 15. Oct 2020, at 16:40, Enoch shi <enshengshi97 at gmail.com> wrote:
> > >
> > > HI Admin
> > >
> > >                     I used   use [java7 soot3.0.1] to generate CFG .
> It is a very nice tools.
> > >                     I want to use the original  variable names in
> CFG.
> > >                     However,  It don't keep  original variable names
> in CFG when i add  "-p jb use-original-names:true".
> > > My environment is:
> > > OS: window10
> > > Java 7
> > > Soot 3.0.1
> > > cmd: java -cp sootclasses-trunk-jar-with-dependencies.jar
> soot.tools.CFGViewer --soot-classpath .;"%JAVA_HOME%"\jre\lib\rt.jar
> --graph=BriefBlockGraph     sootTest.Straight_line
> > > <straight_line.dot.png>
> > > i hope temp $2 is original variable names : perimeter
> > >
> > > Thanks
> > > ensheng
> > >
> > >
> > >
> > >
> <Straight_line.java><sootclasses-trunk-jar-with-dependencies.jar>_______________________________________________
> > > Soot-list mailing list
> > > Soot-list at CS.McGill.CA
> > > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Triangle_calss.dot
Type: application/msword
Size: 1498 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0002.dot>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Triangle.class
Type: application/octet-stream
Size: 448 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0001.class>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Triangle_java.dot
Type: application/msword
Size: 2097 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0003.dot>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Triangle.java
Type: application/octet-stream
Size: 746 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Triangle_java.png
Type: image/png
Size: 84687 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Triangle_class.png
Type: image/png
Size: 62039 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201022/cf30dfda/attachment-0003.png>


More information about the Soot-list mailing list