[Soot-list] NullPointerColourer (Eclipse 3.4.1, Soot 2.3.0)
jg205 at doc.ic.ac.uk
jg205 at doc.ic.ac.uk
Mon Dec 1 12:48:24 EST 2008
Thanks for the reply Eric!
To run the analysis, I am using the eclipse plugin and selecting the Soot -> Process Source File -> Run Soot option on the NullPointerClass I included below. This has the "-src-prec java" command set. The actual command that is executed is:
"soot.Main --f J --p jap.npcolorer enabled:true --d /homes/jg205/Project/workspace/NullPointerColourerTest/sootOutput --cp ... --keep-line-number --xml-attributes --src-prec java NullPointerClass" I did not include the actual classpath as it's really long!
I appear to get the correct String annotations - i.e. hovering over the variables gives the correct null, non-null information... just the colours aren't there :(
Any ideas?
Thanks
Jack
On Mon, 1 Dec 2008, Eric Bodden wrote:
> Jack, I think you may have to process the source code with Soot. It's
> not enough to have the source on your classpath.
>
> You can use "-src-prec java" to make sure that Soot loads your code
> from source. See
> http://www.sable.mcgill.ca/soot/tutorial/usage/index.html
>
> Eric
>
> 2008/12/1 Jack Griffith <jg205 at doc.ic.ac.uk>:
>> Hi,
>>
>> I am trying to run the NullPointerColourer analysis that comes with Soot
>> but I only seem to be getting coloured results in the
>> corresponding .jimple file. The .java file I am running the analysis on
>> is not coloured! :(
>>
>> I've done some searching, and all I could find was that this was a
>> symptom of soot now knowing where the source files are. But, the
>> directory is in the classpath.
>> "...:<secret>/workspace/NullPointerColourerTest/src:..." is part of it,
>> unless I'm being dumb this is what should be there?? I have one class in
>> the src folder, i.e.:
>>
>> public class NullPointerClass
>> {
>> public static void main(String[] args)
>> {
>> String s = null;
>> String t = "Hello";
>>
>> if (s != null)
>> System.out.println(s);
>>
>> if (t != null)
>> System.out.println(t);
>> }
>> }
>>
>> The .xml file that is produced as output contains 0 values for spos,
>> which I am led to believe is a symptom of soot not being able to find
>> this source file (as stated in this thread -
>> http://www.sable.mcgill.ca/pipermail/soot-list/2007-June/001257.html
>>
>> But I don't think this is my problem.
>>
>> Any help would be greatly appreciated!
>>
>> Thanks
>> Jack
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>
>
>
> --
> Eric Bodden
> Sable Research Group, McGill University, Montréal, Canada
> Got an interesting job offer? http://www.bodden.de/hire-me/
>
More information about the Soot-list
mailing list