[Soot-list] "Operands in conditional operator does not match" using Soot eclipse plug-in
Joe Siponen
joe.siponen at gmail.com
Wed Dec 2 07:47:46 EST 2009
The project is a JDK5 one, but I tried the --polyglot switch and tried to run soot on the source files. This was the result:
Starting from Soot's class library:
soot.Main --d /Users/joes/Documents/signe_workspace/signe/sootOutput --cp [...] --process-dir --keep-line-number --polyglot --xml-attributes --src-prec java
Soot started on Wed Dec 02 13:41:21 CET 2009
compilation failed: Could not compile
Other information that may (or may not be relevant) is:
OS: Mac OS X Snow Leopard
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02-315)
Java HotSpot(TM) Client VM (build 1.5.0_20-141, mixed mode, sharing)
On Dec 2, 2009, at 13:09 , Eric Bodden wrote:
> Joe, unless your code uses Java5 syntax, can you please try to run
> Soot with the -polyglot option? That will enable another frontend.
>
> Eric
>
> --
> Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478 Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>
>
>
> 2009/12/2 Joe Siponen <joe.siponen at gmail.com>:
>> The type of productiontotal is a primitive wrapper class for an integer:
>>
>> private Integer productiontotal;
>>
>> So, to my understanding, it should accept a null for its value as well as any integer value (both a primitive int or a Integer wrapper due to autoboxing in java 5 and onwards).
>>
>>
>> On Dec 2, 2009, at 11:23 , Jochen Wuttke wrote:
>>
>>>
>>> On Dec 2, 2009, at 11:09 AM, Joe Siponen wrote:
>>>
>>>> Yes, the file is perfectly valid and fine otherwise.
>>>>
>>>> All of the lines causing the semantic errors are simple ternary expression of the form "this.productiontotal = (productiontotal == null) ? null : productiontotal.intValue();" and all of these expressions reside in the same method (the original post includes the full method).
>>>>
>>>> I cannot see why Soot's JastAdd frontend would fail to parse ternary expressions...
>>>
>>> Well, the code above is not valid Java, that may be why (your assigning either an int or reference to the same attribute. AFAIK the JAVA compiler should tell you that that's wrong.
>>>
>>> Not sure though, if this is the real reason for JastAdd to fail.
>>>
>>> J.
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20091202/8c219075/attachment.html
More information about the Soot-list
mailing list