(0) Obligation:
JBC Problem based on JBC Program:
Manifest-Version: 1.0
Created-By: 1.6.0_26 (Sun Microsystems Inc.)
Main-Class: simple/marbie1/Main
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:
<simple.marbie1.Main.main||0: load ADDR args||args: a34|| ->
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 3
1:
<simple.marbie1.Main.main||1: arraylength|| - ||a34>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 3
2:
<simple.marbie1.Main.main||2: simple.marbie1.Marbie1.loop(I)V|| - ||3>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 3
3:
<simple.marbie1.Marbie1.loop||0: load INT i||i: 3|| ->
<simple.marbie1.Main.main||2: simple.marbie1.Marbie1.loop|| - ||3>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 3
In the loop head node, references [i14] were interesting.
By SMT, we could prove
((0 <= initial_i14 and 0 <= initial_i13) and (((path1_i14 = path1_i26 and path1_i28 = (path1_i26 + 1) and path1_i28 = res_i14 and path1_i13 = res_i13 and path1_i14 = initial_i14 and path1_i13 = initial_i13) and path1_i26 > 2) and ((res_i14 = res_i26 and res_i28 = (res_i26 + 1)) and !res_i26 > 2)))
to be UNSAT. Consequently, the loop will not terminate.