(0) Obligation:
JBC Problem based on JBC Program:
package simple.complInterv;
public class ComplInterv {
public static void loop(int i) {
while (i*i > 9) {
if (i < 0) {
i = i-1;
} else {
i = i+1;
}
}
}
}
package simple.complInterv;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
ComplInterv.loop(args.length);
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.complInterv.Main.main||0: load ADDR args||args: a32|| ->
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
a32([java.lang.String...]): length iconst_4
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
1:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.complInterv.Main.main||1: arraylength|| - ||a32>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
a32([java.lang.String...]): length iconst_4
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
2:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.complInterv.Main.main||2: simple.complInterv.ComplInterv.loop(I)V|| - ||iconst_4>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
a32([java.lang.String...]): length iconst_4
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
3:
<simple.complInterv.ComplInterv.loop||0: load INT i||i: iconst_4|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.complInterv.Main.main||2: simple.complInterv.ComplInterv.loop|| - ||iconst_4>
String.serialVersionUID: iconstLong_-6849794470754667710
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: iconstLong_8575799808933029326
RuntimeException.serialVersionUID: iconstLong_-7034897190745766939
Exception.serialVersionUID: iconstLong_-3387516993124229948
Throwable.serialVersionUID: iconstLong_-3042686055658047285
a32([java.lang.String...]): length iconst_4
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
Start state of loop:
<simple.complInterv.ComplInterv.loop||0: load INT i||i: i15|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a6(lv_0_0)]
<simple.complInterv.Main.main||2: simple.complInterv.ComplInterv.loop|| - ||i1>
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()
i15: [0,+inf)(1){0,+inf}
i1: [0,+inf){0,+inf}
a6([java.lang.String...]): length i1
Relations:
In the loop head node, references [i15] were interesting.
By SMT, we could prove
((0 <= initial_i15 and 0 <= initial_i1) and (((path1_i25 = (path1_i15 * path1_i15) and path1_i25 = path1_i29 and path1_i32 = (path1_i15 + 1) and path1_i32 = res_i15 and path1_i1 = res_i1 and path1_i15 = initial_i15 and path1_i1 = initial_i1) and (T and path1_i29 > 9 and path1_i15 >= 0)) and ((res_i25 = (res_i15 * res_i15) and res_i25 = res_i29 and res_i32 = (res_i15 + 1)) and !(T and res_i29 > 9 and res_i15 >= 0))))
to be UNSAT. Consequently, the loop will not terminate.