(0) Obligation:
JBC Problem based on JBC Program:
Manifest-Version: 1.0
Created-By: 1.6.0_26 (Sun Microsystems Inc.)
Main-Class: simple/trueDiv/Main
package simple.trueDiv;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
TrueDiv.loop(args.length);
}
}
package simple.trueDiv;
public class TrueDiv {
public static void loop(int i) {
while (true) {
if (i <= 0) {
i--;
} else {
i++;
}
}
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
<simple.trueDiv.Main.main||0: load ADDR args||args: a90|| ->
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a88
String.CASE_INSENSITIVE_ORDER: o45
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o45!: String$CaseInsensitiveComparator()
a88([java.io.ObjectStreamField|]): length 0
a90([java.lang.String...]): length 0
1:
<simple.trueDiv.Main.main||1: arraylength|| - ||a90>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a88
String.CASE_INSENSITIVE_ORDER: o45
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o45!: String$CaseInsensitiveComparator()
a88([java.io.ObjectStreamField|]): length 0
a90([java.lang.String...]): length 0
2:
<simple.trueDiv.Main.main||2: simple.trueDiv.TrueDiv.loop(I)V|| - ||0>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a88
String.CASE_INSENSITIVE_ORDER: o45
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o45!: String$CaseInsensitiveComparator()
a88([java.io.ObjectStreamField|]): length 0
a90([java.lang.String...]): length 0
3:
<simple.trueDiv.TrueDiv.loop||0: load INT i||i: 0|| ->
<simple.trueDiv.Main.main||2: simple.trueDiv.TrueDiv.loop|| - ||0>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a88
String.CASE_INSENSITIVE_ORDER: o45
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o45!: String$CaseInsensitiveComparator()
a88([java.io.ObjectStreamField|]): length 0
a90([java.lang.String...]): length 0
In the loop head node, references [i39] were interesting.
By SMT, we could prove
(0 <= initial_i7 and ((((path1_i39 = path1_i44 and path1_i47 = (path1_i44 + -1) and path1_i47 = res_i39 and path1_i7 = res_i7 and path1_i39 = initial_i39 and path1_i7 = initial_i7) and path1_i44 <= 0) or ((path2_i39 = path2_i45 and path2_i48 = (path2_i45 + 1) and path2_i48 = res_i39 and path2_i7 = res_i7 and path2_i39 = initial_i39 and path2_i7 = initial_i7) and path2_i45 > 0)) and (((res_i39 = res_i44 and res_i47 = (res_i44 + -1)) and !res_i44 <= 0) and ((res_i39 = res_i45 and res_i48 = (res_i45 + 1)) and !res_i45 > 0))))
to be UNSAT. Consequently, the loop will not terminate.