(0) Obligation:
JBC Problem based on JBC Program:
package simple.whileIncrPart;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
WhileIncrPart.increase(args.length);
}
}
package simple.whileIncrPart;
public class WhileIncrPart {
public static void increase(int i) {
while (i > 0) {
if (i > 3) {
i++;
} else {
i--;
}
}
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a34(lv_0_0)]
<simple.whileIncrPart.Main.main||0: load ADDR args||args: a34|| ->
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a36
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i84: [0,+inf)(1){0,+inf}
a34([java.lang.String...]): length i84
a36([java.io.ObjectStreamField|]): length iconst_0
o18!: String$CaseInsensitiveComparator()
Relations:
1:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a34(lv_0_0)]
<simple.whileIncrPart.Main.main||1: arraylength|| - ||a34>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a36
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i84: [0,+inf)(1){0,+inf}
a34([java.lang.String...]): length i84
a36([java.io.ObjectStreamField|]): length iconst_0
o18!: String$CaseInsensitiveComparator()
Relations:
2:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a34(lv_0_0)]
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase(I)V|| - ||i84>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a36
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i84: [0,+inf)(1){0,+inf}
a34([java.lang.String...]): length i84
a36([java.io.ObjectStreamField|]): length iconst_0
o18!: String$CaseInsensitiveComparator()
Relations:
3:
<simple.whileIncrPart.WhileIncrPart.increase||0: load INT i||i: i84|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a34(lv_0_0)]
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase|| - ||i84>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a36
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i84: [0,+inf)(1){0,+inf}
a34([java.lang.String...]): length i84
a36([java.io.ObjectStreamField|]): length iconst_0
o18!: String$CaseInsensitiveComparator()
Relations:
Start state of loop:
<simple.whileIncrPart.WhileIncrPart.increase||0: load INT i||i: i16|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a6(lv_0_0)]
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase|| - ||i17>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a5
String.CASE_INSENSITIVE_ORDER: o3
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
a5([java.io.ObjectStreamField|]): length iconst_0
o3!: String$CaseInsensitiveComparator()
i16: [0,+inf)(1){-1,+inf}
i17: [0,+inf)(1){0,+inf}
a6([java.lang.String...]): length i17
Relations:
In the loop head node, references [i16] were interesting.
By SMT, we could prove
((0 <= initial_i16 and 0 <= initial_i17) and (((path2_i16 = path2_i25 and path2_i25 = path2_i30 and path2_i32 = (path2_i30 + 1) and path2_i32 = res_i16 and path2_i17 = res_i17 and path2_i16 = initial_i16 and path2_i17 = initial_i17) and (path2_i25 > 0 and T and path2_i30 > 3)) and ((res_i16 = res_i25 and res_i25 = res_i30 and res_i32 = (res_i30 + 1)) and !(res_i25 > 0 and T and res_i30 > 3))))
to be UNSAT. Consequently, the loop will not terminate.