(0) Obligation:
JBC Problem based on JBC Program:
package simple.marbie1;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Marbie1.loop(args.length);
}
}
package simple.marbie1;
/* source: http://marble.sru.edu/~mxm4333/loop/page_03.html */
public class Marbie1 {
public static void loop(int i) {
/*
* for(i=4; i>2; i++)
* alert("This is an infinite loop.");
*/
while (i > 2) {
i++;
}
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.marbie1.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
i81: [0,+inf)(1){0,+inf}
a32([java.lang.String...]): length i81
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
1:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.marbie1.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
i81: [0,+inf)(1){0,+inf}
a32([java.lang.String...]): length i81
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
2:
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.marbie1.Main.main||2: simple.marbie1.Marbie1.loop(I)V|| - ||i81>
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
i81: [0,+inf)(1){0,+inf}
a32([java.lang.String...]): length i81
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
3:
<simple.marbie1.Marbie1.loop||0: load INT i||i: i81|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a32(lv_0_0)]
<simple.marbie1.Main.main||2: simple.marbie1.Marbie1.loop|| - ||i81>
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
i81: [0,+inf)(1){0,+inf}
a32([java.lang.String...]): length i81
a34([java.io.ObjectStreamField|]): length iconst_0
o17!: String$CaseInsensitiveComparator()
Relations:
Start state of loop:
<simple.marbie1.Marbie1.loop||0: load INT i||i: i11|| ->
java.lang.String = serialPersistentFields, CASE_INSENSITIVE_ORDER
[a6(lv_0_0)]
<simple.marbie1.Main.main||2: simple.marbie1.Marbie1.loop|| - ||i12>
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()
i11: [0,+inf)(1){0,+inf}
i12: [0,+inf)(1){0,+inf}
a6([java.lang.String...]): length i12
Relations:
In the loop head node, references [i11] were interesting.
By SMT, we could prove
((0 <= initial_i11 and 0 <= initial_i12) and (((path1_i11 = path1_i24 and path1_i26 = (path1_i24 + 1) and path1_i26 = res_i11 and path1_i12 = res_i12 and path1_i11 = initial_i11 and path1_i12 = initial_i12) and (T and path1_i24 > 2)) and ((res_i11 = res_i24 and res_i26 = (res_i24 + 1)) and !(T and res_i24 > 2))))
to be UNSAT. Consequently, the loop will not terminate.