(0) Obligation:
JBC Problem based on JBC Program:
Manifest-Version: 1.0
Created-By: 1.6.0_26 (Sun Microsystems Inc.)
Main-Class: simple/whileIncrPart/Main
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:
<simple.whileIncrPart.Main.main||0: load ADDR args||args: a36|| ->
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
1:
<simple.whileIncrPart.Main.main||1: arraylength|| - ||a36>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
2:
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase(I)V|| - ||4>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
3:
<simple.whileIncrPart.WhileIncrPart.increase||0: load INT i||i: 4|| ->
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase|| - ||4>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
In the loop head node, references [i17] were interesting.
By SMT, we could prove
((0 <= initial_i17 and 0 <= initial_i15) and (((path2_i17 = path2_i25 and path2_i25 = path2_i29 and path2_i32 = (path2_i29 + 1) and path2_i32 = res_i17 and path2_i15 = res_i15 and path2_i17 = initial_i17 and path2_i15 = initial_i15) and (path2_i25 > 0 and path2_i29 > 3)) and ((res_i17 = res_i25 and res_i25 = res_i29 and res_i32 = (res_i29 + 1)) and !(res_i25 > 0 and res_i29 > 3))))
to be UNSAT. Consequently, the loop will not terminate.