0 JBC
↳1 JBCToGraph (⇒, 120 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIDPv1Proof (⇒, 20 ms)
↳6 IDP
↳7 IDPNonInfProof (⇒, 120 ms)
↳8 AND
↳9 IDP
↳10 IDependencyGraphProof (⇔, 0 ms)
↳11 TRUE
↳12 IDP
↳13 IDependencyGraphProof (⇔, 0 ms)
↳14 TRUE
package ClassAnalysis;
public class ClassAnalysis {
A field;
public static void main(String[] args) {
Random.args = args;
ClassAnalysis t = new ClassAnalysis();
t.field = new A();
t.field = new B();
t.eval();
}
public void eval() {
int x = Random.random() % 100;
this.field.test(x);
}
}
class A {
public boolean test(int x) {
while (x > 0) {
if (x > 10) {
x--;
} else {
x++;
}
}
return true;
}
}
class B extends A {
public boolean test(int x) {
while (x > 0) {
x--;
}
return true;
}
}
package ClassAnalysis;
public class Random {
static String[] args;
static int index = 0;
public static int random() {
final String string = args[index];
index++;
return string.length();
}
}
Generated 6 rules for P and 0 rules for R.
P rules:
343_0_test_LE(EOS(STATIC_343), i45, i45) → 359_0_test_LE(EOS(STATIC_359), i45, i45)
359_0_test_LE(EOS(STATIC_359), i45, i45) → 367_0_test_Inc(EOS(STATIC_367), i45) | >(i45, 0)
367_0_test_Inc(EOS(STATIC_367), i45) → 376_0_test_JMP(EOS(STATIC_376), +(i45, -1)) | >(i45, 0)
376_0_test_JMP(EOS(STATIC_376), i48) → 387_0_test_Load(EOS(STATIC_387), i48)
387_0_test_Load(EOS(STATIC_387), i48) → 331_0_test_Load(EOS(STATIC_331), i48)
331_0_test_Load(EOS(STATIC_331), i33) → 343_0_test_LE(EOS(STATIC_343), i33, i33)
R rules:
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
343_0_test_LE(EOS(STATIC_343), x0, x0) → 343_0_test_LE(EOS(STATIC_343), +(x0, -1), +(x0, -1)) | >(x0, 0)
R rules:
Filtered ground terms:
343_0_test_LE(x1, x2, x3) → 343_0_test_LE(x2, x3)
EOS(x1) → EOS
Cond_343_0_test_LE(x1, x2, x3, x4) → Cond_343_0_test_LE(x1, x3, x4)
Filtered duplicate args:
343_0_test_LE(x1, x2) → 343_0_test_LE(x2)
Cond_343_0_test_LE(x1, x2, x3) → Cond_343_0_test_LE(x1, x3)
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
343_0_test_LE(x0) → 343_0_test_LE(+(x0, -1)) | >(x0, 0)
R rules:
Finished conversion. Obtained 2 rules for P and 0 rules for R. System has predefined symbols.
P rules:
343_0_TEST_LE(x0) → COND_343_0_TEST_LE(>(x0, 0), x0)
COND_343_0_TEST_LE(TRUE, x0) → 343_0_TEST_LE(+(x0, -1))
R rules:
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer
(0) -> (1), if (x0[0] > 0 ∧x0[0] →* x0[1])
(1) -> (0), if (x0[1] + -1 →* x0[0])
(1) (>(x0[0], 0)=TRUE∧x0[0]=x0[1] ⇒ 343_0_TEST_LE(x0[0])≥NonInfC∧343_0_TEST_LE(x0[0])≥COND_343_0_TEST_LE(>(x0[0], 0), x0[0])∧(UIncreasing(COND_343_0_TEST_LE(>(x0[0], 0), x0[0])), ≥))
(2) (>(x0[0], 0)=TRUE ⇒ 343_0_TEST_LE(x0[0])≥NonInfC∧343_0_TEST_LE(x0[0])≥COND_343_0_TEST_LE(>(x0[0], 0), x0[0])∧(UIncreasing(COND_343_0_TEST_LE(>(x0[0], 0), x0[0])), ≥))
(3) (x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_343_0_TEST_LE(>(x0[0], 0), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(4) (x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_343_0_TEST_LE(>(x0[0], 0), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(5) (x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_343_0_TEST_LE(>(x0[0], 0), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(6) (x0[0] ≥ 0 ⇒ (UIncreasing(COND_343_0_TEST_LE(>(x0[0], 0), x0[0])), ≥)∧[(-1)Bound*bni_8 + (2)bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(7) (COND_343_0_TEST_LE(TRUE, x0[1])≥NonInfC∧COND_343_0_TEST_LE(TRUE, x0[1])≥343_0_TEST_LE(+(x0[1], -1))∧(UIncreasing(343_0_TEST_LE(+(x0[1], -1))), ≥))
(8) ((UIncreasing(343_0_TEST_LE(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(9) ((UIncreasing(343_0_TEST_LE(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(10) ((UIncreasing(343_0_TEST_LE(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(11) ((UIncreasing(343_0_TEST_LE(+(x0[1], -1))), ≥)∧[bni_10] = 0∧0 = 0∧[2 + (-1)bso_11] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(343_0_TEST_LE(x1)) = [2]x1
POL(COND_343_0_TEST_LE(x1, x2)) = [2]x2
POL(>(x1, x2)) = [-1]
POL(0) = 0
POL(+(x1, x2)) = x1 + x2
POL(-1) = [-1]
COND_343_0_TEST_LE(TRUE, x0[1]) → 343_0_TEST_LE(+(x0[1], -1))
343_0_TEST_LE(x0[0]) → COND_343_0_TEST_LE(>(x0[0], 0), x0[0])
343_0_TEST_LE(x0[0]) → COND_343_0_TEST_LE(>(x0[0], 0), x0[0])
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer