[Soot-list] Call the colorer twice for the same Scene.v()

wii w1zagr33n at gmail.com
Mon May 12 12:03:34 EDT 2014


Hey list,

Sorry for keeping this going. But I still can't find what goes wrong. 
And I really hope on your experience.

I use the Spark Points-to Analysis.
I inject my new SceneTransformer on the phase pack wjap, in order to 
have the results of the analysis.
At that point I insert the tags that I want to visualize.

Everything is fine on the jimple file. I can see the color tag and the 
string tag on the right positions.
But still there's nothing on the source code.
As you can see on the xml file:

<attribute>

      <srcPos sline="0" eline="0" spos="0" epos="0"/>

      <jmpPos sline="27" eline="27" spos="59" epos="61"/>

     <color r="45" g="255" b="84" fg="0" aType="Unknown"/>

     <text info="MyTag at line: 14" aType="MyTag"/>

</attribute>



I was thinking, if this bug has to do with the enabled flags.
I tried debugging it but things went messy if I change anything.
Do you see anything misses or wrong on the following option flags?


Thank you VERY MUCH in advance,

-W.

Options.v().set_src_prec(Options.src_prec_java);

         Options.v().set_polyglot(false);

         Options.v().set_whole_program(true);


         Options.v().set_exclude(Arrays.asList("java", "javax", "sun",

"org.apache", "org.python",

"org.jboss", "javassist",

"org.codehaus", "org.zeroturnaround",

"org.hibernate"));


         // General Options

         Options.v().set_allow_phantom_refs(true);

Options.v().set_no_bodies_for_excluded(true);

         Options.v().set_time(true);

         PhaseOptions.v().setPhaseOption("jb" ,"use-original-names:true");

         PhaseOptions.v().setPhaseOption("jj" ,"use-original-names:true");

         //Use Spark for points-to analysis and call graph

         PhaseOptions.v().setPhaseOption("cg", "enabled:true");

         PhaseOptions.v().setPhaseOption("cg", "implicit-entry:true");

         PhaseOptions.v().setPhaseOption("cg", "verbose:true");

         //Disable CHA

         PhaseOptions.v().setPhaseOption("cg.cha", "enabled:false");

         //Enable Spark

         PhaseOptions.v().setPhaseOption("cg.spark", "enabled:true");

         //Disable Paddle

PhaseOptions.v().setPhaseOption("cg.paddle","enabled:false");


         //Spark General Options

         PhaseOptions.v().setPhaseOption("cg.spark", "verbose:true");

         PhaseOptions.v().setPhaseOption("cg.spark", "ignore-types:true");

         //Geometric context-sensitive analysis

         PhaseOptions.v().setPhaseOption("cg.spark", "geom-pta:true");

         PhaseOptions.v().setPhaseOption("cg.spark", "field-based:true");

         PhaseOptions.v().setPhaseOption("cg.spark", 
"types-for-sites:false");


         // Spark Output Options

         PhaseOptions.v().setPhaseOption("cg.spark", "dump-html:true");

         PhaseOptions.v().setPhaseOption("cg.spark", "dump-pag:true");

         PhaseOptions.v().setPhaseOption("cg.spark", 
"dump-solution:false");

         PhaseOptions.v().setPhaseOption("cg.spark", "add-tags:true");


         // Output control

         Options.v().set_print_tags_in_output(false);

         Options.v().set_xml_attributes(true);

         Options.v().set_output_format(1);

         Options.v().set_keep_line_number(true);

         Options.v().set_keep_offset(true);










Στις 28/04/2014 08:58 μμ, ο/η Bodden, Eric έγραψε:
> Hello.
>
> Sorry but I have no explanation for it. Looks like this needs some debugging...
>
> Best wishes,
> Eric
>
> On 28.04.2014, at 18:09, wii <w1zagr33n at gmail.com> wrote:
>
>> Hi Eric,
>>
>> Thanks for your answer.
>> I face the following problems:
>>
>> 1. I created a ColorTag and also a customized tag MyTag. Although the tags are created on the xml file
>> there's none tag on the source file and the colorTags appear on false positions on the jimple file.
>>
>> e.g As we can see from the XML:
>>
>> <srcPos sline="0" eline="0" spos="0" epos="0"/>
>> <jmpPos sline="9" eline="9" spos="8" epos="12"/>
>> <color r="45" g="255" b="84" fg="0" aType="Unknown"/>
>> <text info="MyTag at line: 3" aType="AliasLocalTag"/>
>> </attribute>
>>
>>
>> Is there any plain explanation for this?
>>
>> 2. I observe that the colour tags appear on better position if the analysis uses the source code, but in
>> this case the results of the Points-to Analysis aren't correct. Instead, if the analysis uses the class files,
>> there are no colour tags but at least the results of Spark are correct.
>> Is there any way to have both?
>>
>> Thank you very much in advance,
>>
>> W.
>> On 09/04/2014 04:31 μμ, Bodden, Eric wrote:
>>> Hi.
>>>
>>>> 1. I want to run a second colorer after soot returns to my main. Is it possible to call it at that point?
>>> At this point all method bodies will have been released/nulled, so that is possibly too late. Why not call it from within a pack?
>>>
>>>> 2. As it seems quite hard to find it out, for a points-to analysis which colorer do I have to call? Does
>>>> every colorer connects with an analysis? How does that works?
>>> There are some predefined colorors for some predefined analyses. If you want one for another analysis then you have to write one yourself. This should be easy, though. Simply create ColorTags for the appropriate statements.
>>>
>>> Cheers,
>>> Eric
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering  at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140512/bafa2b9b/attachment.html 


More information about the Soot-list mailing list