(0) Obligation:
JBC Problem based on JBC Program:
Manifest-Version: 1.0
Created-By: 1.6.0_26 (Sun Microsystems Inc.)
Main-Class: simple/upAndDown/Main
package simple.upAndDown;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
UpAndDown.upAndDown(args.length);
}
}
package simple.upAndDown;
public class UpAndDown {
public static void upAndDown(int i) {
boolean up = false;
while (0 <= i && i <= 10) {
if (i == 10) {
up = false;
}
if (i == 0) {
up = true;
}
if (up) {
i++;
} else {
i--;
}
}
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
<simple.upAndDown.Main.main||0: load ADDR args||args: a148|| ->
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a146
String.CASE_INSENSITIVE_ORDER: o74
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o74!: String$CaseInsensitiveComparator()
a146([java.io.ObjectStreamField|]): length 0
a148([java.lang.String...]): length 10
1:
<simple.upAndDown.Main.main||1: arraylength|| - ||a148>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a146
String.CASE_INSENSITIVE_ORDER: o74
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o74!: String$CaseInsensitiveComparator()
a146([java.io.ObjectStreamField|]): length 0
a148([java.lang.String...]): length 10
2:
<simple.upAndDown.Main.main||2: simple.upAndDown.UpAndDown.upAndDown(I)V|| - ||10>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a146
String.CASE_INSENSITIVE_ORDER: o74
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o74!: String$CaseInsensitiveComparator()
a146([java.io.ObjectStreamField|]): length 0
a148([java.lang.String...]): length 10
3:
<simple.upAndDown.UpAndDown.upAndDown||0: push 0||i: 10|| ->
<simple.upAndDown.Main.main||2: simple.upAndDown.UpAndDown.upAndDown|| - ||10>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a146
String.CASE_INSENSITIVE_ORDER: o74
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o74!: String$CaseInsensitiveComparator()
a146([java.io.ObjectStreamField|]): length 0
a148([java.lang.String...]): length 10
4:
<simple.upAndDown.UpAndDown.upAndDown||1: store INT to up||i: 10||0>
<simple.upAndDown.Main.main||2: simple.upAndDown.UpAndDown.upAndDown|| - ||10>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a146
String.CASE_INSENSITIVE_ORDER: o74
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o74!: String$CaseInsensitiveComparator()
a146([java.io.ObjectStreamField|]): length 0
a148([java.lang.String...]): length 10
5:
<simple.upAndDown.UpAndDown.upAndDown||2: push 0||i: 10, up: 0|| ->
<simple.upAndDown.Main.main||2: simple.upAndDown.UpAndDown.upAndDown|| - ||10>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a146
String.CASE_INSENSITIVE_ORDER: o74
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o74!: String$CaseInsensitiveComparator()
a146([java.io.ObjectStreamField|]): length 0
a148([java.lang.String...]): length 10
In the loop head node, references [i53, i54, iconst_0] were interesting.
By SMT, we could prove
((0 <= initial_i53 and 0 <= initial_i54 and initial_i54 <= 1 and 0 <= initial_i16) and ((((path1_i53 = path1_i73 and path1_i73 = path1_i77 and path1_i77 = path1_i79 and path1_i80 = (path1_i79 + 1) and path1_i80 = res_i53 and 1 = res_i54 and path1_i16 = res_i16 and path1_i53 = initial_i53 and path1_i54 = initial_i54 and path1_i16 = initial_i16) and (0 <= path1_i53 and path1_i73 <= 10 and path1_i77 != 10 and path1_i79 > 0 and path1_i54 = 1 and 1 > 0)) or ((path3_i53 = path3_i73 and 9 = res_i53 and 0 = res_i54 and path3_i16 = res_i16 and path3_i53 = initial_i53 and path3_i54 = initial_i54 and path3_i16 = initial_i16) and (0 <= path3_i53 and path3_i73 <= 10 and path3_i73 = 10 and 10 > 0 and T)) or ((path1_i53 = path1_i73 and path1_i73 = path1_i77 and path1_i77 = path1_i79 and path1_i80 = (path1_i79 + 1) and path1_i80 = res_i53 and 1 = res_i54 and path1_i16 = res_i16 and path1_i53 = initial_i53 and path1_i54 = initial_i54 and path1_i16 = initial_i16) and (0 <= path1_i53 and path1_i73 <= 10 and path1_i79 > 0 and path1_i54 = 1 and 1 > 0 and path1_i77 < 10)) or ((path1_i53 = path1_i73 and path1_i73 = path1_i77 and path1_i77 = path1_i79 and path1_i80 = (path1_i79 + 1) and path1_i80 = res_i53 and 1 = res_i54 and path1_i16 = res_i16 and path1_i53 = initial_i53 and path1_i54 = initial_i54 and path1_i16 = initial_i16) and (0 <= path1_i53 and path1_i73 <= 10 and path1_i79 > 0 and path1_i54 = 1 and 1 > 0 and path1_i77 > 10)) or ((path2_i53 = path2_i73 and path2_i73 = path2_i77 and path2_i77 = path2_i79 and path2_i81 = (path2_i79 + -1) and path2_i81 = res_i53 and 0 = res_i54 and path2_i16 = res_i16 and path2_i53 = initial_i53 and path2_i54 = initial_i54 and path2_i16 = initial_i16) and (0 <= path2_i53 and path2_i73 <= 10 and path2_i79 > 0 and path2_i54 = 0 and T and path2_i77 > 10))) and (((res_i53 = res_i73 and res_i73 = res_i77 and res_i77 = res_i79 and res_i80 = (res_i79 + 1)) and !(0 <= res_i53 and res_i73 <= 10 and res_i77 != 10 and res_i79 > 0 and res_i54 = 1 and 1 > 0)) and (res_i53 = res_i73 and !(0 <= res_i53 and res_i73 <= 10 and res_i73 = 10 and 10 > 0 and T)) and ((res_i53 = res_i73 and res_i73 = res_i77 and res_i77 = res_i79 and res_i80 = (res_i79 + 1)) and !(0 <= res_i53 and res_i73 <= 10 and res_i77 != 10 and res_i79 > 0 and res_i54 = 1 and 1 > 0)) and ((res_i53 = res_i73 and res_i73 = res_i77 and res_i77 = res_i79 and res_i80 = (res_i79 + 1)) and !(0 <= res_i53 and res_i73 <= 10 and res_i77 != 10 and res_i79 > 0 and res_i54 = 1 and 1 > 0)) and ((res_i53 = res_i73 and res_i73 = res_i77 and res_i77 = res_i79 and res_i81 = (res_i79 + -1)) and !(0 <= res_i53 and res_i73 <= 10 and res_i77 != 10 and res_i79 > 0 and res_i54 = 0 and T)))))
to be UNSAT. Consequently, the loop will not terminate.