0 JBC
↳1 JBCToGraph (⇒, 40 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIDPv1Proof (⇒, 20 ms)
↳6 IDP
↳7 IDPNonInfProof (⇒, 110 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:
100_0_decrease_ConstantStackPush(EOS(STATIC_100), i12, i12) → 103_0_decrease_LE(EOS(STATIC_103), i12, i12, 5)
103_0_decrease_LE(EOS(STATIC_103), i24, i24, matching1) → 108_0_decrease_LE(EOS(STATIC_108), i24, i24, 5) | =(matching1, 5)
108_0_decrease_LE(EOS(STATIC_108), i24, i24, matching1) → 112_0_decrease_Inc(EOS(STATIC_112), i24) | &&(>(i24, 5), =(matching1, 5))
112_0_decrease_Inc(EOS(STATIC_112), i24) → 117_0_decrease_JMP(EOS(STATIC_117), +(i24, -1)) | >(i24, 0)
117_0_decrease_JMP(EOS(STATIC_117), i26) → 123_0_decrease_Load(EOS(STATIC_123), i26)
123_0_decrease_Load(EOS(STATIC_123), i26) → 96_0_decrease_Load(EOS(STATIC_96), i26)
96_0_decrease_Load(EOS(STATIC_96), i12) → 100_0_decrease_ConstantStackPush(EOS(STATIC_100), i12, i12)
R rules:
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
100_0_decrease_ConstantStackPush(EOS(STATIC_100), x0, x0) → 100_0_decrease_ConstantStackPush(EOS(STATIC_100), +(x0, -1), +(x0, -1)) | >(x0, 5)
R rules:
Filtered ground terms:
100_0_decrease_ConstantStackPush(x1, x2, x3) → 100_0_decrease_ConstantStackPush(x2, x3)
EOS(x1) → EOS
Cond_100_0_decrease_ConstantStackPush(x1, x2, x3, x4) → Cond_100_0_decrease_ConstantStackPush(x1, x3, x4)
Filtered duplicate args:
100_0_decrease_ConstantStackPush(x1, x2) → 100_0_decrease_ConstantStackPush(x2)
Cond_100_0_decrease_ConstantStackPush(x1, x2, x3) → Cond_100_0_decrease_ConstantStackPush(x1, x3)
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
100_0_decrease_ConstantStackPush(x0) → 100_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:
100_0_DECREASE_CONSTANTSTACKPUSH(x0) → COND_100_0_DECREASE_CONSTANTSTACKPUSH(>(x0, 5), x0)
COND_100_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0) → 100_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] ⇒ 100_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥NonInfC∧100_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥COND_100_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])∧(UIncreasing(COND_100_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥))
(2) (>(x0[0], 5)=TRUE ⇒ 100_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥NonInfC∧100_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥COND_100_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])∧(UIncreasing(COND_100_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥))
(3) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_100_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_100_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_100_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_100_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_100_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1])≥NonInfC∧COND_100_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1])≥100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))∧(UIncreasing(100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥))
(8) ((UIncreasing(100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(9) ((UIncreasing(100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(10) ((UIncreasing(100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(11) ((UIncreasing(100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧0 = 0∧[2 + (-1)bso_11] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(100_0_DECREASE_CONSTANTSTACKPUSH(x1)) = [2]x1
POL(COND_100_0_DECREASE_CONSTANTSTACKPUSH(x1, x2)) = [2]x2
POL(>(x1, x2)) = [-1]
POL(5) = [5]
POL(+(x1, x2)) = x1 + x2
POL(-1) = [-1]
COND_100_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1]) → 100_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))
100_0_DECREASE_CONSTANTSTACKPUSH(x0[0]) → COND_100_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])
100_0_DECREASE_CONSTANTSTACKPUSH(x0[0]) → COND_100_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