0 JBC
↳1 JBC2FIG (⇒)
↳2 JBCTerminationGraph
↳3 FIGtoITRSProof (⇒)
↳4 IDP
↳5 IDPNonInfProof (⇒)
↳6 IDP
↳7 IDependencyGraphProof (⇔)
↳8 TRUE
public class AG313 {
public static void main(String[] args) {
int x, y;
x = args[0].length();
y = args[1].length() + 1;
quot(x,y);
}
public static int quot(int x, int y) {
int i = 0;
if(x==0) return 0;
while (x > 0 && y > 0) {
i += 1;
x = (x - 1)- (y - 1);
}
return i;
}
}
Generated 16 rules for P and 5 rules for R.
Combined rules. Obtained 1 rules for P and 1 rules for R.
Filtered ground terms:
898_0_quot_LE(x1, x2, x3, x4) → 898_0_quot_LE(x2, x3, x4)
911_0_main_Return(x1) → 911_0_main_Return
Filtered duplicate args:
898_0_quot_LE(x1, x2, x3) → 898_0_quot_LE(x2, x3)
Combined rules. Obtained 1 rules for P and 1 rules for R.
Finished conversion. Obtained 1 rules for P and 1 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, Boolean
(0) -> (1), if ((x1[0] > 0 && x0[0] > 0 && 0 <= x1[0] - 1 && 0 <= x0[0] - 1 →* TRUE)∧(898_0_quot_LE(x1[0], x0[0]) →* 898_0_quot_LE(x1[1], x0[1]))∧(x1[0] →* x1[1]))
(1) -> (0), if ((898_0_quot_LE(x1[1], x0[1] - 1 - x1[1] - 1) →* 898_0_quot_LE(x1[0], x0[0]))∧(x1[1] →* x1[0]))
(1) (&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1)))=TRUE∧898_0_quot_LE(x1[0], x0[0])=898_0_quot_LE(x1[1], x0[1])∧x1[0]=x1[1] ⇒ 898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], x0[0]), x1[0])≥NonInfC∧898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], x0[0]), x1[0])≥COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])∧(UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥))
(2) (<=(0, -(x0[0], 1))=TRUE∧<=(0, -(x1[0], 1))=TRUE∧>(x1[0], 0)=TRUE∧>(x0[0], 0)=TRUE ⇒ 898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], x0[0]), x1[0])≥NonInfC∧898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], x0[0]), x1[0])≥COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])∧(UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥))
(3) (x0[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥)∧[(-1)bni_24 + (-1)Bound*bni_24] + [bni_24]x0[0] ≥ 0∧[(-1)bso_25] ≥ 0)
(4) (x0[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥)∧[(-1)bni_24 + (-1)Bound*bni_24] + [bni_24]x0[0] ≥ 0∧[(-1)bso_25] ≥ 0)
(5) (x0[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥)∧[(-1)bni_24 + (-1)Bound*bni_24] + [bni_24]x0[0] ≥ 0∧[(-1)bso_25] ≥ 0)
(6) (x0[0] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥)∧[(-1)Bound*bni_24] + [bni_24]x0[0] ≥ 0∧[(-1)bso_25] ≥ 0)
(7) (x0[0] ≥ 0∧x1[0] ≥ 0∧x1[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])), ≥)∧[(-1)Bound*bni_24] + [bni_24]x0[0] ≥ 0∧[(-1)bso_25] ≥ 0)
(8) (&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1)))=TRUE∧898_0_quot_LE(x1[0], x0[0])=898_0_quot_LE(x1[1], x0[1])∧x1[0]=x1[1]∧898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1)))=898_0_quot_LE(x1[0]1, x0[0]1)∧x1[1]=x1[0]1 ⇒ COND_898_1_MAIN_INVOKEMETHOD(TRUE, 898_0_quot_LE(x1[1], x0[1]), x1[1])≥NonInfC∧COND_898_1_MAIN_INVOKEMETHOD(TRUE, 898_0_quot_LE(x1[1], x0[1]), x1[1])≥898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])∧(UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥))
(9) (<=(0, -(x0[0], 1))=TRUE∧<=(0, -(x1[0], 1))=TRUE∧>(x1[0], 0)=TRUE∧>(x0[0], 0)=TRUE ⇒ COND_898_1_MAIN_INVOKEMETHOD(TRUE, 898_0_quot_LE(x1[0], x0[0]), x1[0])≥NonInfC∧COND_898_1_MAIN_INVOKEMETHOD(TRUE, 898_0_quot_LE(x1[0], x0[0]), x1[0])≥898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], -(-(x0[0], 1), -(x1[0], 1))), x1[0])∧(UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥))
(10) (x0[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥)∧[(-1)bni_26 + (-1)Bound*bni_26] + [bni_26]x0[0] ≥ 0∧[(-1)bso_27] + x1[0] ≥ 0)
(11) (x0[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥)∧[(-1)bni_26 + (-1)Bound*bni_26] + [bni_26]x0[0] ≥ 0∧[(-1)bso_27] + x1[0] ≥ 0)
(12) (x0[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] + [-1] ≥ 0 ⇒ (UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥)∧[(-1)bni_26 + (-1)Bound*bni_26] + [bni_26]x0[0] ≥ 0∧[(-1)bso_27] + x1[0] ≥ 0)
(13) (x0[0] ≥ 0∧x1[0] + [-1] ≥ 0∧x1[0] + [-1] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥)∧[(-1)Bound*bni_26] + [bni_26]x0[0] ≥ 0∧[(-1)bso_27] + x1[0] ≥ 0)
(14) (x0[0] ≥ 0∧x1[0] ≥ 0∧x1[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])), ≥)∧[(-1)Bound*bni_26] + [bni_26]x0[0] ≥ 0∧[1 + (-1)bso_27] + x1[0] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(898_1_main_InvokeMethod(x1, x2)) = [-1] + [-1]x2 + [-1]x1
POL(898_0_quot_LE(x1, x2)) = [-1]x2 + [-1]x1
POL(Cond_898_1_main_InvokeMethod(x1, x2, x3)) = [-1] + [-1]x3 + [-1]x2 + [-1]x1
POL(<=(x1, x2)) = [-1]
POL(0) = 0
POL(911_0_main_Return) = [-1]
POL(898_1_MAIN_INVOKEMETHOD(x1, x2)) = [-1] + [-1]x2 + [-1]x1
POL(COND_898_1_MAIN_INVOKEMETHOD(x1, x2, x3)) = [-1] + [-1]x3 + [-1]x2 + [-1]x1
POL(&&(x1, x2)) = 0
POL(>(x1, x2)) = [-1]
POL(-(x1, x2)) = x1 + [-1]x2
POL(1) = [1]
COND_898_1_MAIN_INVOKEMETHOD(TRUE, 898_0_quot_LE(x1[1], x0[1]), x1[1]) → 898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])
898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], x0[0]), x1[0]) → COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])
COND_898_1_MAIN_INVOKEMETHOD(TRUE, 898_0_quot_LE(x1[1], x0[1]), x1[1]) → 898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[1], -(-(x0[1], 1), -(x1[1], 1))), x1[1])
898_1_MAIN_INVOKEMETHOD(898_0_quot_LE(x1[0], x0[0]), x1[0]) → COND_898_1_MAIN_INVOKEMETHOD(&&(&&(&&(>(x1[0], 0), >(x0[0], 0)), <=(0, -(x1[0], 1))), <=(0, -(x0[0], 1))), 898_0_quot_LE(x1[0], x0[0]), x1[0])
&&(TRUE, TRUE)1 ↔ TRUE1
&&(TRUE, FALSE)1 ↔ FALSE1
&&(FALSE, TRUE)1 ↔ FALSE1
&&(FALSE, FALSE)1 ↔ FALSE1
!= | ~ | 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, Boolean