0 JBC
↳1 JBCToGraph (⇒, 130 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIDPv1Proof (⇒, 20 ms)
↳6 IDP
↳7 IDPNonInfProof (⇒, 130 ms)
↳8 IDP
↳9 IDependencyGraphProof (⇔, 0 ms)
↳10 TRUE
public class LogMult{
public static int log(int x, int y) {
int res = 1;
if (x < 0 || y < 1) return 0;
else {
while (x > y) {
y = y*y;
res = 2*res;
}
}
return res;
}
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
log(x,2);
}
}
public class Random {
static String[] args;
static int index = 0;
public static int random() {
String string = args[index];
index++;
return string.length();
}
}
Generated 14 rules for P and 0 rules for R.
P rules:
491_0_log_Load(EOS(STATIC_491), i32, i32, i65, i32) → 494_0_log_LE(EOS(STATIC_494), i32, i32, i65, i32, i65)
494_0_log_LE(EOS(STATIC_494), i32, i32, i65, i32, i65) → 498_0_log_LE(EOS(STATIC_498), i32, i32, i65, i32, i65)
498_0_log_LE(EOS(STATIC_498), i32, i32, i65, i32, i65) → 502_0_log_Load(EOS(STATIC_502), i32, i32, i65) | >(i32, i65)
502_0_log_Load(EOS(STATIC_502), i32, i32, i65) → 505_0_log_Load(EOS(STATIC_505), i32, i32, i65, i65)
505_0_log_Load(EOS(STATIC_505), i32, i32, i65, i65) → 507_0_log_IntArithmetic(EOS(STATIC_507), i32, i32, i65, i65)
507_0_log_IntArithmetic(EOS(STATIC_507), i32, i32, i65, i65) → 509_0_log_Store(EOS(STATIC_509), i32, i32, *(i65, i65)) | &&(>(i65, 1), >(i65, 1))
509_0_log_Store(EOS(STATIC_509), i32, i32, i71) → 513_0_log_ConstantStackPush(EOS(STATIC_513), i32, i32, i71)
513_0_log_ConstantStackPush(EOS(STATIC_513), i32, i32, i71) → 515_0_log_Load(EOS(STATIC_515), i32, i32, i71)
515_0_log_Load(EOS(STATIC_515), i32, i32, i71) → 517_0_log_IntArithmetic(EOS(STATIC_517), i32, i32, i71)
517_0_log_IntArithmetic(EOS(STATIC_517), i32, i32, i71) → 519_0_log_Store(EOS(STATIC_519), i32, i32, i71)
519_0_log_Store(EOS(STATIC_519), i32, i32, i71) → 521_0_log_JMP(EOS(STATIC_521), i32, i32, i71)
521_0_log_JMP(EOS(STATIC_521), i32, i32, i71) → 526_0_log_Load(EOS(STATIC_526), i32, i32, i71)
526_0_log_Load(EOS(STATIC_526), i32, i32, i71) → 488_0_log_Load(EOS(STATIC_488), i32, i32, i71)
488_0_log_Load(EOS(STATIC_488), i32, i32, i65) → 491_0_log_Load(EOS(STATIC_491), i32, i32, i65, i32)
R rules:
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
491_0_log_Load(EOS(STATIC_491), x0, x0, x1, x0) → 491_0_log_Load(EOS(STATIC_491), x0, x0, *(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))
R rules:
Filtered ground terms:
491_0_log_Load(x1, x2, x3, x4, x5) → 491_0_log_Load(x2, x3, x4, x5)
EOS(x1) → EOS
Cond_491_0_log_Load(x1, x2, x3, x4, x5, x6) → Cond_491_0_log_Load(x1, x3, x4, x5, x6)
Filtered duplicate args:
491_0_log_Load(x1, x2, x3, x4) → 491_0_log_Load(x3, x4)
Cond_491_0_log_Load(x1, x2, x3, x4, x5) → Cond_491_0_log_Load(x1, x4, x5)
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
491_0_log_Load(x1, x0) → 491_0_log_Load(*(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))
R rules:
Finished conversion. Obtained 2 rules for P and 0 rules for R. System has predefined symbols.
P rules:
491_0_LOG_LOAD(x1, x0) → COND_491_0_LOG_LOAD(&&(>(x1, 1), <(x1, x0)), x1, x0)
COND_491_0_LOG_LOAD(TRUE, x1, x0) → 491_0_LOG_LOAD(*(x1, x1), x0)
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 |
Boolean, Integer
(0) -> (1), if (x1[0] > 1 && x1[0] < x0[0] ∧x1[0] →* x1[1]∧x0[0] →* x0[1])
(1) -> (0), if (x1[1] * x1[1] →* x1[0]∧x0[1] →* x0[0])
(1) (&&(>(x1[0], 1), <(x1[0], x0[0]))=TRUE∧x1[0]=x1[1]∧x0[0]=x0[1] ⇒ 491_0_LOG_LOAD(x1[0], x0[0])≥NonInfC∧491_0_LOG_LOAD(x1[0], x0[0])≥COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])∧(UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥))
(2) (>(x1[0], 1)=TRUE∧<(x1[0], x0[0])=TRUE ⇒ 491_0_LOG_LOAD(x1[0], x0[0])≥NonInfC∧491_0_LOG_LOAD(x1[0], x0[0])≥COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])∧(UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥))
(3) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(4) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(5) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(6) (x1[0] ≥ 0∧x0[0] + [-3] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[(-1)bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(7) (x1[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[(2)bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(8) (&&(>(x1[0], 1), <(x1[0], x0[0]))=TRUE∧x1[0]=x1[1]∧x0[0]=x0[1]∧*(x1[1], x1[1])=x1[0]1∧x0[1]=x0[0]1 ⇒ COND_491_0_LOG_LOAD(TRUE, x1[1], x0[1])≥NonInfC∧COND_491_0_LOG_LOAD(TRUE, x1[1], x0[1])≥491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])∧(UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥))
(9) (>(x1[0], 1)=TRUE∧<(x1[0], x0[0])=TRUE ⇒ COND_491_0_LOG_LOAD(TRUE, x1[0], x0[0])≥NonInfC∧COND_491_0_LOG_LOAD(TRUE, x1[0], x0[0])≥491_0_LOG_LOAD(*(x1[0], x1[0]), x0[0])∧(UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥))
(10) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[-2 + (-1)bso_16] + [-1]x1[0] + x1[0]2 ≥ 0)
(11) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[-2 + (-1)bso_16] + [-1]x1[0] + x1[0]2 ≥ 0)
(12) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[-2 + (-1)bso_16] + [-1]x1[0] + x1[0]2 ≥ 0)
(13) (x1[0] ≥ 0∧x0[0] + [-3] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-3)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[(-1)bso_16] + [3]x1[0] + x1[0]2 ≥ 0)
(14) (x1[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)Bound*bni_15] + [bni_15]x0[0] ≥ 0∧[(-1)bso_16] + [3]x1[0] + x1[0]2 ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(491_0_LOG_LOAD(x1, x2)) = [1] + x2 + [-1]x1
POL(COND_491_0_LOG_LOAD(x1, x2, x3)) = [-1] + x3 + [-1]x2 + [-1]x1
POL(&&(x1, x2)) = 0
POL(>(x1, x2)) = [-1]
POL(1) = [1]
POL(<(x1, x2)) = [-1]
POL(*(x1, x2)) = x1·x2
491_0_LOG_LOAD(x1[0], x0[0]) → COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])
491_0_LOG_LOAD(x1[0], x0[0]) → COND_491_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])
COND_491_0_LOG_LOAD(TRUE, x1[1], x0[1]) → 491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])
COND_491_0_LOG_LOAD(TRUE, x1[1], x0[1]) → 491_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])
&&(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