0 JBC
↳1 JBC2FIG (⇐)
↳2 FIGraph
↳3 FIGtoITRSProof (⇐)
↳4 ITRS
↳5 ITRStoIDPProof (⇔)
↳6 IDP
↳7 UsableRulesProof (⇔)
↳8 IDP
↳9 IDPNonInfProof (⇐)
↳10 AND
↳11 IDP
↳12 IDependencyGraphProof (⇔)
↳13 TRUE
↳14 IDP
↳15 IDependencyGraphProof (⇔)
↳16 TRUE
package example_2;
public class Test {
public static int divBy(int x){
int r = 0;
int y;
while (x > 0) {
y = 2;
x = x/y;
r = r + x;
}
return r;
}
public static void main(String[] args) {
if (args.length > 0) {
int x = args[0].length();
int r = divBy(x);
// System.out.println("Result: " + r);
}
// else System.out.println("Error: Incorrect call");
}
}
!= | ~ | 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 |
!= | ~ | 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 ((i52[0] →* i52[1])∧(i44[0] →* i44[1])∧(i52[0] > 0 →* TRUE))
(1) -> (0), if ((i52[1] / 2 →* i52[0])∧(i44[1] + i52[1] / 2 →* i44[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
(0) -> (1), if ((i52[0] →* i52[1])∧(i44[0] →* i44[1])∧(i52[0] > 0 →* TRUE))
(1) -> (0), if ((i52[1] / 2 →* i52[0])∧(i44[1] + i52[1] / 2 →* i44[0]))
(1) (i52[0]=i52[1]∧i44[0]=i44[1]∧>(i52[0], 0)=TRUE ⇒ LOAD460(i52[0], i44[0])≥NonInfC∧LOAD460(i52[0], i44[0])≥COND_LOAD460(>(i52[0], 0), i52[0], i44[0])∧(UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥))
(2) (>(i52[0], 0)=TRUE ⇒ LOAD460(i52[0], i44[0])≥NonInfC∧LOAD460(i52[0], i44[0])≥COND_LOAD460(>(i52[0], 0), i52[0], i44[0])∧(UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥))
(3) (i52[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥)∧[(2)bni_11 + (-1)Bound*bni_11] + [bni_11]i52[0] ≥ 0∧[(-1)bso_12] ≥ 0)
(4) (i52[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥)∧[(2)bni_11 + (-1)Bound*bni_11] + [bni_11]i52[0] ≥ 0∧[(-1)bso_12] ≥ 0)
(5) (i52[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥)∧[(2)bni_11 + (-1)Bound*bni_11] + [bni_11]i52[0] ≥ 0∧[(-1)bso_12] ≥ 0)
(6) (i52[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥)∧0 = 0∧[(2)bni_11 + (-1)Bound*bni_11] + [bni_11]i52[0] ≥ 0∧0 = 0∧[(-1)bso_12] ≥ 0)
(7) (i52[0] ≥ 0 ⇒ (UIncreasing(COND_LOAD460(>(i52[0], 0), i52[0], i44[0])), ≥)∧0 = 0∧[(3)bni_11 + (-1)Bound*bni_11] + [bni_11]i52[0] ≥ 0∧0 = 0∧[(-1)bso_12] ≥ 0)
(8) (i52[0]=i52[1]∧i44[0]=i44[1]∧>(i52[0], 0)=TRUE∧/(i52[1], 2)=i52[0]1∧+(i44[1], /(i52[1], 2))=i44[0]1 ⇒ COND_LOAD460(TRUE, i52[1], i44[1])≥NonInfC∧COND_LOAD460(TRUE, i52[1], i44[1])≥LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))∧(UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥))
(9) (>(i52[0], 0)=TRUE ⇒ COND_LOAD460(TRUE, i52[0], i44[0])≥NonInfC∧COND_LOAD460(TRUE, i52[0], i44[0])≥LOAD460(/(i52[0], 2), +(i44[0], /(i52[0], 2)))∧(UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥))
(10) (i52[0] + [-1] ≥ 0 ⇒ (UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥)∧[(2)bni_13 + (-1)Bound*bni_13] + [bni_13]i52[0] ≥ 0∧[1 + (-1)bso_20] + i52[0] + [-1]max{i52[0], [-1]i52[0]} ≥ 0)
(11) (i52[0] + [-1] ≥ 0 ⇒ (UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥)∧[(2)bni_13 + (-1)Bound*bni_13] + [bni_13]i52[0] ≥ 0∧[1 + (-1)bso_20] + i52[0] + [-1]max{i52[0], [-1]i52[0]} ≥ 0)
(12) (i52[0] + [-1] ≥ 0∧[2]i52[0] ≥ 0 ⇒ (UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥)∧[(2)bni_13 + (-1)Bound*bni_13] + [bni_13]i52[0] ≥ 0∧[1 + (-1)bso_20] ≥ 0)
(13) (i52[0] + [-1] ≥ 0∧[2]i52[0] ≥ 0 ⇒ (UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥)∧0 = 0∧[(2)bni_13 + (-1)Bound*bni_13] + [bni_13]i52[0] ≥ 0∧0 = 0∧[1 + (-1)bso_20] ≥ 0)
(14) (i52[0] ≥ 0∧[2] + [2]i52[0] ≥ 0 ⇒ (UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥)∧0 = 0∧[(3)bni_13 + (-1)Bound*bni_13] + [bni_13]i52[0] ≥ 0∧0 = 0∧[1 + (-1)bso_20] ≥ 0)
(15) (i52[0] ≥ 0∧[1] + i52[0] ≥ 0 ⇒ (UIncreasing(LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))), ≥)∧0 = 0∧[(3)bni_13 + (-1)Bound*bni_13] + [bni_13]i52[0] ≥ 0∧0 = 0∧[1 + (-1)bso_20] ≥ 0)
POL(TRUE) = [3]
POL(FALSE) = 0
POL(LOAD460(x1, x2)) = [2] + x1
POL(COND_LOAD460(x1, x2, x3)) = [2] + x2
POL(>(x1, x2)) = [-1]
POL(0) = 0
POL(2) = [2]
POL(+(x1, x2)) = x1 + x2
Polynomial Interpretations with Context Sensitive Arithemetic Replacement
POL(TermCSAR-Mode @ Context)
POL(/(x1, 2)1 @ {LOAD460_2/0}) = max{x1, [-1]x1} + [-1]
POL(/(x1, 2)1 @ {LOAD460_2/1, +_2/1}) = [-1]max{x1, [-1]x1} + [1]
COND_LOAD460(TRUE, i52[1], i44[1]) → LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))
LOAD460(i52[0], i44[0]) → COND_LOAD460(>(i52[0], 0), i52[0], i44[0])
COND_LOAD460(TRUE, i52[1], i44[1]) → LOAD460(/(i52[1], 2), +(i44[1], /(i52[1], 2)))
LOAD460(i52[0], i44[0]) → COND_LOAD460(>(i52[0], 0), i52[0], i44[0])
/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
!= | ~ | 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 |