0 JBC
↳1 JBCToGraph (⇒, 110 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIDPv1Proof (⇒, 40 ms)
↳6 IDP
↳7 IDPNonInfProof (⇒, 50 ms)
↳8 AND
↳9 IDP
↳10 IDependencyGraphProof (⇔, 0 ms)
↳11 TRUE
↳12 IDP
↳13 IDependencyGraphProof (⇔, 0 ms)
↳14 TRUE
package simple.whileDecr;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
WhileDecr.decrease(args.length);
}
}
package simple.whileDecr;
public class WhileDecr {
// this example does acutally terminate.
public static void decrease(int i) {
while (i > 5) {
i--;
}
}
}
Generated 7 rules for P and 0 rules for R.
P rules:
113_0_decrease_ConstantStackPush(EOS(STATIC_113), i14, i14) → 116_0_decrease_LE(EOS(STATIC_116), i14, i14, 5)
116_0_decrease_LE(EOS(STATIC_116), i27, i27, matching1) → 120_0_decrease_LE(EOS(STATIC_120), i27, i27, 5) | =(matching1, 5)
120_0_decrease_LE(EOS(STATIC_120), i27, i27, matching1) → 124_0_decrease_Inc(EOS(STATIC_124), i27) | &&(>(i27, 5), =(matching1, 5))
124_0_decrease_Inc(EOS(STATIC_124), i27) → 129_0_decrease_JMP(EOS(STATIC_129), +(i27, -1)) | >(i27, 0)
129_0_decrease_JMP(EOS(STATIC_129), i29) → 147_0_decrease_Load(EOS(STATIC_147), i29)
147_0_decrease_Load(EOS(STATIC_147), i29) → 109_0_decrease_Load(EOS(STATIC_109), i29)
109_0_decrease_Load(EOS(STATIC_109), i14) → 113_0_decrease_ConstantStackPush(EOS(STATIC_113), i14, i14)
R rules:
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
113_0_decrease_ConstantStackPush(EOS(STATIC_113), x0, x0) → 113_0_decrease_ConstantStackPush(EOS(STATIC_113), +(x0, -1), +(x0, -1)) | >(x0, 5)
R rules:
Filtered ground terms:
113_0_decrease_ConstantStackPush(x1, x2, x3) → 113_0_decrease_ConstantStackPush(x2, x3)
EOS(x1) → EOS
Cond_113_0_decrease_ConstantStackPush(x1, x2, x3, x4) → Cond_113_0_decrease_ConstantStackPush(x1, x3, x4)
Filtered duplicate args:
113_0_decrease_ConstantStackPush(x1, x2) → 113_0_decrease_ConstantStackPush(x2)
Cond_113_0_decrease_ConstantStackPush(x1, x2, x3) → Cond_113_0_decrease_ConstantStackPush(x1, x3)
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
113_0_decrease_ConstantStackPush(x0) → 113_0_decrease_ConstantStackPush(+(x0, -1)) | >(x0, 5)
R rules:
Finished conversion. Obtained 2 rules for P and 0 rules for R. System has predefined symbols.
P rules:
113_0_DECREASE_CONSTANTSTACKPUSH(x0) → COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0, 5), x0)
COND_113_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0) → 113_0_DECREASE_CONSTANTSTACKPUSH(+(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] > 5 ∧x0[0] →* x0[1])
(1) -> (0), if (x0[1] + -1 →* x0[0])
(1) (>(x0[0], 5)=TRUE∧x0[0]=x0[1] ⇒ 113_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥NonInfC∧113_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])∧(UIncreasing(COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥))
(2) (>(x0[0], 5)=TRUE ⇒ 113_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥NonInfC∧113_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])∧(UIncreasing(COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥))
(3) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(4) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(5) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(6) (x0[0] ≥ 0 ⇒ (UIncreasing(COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8 + (12)bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(7) (COND_113_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1])≥NonInfC∧COND_113_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1])≥113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))∧(UIncreasing(113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥))
(8) ((UIncreasing(113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(9) ((UIncreasing(113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(10) ((UIncreasing(113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(11) ((UIncreasing(113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧0 = 0∧[2 + (-1)bso_11] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(113_0_DECREASE_CONSTANTSTACKPUSH(x1)) = [2]x1
POL(COND_113_0_DECREASE_CONSTANTSTACKPUSH(x1, x2)) = [2]x2
POL(>(x1, x2)) = [-1]
POL(5) = [5]
POL(+(x1, x2)) = x1 + x2
POL(-1) = [-1]
COND_113_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1]) → 113_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))
113_0_DECREASE_CONSTANTSTACKPUSH(x0[0]) → COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])
113_0_DECREASE_CONSTANTSTACKPUSH(x0[0]) → COND_113_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), 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