(0) Obligation:
JBC Problem based on JBC Program:
package simple.whileBreak;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
WhileBreak.loop(args.length);
}
}
package simple.whileBreak;
public class WhileBreak {
public static void loop(int i) {
while (i > 10) {
if (i > 20) {
i++;
} else {
i--;
}
if (i == 30) {
break;
}
}
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a58(lv_0_0)]
<simple.whileBreak.Main.main||0: load ADDR args||args: a58|| ->
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a60
String.CASE_INSENSITIVE_ORDER: o33
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i125: [0,+inf)(1){0,+inf}
a58([java.lang.String...]): length i125
a60([java.io.ObjectStreamField|]): length iconst_0
o33!: String$CaseInsensitiveComparator()
Relations:
1:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a58(lv_0_0)]
<simple.whileBreak.Main.main||1: arraylength|| - ||a58>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a60
String.CASE_INSENSITIVE_ORDER: o33
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i125: [0,+inf)(1){0,+inf}
a58([java.lang.String...]): length i125
a60([java.io.ObjectStreamField|]): length iconst_0
o33!: String$CaseInsensitiveComparator()
Relations:
2:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a58(lv_0_0)]
<simple.whileBreak.Main.main||2: simple.whileBreak.WhileBreak.loop(I)V|| - ||i125>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a60
String.CASE_INSENSITIVE_ORDER: o33
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i125: [0,+inf)(1){0,+inf}
a58([java.lang.String...]): length i125
a60([java.io.ObjectStreamField|]): length iconst_0
o33!: String$CaseInsensitiveComparator()
Relations:
3:
<simple.whileBreak.WhileBreak.loop||0: load INT i||i: i125|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a58(lv_0_0)]
<simple.whileBreak.Main.main||2: simple.whileBreak.WhileBreak.loop|| - ||i125>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a60
String.CASE_INSENSITIVE_ORDER: o33
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
i125: [0,+inf)(1){0,+inf}
a58([java.lang.String...]): length i125
a60([java.io.ObjectStreamField|]): length iconst_0
o33!: String$CaseInsensitiveComparator()
Relations:
Start state of loop:
<simple.whileBreak.WhileBreak.loop||0: load INT i||i: i20|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a8(lv_0_0)]
<simple.whileBreak.Main.main||2: simple.whileBreak.WhileBreak.loop|| - ||i21>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a7
String.CASE_INSENSITIVE_ORDER: o5
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
a7([java.io.ObjectStreamField|]): length iconst_0
o5!: String$CaseInsensitiveComparator()
i20: [0,+inf)(1){-1,+inf}
i21: [0,+inf)(1){0,+inf}
a8([java.lang.String...]): length i21
Relations:
In the loop head node, references [i20] were interesting.
By SMT, we could prove
((0 <= initial_i20 and 0 <= initial_i21) and (((path3_i20 = path3_i33 and path3_i33 = path3_i39 and path3_i41 = (path3_i39 + 1) and path3_i41 = path3_i87 and path3_i87 = res_i20 and path3_i21 = res_i21 and path3_i20 = initial_i20 and path3_i21 = initial_i21) and (T and path3_i33 > 10 and T and path3_i39 > 20 and T and path3_i87 > 30)) and ((res_i20 = res_i33 and res_i33 = res_i39 and res_i41 = (res_i39 + 1) and res_i41 = res_i87) and !(T and res_i33 > 10 and T and res_i39 > 20 and T and res_i87 > 30))))
to be UNSAT. Consequently, the loop will not terminate.