0 JBC
↳1 JBC2FIG (⇒)
↳2 JBCTerminationGraph
↳3 FIGtoITRSProof (⇒)
↳4 IDP
↳5 IDPNonInfProof (⇒)
↳6 AND
↳7 IDP
↳8 IDependencyGraphProof (⇔)
↳9 TRUE
↳10 IDP
↳11 IDependencyGraphProof (⇔)
↳12 TRUE
/**
* A recursive loop.
*
* All calls terminate.
*
* Julia + BinTerm prove that all calls terminate.
*
* @author <A HREF="mailto:fausto.spoto@univr.it">Fausto Spoto</A>
*/
public class Double3 {
private static void test(int n) {
while (--n > 0) test(n);
}
public static void main(String[] args) {
test(10);
}
}
Generated 13 rules for P and 2 rules for R.
Combined rules. Obtained 2 rules for P and 0 rules for R.
Filtered ground terms:
150_0_test_Inc(x1, x2) → 150_0_test_Inc(x2)
158_0_test_Return(x1) → 158_0_test_Return
Cond_150_0_test_Inc(x1, x2, x3) → Cond_150_0_test_Inc(x1, x3)
Filtered duplicate args:
167_1_test_InvokeMethod(x1, x2, x3) → 167_1_test_InvokeMethod(x1, x3)
Combined rules. Obtained 2 rules for P and 0 rules for R.
Finished conversion. Obtained 2 rules for P and 0 rules for R. System has predefined symbols.
!= | ~ | 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 ((0 < x0[0] + -1 →* TRUE)∧(x0[0] →* x0[1]))
(0) -> (2), if ((0 < x0[0] + -1 →* TRUE)∧(x0[0] →* x0[2]))
(1) -> (3), if ((150_0_test_Inc(x0[1] + -1) →* 158_0_test_Return)∧(x0[1] + -1 →* x0[3]))
(2) -> (0), if ((x0[2] + -1 →* x0[0]))
(3) -> (0), if ((x0[3] →* x0[0]))
(1) (<(0, +(x0[0], -1))=TRUE∧x0[0]=x0[1] ⇒ 150_0_TEST_INC(x0[0])≥NonInfC∧150_0_TEST_INC(x0[0])≥COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])∧(UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥))
(2) (<(0, +(x0[0], -1))=TRUE ⇒ 150_0_TEST_INC(x0[0])≥NonInfC∧150_0_TEST_INC(x0[0])≥COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])∧(UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥))
(3) (x0[0] + [-2] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(4) (x0[0] + [-2] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(5) (x0[0] + [-2] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(6) (x0[0] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12 + (4)bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(7) (<(0, +(x0[0], -1))=TRUE∧x0[0]=x0[2] ⇒ 150_0_TEST_INC(x0[0])≥NonInfC∧150_0_TEST_INC(x0[0])≥COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])∧(UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥))
(8) (<(0, +(x0[0], -1))=TRUE ⇒ 150_0_TEST_INC(x0[0])≥NonInfC∧150_0_TEST_INC(x0[0])≥COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])∧(UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥))
(9) (x0[0] + [-2] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(10) (x0[0] + [-2] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(11) (x0[0] + [-2] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(12) (x0[0] ≥ 0 ⇒ (UIncreasing(COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])), ≥)∧[(-1)Bound*bni_12 + (4)bni_12] + [(2)bni_12]x0[0] ≥ 0∧[(-1)bso_13] ≥ 0)
(13) (COND_150_0_TEST_INC(TRUE, x0[1])≥NonInfC∧COND_150_0_TEST_INC(TRUE, x0[1])≥167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))∧(UIncreasing(167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))), ≥))
(14) ((UIncreasing(167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))), ≥)∧[(-1)bso_15] ≥ 0)
(15) ((UIncreasing(167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))), ≥)∧[(-1)bso_15] ≥ 0)
(16) ((UIncreasing(167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))), ≥)∧[(-1)bso_15] ≥ 0)
(17) ((UIncreasing(167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))), ≥)∧0 = 0∧[(-1)bso_15] ≥ 0)
(18) (COND_150_0_TEST_INC(TRUE, x0[2])≥NonInfC∧COND_150_0_TEST_INC(TRUE, x0[2])≥150_0_TEST_INC(+(x0[2], -1))∧(UIncreasing(150_0_TEST_INC(+(x0[2], -1))), ≥))
(19) ((UIncreasing(150_0_TEST_INC(+(x0[2], -1))), ≥)∧[2 + (-1)bso_17] ≥ 0)
(20) ((UIncreasing(150_0_TEST_INC(+(x0[2], -1))), ≥)∧[2 + (-1)bso_17] ≥ 0)
(21) ((UIncreasing(150_0_TEST_INC(+(x0[2], -1))), ≥)∧[2 + (-1)bso_17] ≥ 0)
(22) ((UIncreasing(150_0_TEST_INC(+(x0[2], -1))), ≥)∧0 = 0∧[2 + (-1)bso_17] ≥ 0)
(23) (x0[3]=x0[0] ⇒ 167_1_TEST_INVOKEMETHOD(158_0_test_Return, x0[3])≥NonInfC∧167_1_TEST_INVOKEMETHOD(158_0_test_Return, x0[3])≥150_0_TEST_INC(x0[3])∧(UIncreasing(150_0_TEST_INC(x0[3])), ≥))
(24) (167_1_TEST_INVOKEMETHOD(158_0_test_Return, x0[3])≥NonInfC∧167_1_TEST_INVOKEMETHOD(158_0_test_Return, x0[3])≥150_0_TEST_INC(x0[3])∧(UIncreasing(150_0_TEST_INC(x0[3])), ≥))
(25) ((UIncreasing(150_0_TEST_INC(x0[3])), ≥)∧[2 + (-1)bso_19] ≥ 0)
(26) ((UIncreasing(150_0_TEST_INC(x0[3])), ≥)∧[2 + (-1)bso_19] ≥ 0)
(27) ((UIncreasing(150_0_TEST_INC(x0[3])), ≥)∧[2 + (-1)bso_19] ≥ 0)
(28) ((UIncreasing(150_0_TEST_INC(x0[3])), ≥)∧0 = 0∧[2 + (-1)bso_19] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(150_0_TEST_INC(x1)) = [2]x1
POL(COND_150_0_TEST_INC(x1, x2)) = [2]x2
POL(<(x1, x2)) = [-1]
POL(0) = 0
POL(+(x1, x2)) = x1 + x2
POL(-1) = [-1]
POL(167_1_TEST_INVOKEMETHOD(x1, x2)) = [2] + [2]x2
POL(150_0_test_Inc(x1)) = x1
POL(158_0_test_Return) = [-1]
COND_150_0_TEST_INC(TRUE, x0[2]) → 150_0_TEST_INC(+(x0[2], -1))
167_1_TEST_INVOKEMETHOD(158_0_test_Return, x0[3]) → 150_0_TEST_INC(x0[3])
150_0_TEST_INC(x0[0]) → COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])
150_0_TEST_INC(x0[0]) → COND_150_0_TEST_INC(<(0, +(x0[0], -1)), x0[0])
COND_150_0_TEST_INC(TRUE, x0[1]) → 167_1_TEST_INVOKEMETHOD(150_0_test_Inc(+(x0[1], -1)), +(x0[1], -1))
!= | ~ | 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 ((0 < x0[0] + -1 →* TRUE)∧(x0[0] →* x0[1]))
!= | ~ | 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
(1) -> (3), if ((150_0_test_Inc(x0[1] + -1) →* 158_0_test_Return)∧(x0[1] + -1 →* x0[3]))