(0) Obligation:

JBC Problem based on JBC Program:
Manifest-Version: 1.0 Created-By: 1.6.0_22 (Sun Microsystems Inc.) Main-Class: TwoWay/TwoWay
package TwoWay;

public class Random {
static String[] args;
static int index = 0;

public static int random() {
final String string = args[index];
index++;
return string.length();
}
}


package TwoWay;

public class TwoWay {
public static void main(String[] args) {
Random.args = args;
twoWay(true, Random.random());
}

public static int twoWay(boolean terminate, int n) {
if (n < 0) {
return 1;
} else {
int m = n;
if (terminate) {
m--;
} else {
m++;
}
return m*twoWay(terminate, m);
}
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
TwoWay.TwoWay.main([Ljava/lang/String;)V: Graph of 107 nodes with 0 SCCs.

TwoWay.TwoWay.twoWay(ZI)I: Graph of 30 nodes with 0 SCCs.


(3) TerminationGraphToSCCProof (SOUND transformation)

Splitted TerminationGraph to 1 SCCs.

(4) Obligation:

SCC of termination graph based on JBC Program.
SCC contains nodes from the following methods: TwoWay.TwoWay.twoWay(ZI)I
SCC calls the following helper methods: TwoWay.TwoWay.twoWay(ZI)I
Performed SCC analyses: UsedFieldsAnalysis

(5) SCCToIDPv1Proof (SOUND transformation)

Transformed FIGraph SCCs to IDPs. Log:

Generated 15 rules for P and 16 rules for R.


P rules:
259_0_twoWay_GE(EOS(STATIC_259), matching1, i27, i27) → 263_0_twoWay_GE(EOS(STATIC_263), 1, i27, i27) | =(matching1, 1)
263_0_twoWay_GE(EOS(STATIC_263), matching1, i27, i27) → 266_0_twoWay_Load(EOS(STATIC_266), 1, i27) | &&(>=(i27, 0), =(matching1, 1))
266_0_twoWay_Load(EOS(STATIC_266), matching1, i27) → 272_0_twoWay_Store(EOS(STATIC_272), 1, i27) | =(matching1, 1)
272_0_twoWay_Store(EOS(STATIC_272), matching1, i27) → 277_0_twoWay_Load(EOS(STATIC_277), 1, i27) | =(matching1, 1)
277_0_twoWay_Load(EOS(STATIC_277), matching1, i27) → 284_0_twoWay_EQ(EOS(STATIC_284), 1, i27, 1) | =(matching1, 1)
284_0_twoWay_EQ(EOS(STATIC_284), matching1, i27, matching2) → 287_0_twoWay_Inc(EOS(STATIC_287), 1, i27) | &&(&&(>(1, 0), =(matching1, 1)), =(matching2, 1))
287_0_twoWay_Inc(EOS(STATIC_287), matching1, i27) → 289_0_twoWay_JMP(EOS(STATIC_289), 1, +(i27, -1)) | &&(>=(i27, 0), =(matching1, 1))
289_0_twoWay_JMP(EOS(STATIC_289), matching1, i32) → 291_0_twoWay_Load(EOS(STATIC_291), 1, i32) | =(matching1, 1)
291_0_twoWay_Load(EOS(STATIC_291), matching1, i32) → 293_0_twoWay_Load(EOS(STATIC_293), 1, i32, i32) | =(matching1, 1)
293_0_twoWay_Load(EOS(STATIC_293), matching1, i32, i32) → 295_0_twoWay_Load(EOS(STATIC_295), i32, i32, 1) | =(matching1, 1)
295_0_twoWay_Load(EOS(STATIC_295), i32, i32, matching1) → 297_0_twoWay_InvokeMethod(EOS(STATIC_297), i32, 1, i32) | =(matching1, 1)
297_0_twoWay_InvokeMethod(EOS(STATIC_297), i32, matching1, i32) → 299_1_twoWay_InvokeMethod(299_0_twoWay_Load(EOS(STATIC_299), 1, i32), i32, 1, i32) | =(matching1, 1)
299_0_twoWay_Load(EOS(STATIC_299), matching1, i32) → 301_0_twoWay_Load(EOS(STATIC_301), 1, i32) | =(matching1, 1)
301_0_twoWay_Load(EOS(STATIC_301), matching1, i32) → 254_0_twoWay_Load(EOS(STATIC_254), 1, i32) | =(matching1, 1)
254_0_twoWay_Load(EOS(STATIC_254), matching1, i25) → 259_0_twoWay_GE(EOS(STATIC_259), 1, i25, i25) | =(matching1, 1)
R rules:
259_0_twoWay_GE(EOS(STATIC_259), matching1, matching2, matching3) → 261_0_twoWay_GE(EOS(STATIC_261), 1, -1, -1) | &&(&&(=(matching1, 1), =(matching2, -1)), =(matching3, -1))
261_0_twoWay_GE(EOS(STATIC_261), matching1, matching2, matching3) → 264_0_twoWay_ConstantStackPush(EOS(STATIC_264), 1, -1) | &&(&&(&&(<(-1, 0), =(matching1, 1)), =(matching2, -1)), =(matching3, -1))
264_0_twoWay_ConstantStackPush(EOS(STATIC_264), matching1, matching2) → 270_0_twoWay_Return(EOS(STATIC_270), 1, -1, 1) | &&(=(matching1, 1), =(matching2, -1))
299_1_twoWay_InvokeMethod(270_0_twoWay_Return(EOS(STATIC_270), matching1, matching2, matching3), matching4, matching5, matching6) → 309_0_twoWay_Return(EOS(STATIC_309), -1, 1, -1, 1, -1, 1) | &&(&&(&&(&&(&&(=(matching1, 1), =(matching2, -1)), =(matching3, 1)), =(matching4, -1)), =(matching5, 1)), =(matching6, -1))
299_1_twoWay_InvokeMethod(313_0_twoWay_Return(EOS(STATIC_313), matching1), i43, matching2, i43) → 326_0_twoWay_Return(EOS(STATIC_326), i43, 1, i43, -1) | &&(=(matching1, -1), =(matching2, 1))
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(EOS(STATIC_337), i46), i56, matching1, i56) → 370_0_twoWay_Return(EOS(STATIC_370), i56, 1, i56, i46) | =(matching1, 1)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(EOS(STATIC_383), i72), i81, matching1, i81) → 403_0_twoWay_Return(EOS(STATIC_403), i81, 1, i81, i72) | =(matching1, 1)
309_0_twoWay_Return(EOS(STATIC_309), matching1, matching2, matching3, matching4, matching5, matching6) → 311_0_twoWay_IntArithmetic(EOS(STATIC_311), -1, 1) | &&(&&(&&(&&(&&(=(matching1, -1), =(matching2, 1)), =(matching3, -1)), =(matching4, 1)), =(matching5, -1)), =(matching6, 1))
311_0_twoWay_IntArithmetic(EOS(STATIC_311), matching1, matching2) → 313_0_twoWay_Return(EOS(STATIC_313), -1) | &&(=(matching1, -1), =(matching2, 1))
313_0_twoWay_Return(EOS(STATIC_313), matching1) → 337_0_twoWay_Return(EOS(STATIC_337), -1) | =(matching1, -1)
326_0_twoWay_Return(EOS(STATIC_326), i43, matching1, i43, matching2) → 371_0_twoWay_Return(EOS(STATIC_371), i43, 1, i43, -1) | &&(=(matching1, 1), =(matching2, -1))
337_0_twoWay_Return(EOS(STATIC_337), i46) → 383_0_twoWay_Return(EOS(STATIC_383), i46)
370_0_twoWay_Return(EOS(STATIC_370), i56, matching1, i56, i46) → 371_0_twoWay_Return(EOS(STATIC_371), i56, 1, i56, i46) | =(matching1, 1)
371_0_twoWay_Return(EOS(STATIC_371), i65, matching1, i65, i64) → 376_0_twoWay_IntArithmetic(EOS(STATIC_376), i65, i64) | =(matching1, 1)
376_0_twoWay_IntArithmetic(EOS(STATIC_376), i65, i64) → 383_0_twoWay_Return(EOS(STATIC_383), *(i65, i64)) | <(i64, 1)
403_0_twoWay_Return(EOS(STATIC_403), i81, matching1, i81, i72) → 371_0_twoWay_Return(EOS(STATIC_371), i81, 1, i81, i72) | =(matching1, 1)

Combined rules. Obtained 1 conditional rules for P and 5 conditional rules for R.


P rules:
259_0_twoWay_GE(EOS(STATIC_259), 1, x1, x1) → 299_1_twoWay_InvokeMethod(259_0_twoWay_GE(EOS(STATIC_259), 1, +(x1, -1), +(x1, -1)), +(x1, -1), 1, +(x1, -1)) | >(+(x1, 1), 0)
R rules:
259_0_twoWay_GE(EOS(STATIC_259), 1, -1, -1) → 270_0_twoWay_Return(EOS(STATIC_270), 1, -1, 1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return(EOS(STATIC_270), 1, -1, 1), -1, 1, -1) → 383_0_twoWay_Return(EOS(STATIC_383), -1)
299_1_twoWay_InvokeMethod(313_0_twoWay_Return(EOS(STATIC_313), -1), x1, 1, x1) → 383_0_twoWay_Return(EOS(STATIC_383), *(x1, -1))
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(EOS(STATIC_337), x0), x1, 1, x1) → 383_0_twoWay_Return(EOS(STATIC_383), *(x1, x0)) | <(x0, 1)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(EOS(STATIC_383), x0), x1, 1, x1) → 383_0_twoWay_Return(EOS(STATIC_383), *(x1, x0)) | <(x0, 1)

Filtered ground terms:



299_1_twoWay_InvokeMethod(x1, x2, x3, x4) → 299_1_twoWay_InvokeMethod(x1, x2, x4)
259_0_twoWay_GE(x1, x2, x3, x4) → 259_0_twoWay_GE(x3, x4)
Cond_259_0_twoWay_GE(x1, x2, x3, x4, x5) → Cond_259_0_twoWay_GE(x1, x4, x5)
383_0_twoWay_Return(x1, x2) → 383_0_twoWay_Return(x2)
Cond_299_1_twoWay_InvokeMethod1(x1, x2, x3, x4, x5) → Cond_299_1_twoWay_InvokeMethod1(x1, x2, x3, x5)
Cond_299_1_twoWay_InvokeMethod(x1, x2, x3, x4, x5) → Cond_299_1_twoWay_InvokeMethod(x1, x2, x3, x5)
337_0_twoWay_Return(x1, x2) → 337_0_twoWay_Return(x2)
313_0_twoWay_Return(x1, x2) → 313_0_twoWay_Return
270_0_twoWay_Return(x1, x2, x3, x4) → 270_0_twoWay_Return

Filtered duplicate args:



259_0_twoWay_GE(x1, x2) → 259_0_twoWay_GE(x2)
Cond_259_0_twoWay_GE(x1, x2, x3) → Cond_259_0_twoWay_GE(x1, x3)
299_1_twoWay_InvokeMethod(x1, x2, x3) → 299_1_twoWay_InvokeMethod(x1, x3)
Cond_299_1_twoWay_InvokeMethod(x1, x2, x3, x4) → Cond_299_1_twoWay_InvokeMethod(x1, x2, x4)
Cond_299_1_twoWay_InvokeMethod1(x1, x2, x3, x4) → Cond_299_1_twoWay_InvokeMethod1(x1, x2, x4)

Combined rules. Obtained 1 conditional rules for P and 5 conditional rules for R.


P rules:
259_0_twoWay_GE(x1) → 299_1_twoWay_InvokeMethod(259_0_twoWay_GE(+(x1, -1)), +(x1, -1)) | >(x1, -1)
R rules:
259_0_twoWay_GE(-1) → 270_0_twoWay_Return
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, -1) → 383_0_twoWay_Return(-1)
299_1_twoWay_InvokeMethod(313_0_twoWay_Return, x1) → 383_0_twoWay_Return(*(x1, -1))
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(*(x1, x0)) | <(x0, 1)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(*(x1, x0)) | <(x0, 1)

Performed bisimulation on rules. Used the following equivalence classes: {[270_0_twoWay_Return, 313_0_twoWay_Return]=270_0_twoWay_Return}


Finished conversion. Obtained 2 rules for P and 7 rules for R. System has predefined symbols.


P rules:
259_0_TWOWAY_GE(x1) → COND_259_0_TWOWAY_GE(>(x1, -1), x1)
COND_259_0_TWOWAY_GE(TRUE, x1) → 259_0_TWOWAY_GE(+(x1, -1))
R rules:
259_0_twoWay_GE(-1) → 270_0_twoWay_Return
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, -1) → 383_0_twoWay_Return(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x1) → 383_0_twoWay_Return(*(x1, -1))
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod(<(x0, 1), 337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(*(x1, x0))
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod1(<(x0, 1), 383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(*(x1, x0))

(6) Obligation:

IDP problem:
The following function symbols are pre-defined:
!=~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


The following domains are used:

Integer


The ITRS R consists of the following rules:
259_0_twoWay_GE(-1) → 270_0_twoWay_Return
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, -1) → 383_0_twoWay_Return(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x1) → 383_0_twoWay_Return(x1 * -1)
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod(x0 < 1, 337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(x1 * x0)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod1(x0 < 1, 383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(x1 * x0)

The integer pair graph contains the following rules and edges:
(0): 259_0_TWOWAY_GE(x1[0]) → COND_259_0_TWOWAY_GE(x1[0] > -1, x1[0])
(1): COND_259_0_TWOWAY_GE(TRUE, x1[1]) → 259_0_TWOWAY_GE(x1[1] + -1)

(0) -> (1), if (x1[0] > -1x1[0]* x1[1])


(1) -> (0), if (x1[1] + -1* x1[0])



The set Q consists of the following terms:
259_0_twoWay_GE(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x0)
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1)

(7) IDPNonInfProof (SOUND transformation)

Used the following options for this NonInfProof:
IDPGPoloSolver: Range: [(-1,2)] IsNat: false Interpretation Shape Heuristic: aprove.DPFramework.IDPProblem.Processors.nonInf.poly.IdpCand1ShapeHeuristic@5a9875d1 Constraint Generator: NonInfConstraintGenerator: PathGenerator: MetricPathGenerator: Max Left Steps: 0 Max Right Steps: 0

The constraints were generated the following way:
The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps:
Note that final constraints are written in bold face.


For Pair 259_0_TWOWAY_GE(x1) → COND_259_0_TWOWAY_GE(>(x1, -1), x1) the following chains were created:
  • We consider the chain 259_0_TWOWAY_GE(x1[0]) → COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0]), COND_259_0_TWOWAY_GE(TRUE, x1[1]) → 259_0_TWOWAY_GE(+(x1[1], -1)) which results in the following constraint:

    (1)    (>(x1[0], -1)=TRUEx1[0]=x1[1]259_0_TWOWAY_GE(x1[0])≥NonInfC∧259_0_TWOWAY_GE(x1[0])≥COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])∧(UIncreasing(COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])), ≥))



    We simplified constraint (1) using rule (IV) which results in the following new constraint:

    (2)    (>(x1[0], -1)=TRUE259_0_TWOWAY_GE(x1[0])≥NonInfC∧259_0_TWOWAY_GE(x1[0])≥COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])∧(UIncreasing(COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])), ≥))



    We simplified constraint (2) using rule (POLY_CONSTRAINTS) which results in the following new constraint:

    (3)    (x1[0] ≥ 0 ⇒ (UIncreasing(COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])), ≥)∧[(-1)Bound*bni_16] + [(2)bni_16]x1[0] ≥ 0∧[(-1)bso_17] ≥ 0)



    We simplified constraint (3) using rule (IDP_POLY_SIMPLIFY) which results in the following new constraint:

    (4)    (x1[0] ≥ 0 ⇒ (UIncreasing(COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])), ≥)∧[(-1)Bound*bni_16] + [(2)bni_16]x1[0] ≥ 0∧[(-1)bso_17] ≥ 0)



    We simplified constraint (4) using rule (POLY_REMOVE_MIN_MAX) which results in the following new constraint:

    (5)    (x1[0] ≥ 0 ⇒ (UIncreasing(COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])), ≥)∧[(-1)Bound*bni_16] + [(2)bni_16]x1[0] ≥ 0∧[(-1)bso_17] ≥ 0)







For Pair COND_259_0_TWOWAY_GE(TRUE, x1) → 259_0_TWOWAY_GE(+(x1, -1)) the following chains were created:
  • We consider the chain COND_259_0_TWOWAY_GE(TRUE, x1[1]) → 259_0_TWOWAY_GE(+(x1[1], -1)) which results in the following constraint:

    (6)    (COND_259_0_TWOWAY_GE(TRUE, x1[1])≥NonInfC∧COND_259_0_TWOWAY_GE(TRUE, x1[1])≥259_0_TWOWAY_GE(+(x1[1], -1))∧(UIncreasing(259_0_TWOWAY_GE(+(x1[1], -1))), ≥))



    We simplified constraint (6) using rule (POLY_CONSTRAINTS) which results in the following new constraint:

    (7)    ((UIncreasing(259_0_TWOWAY_GE(+(x1[1], -1))), ≥)∧[bni_18] = 0∧[2 + (-1)bso_19] ≥ 0)



    We simplified constraint (7) using rule (IDP_POLY_SIMPLIFY) which results in the following new constraint:

    (8)    ((UIncreasing(259_0_TWOWAY_GE(+(x1[1], -1))), ≥)∧[bni_18] = 0∧[2 + (-1)bso_19] ≥ 0)



    We simplified constraint (8) using rule (POLY_REMOVE_MIN_MAX) which results in the following new constraint:

    (9)    ((UIncreasing(259_0_TWOWAY_GE(+(x1[1], -1))), ≥)∧[bni_18] = 0∧[2 + (-1)bso_19] ≥ 0)



    We simplified constraint (9) using rule (IDP_UNRESTRICTED_VARS) which results in the following new constraint:

    (10)    ((UIncreasing(259_0_TWOWAY_GE(+(x1[1], -1))), ≥)∧[bni_18] = 0∧0 = 0∧[2 + (-1)bso_19] ≥ 0)







To summarize, we get the following constraints P for the following pairs.
  • 259_0_TWOWAY_GE(x1) → COND_259_0_TWOWAY_GE(>(x1, -1), x1)
    • (x1[0] ≥ 0 ⇒ (UIncreasing(COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])), ≥)∧[(-1)Bound*bni_16] + [(2)bni_16]x1[0] ≥ 0∧[(-1)bso_17] ≥ 0)

  • COND_259_0_TWOWAY_GE(TRUE, x1) → 259_0_TWOWAY_GE(+(x1, -1))
    • ((UIncreasing(259_0_TWOWAY_GE(+(x1[1], -1))), ≥)∧[bni_18] = 0∧0 = 0∧[2 + (-1)bso_19] ≥ 0)




The constraints for P> respective Pbound are constructed from P where we just replace every occurence of "t ≥ s" in P by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved
Polynomial interpretation over integers[POLO]:

POL(TRUE) = 0   
POL(FALSE) = 0   
POL(259_0_twoWay_GE(x1)) = [-1]   
POL(-1) = [-1]   
POL(270_0_twoWay_Return) = [-1]   
POL(299_1_twoWay_InvokeMethod(x1, x2)) = [-1] + [-1]x2 + [-1]x1   
POL(383_0_twoWay_Return(x1)) = x1   
POL(*(x1, x2)) = x1·x2   
POL(337_0_twoWay_Return(x1)) = x1   
POL(Cond_299_1_twoWay_InvokeMethod(x1, x2, x3)) = [-1] + [-1]x3 + [-1]x2   
POL(<(x1, x2)) = [-1]   
POL(1) = [1]   
POL(Cond_299_1_twoWay_InvokeMethod1(x1, x2, x3)) = [-1] + [-1]x3 + [-1]x2   
POL(259_0_TWOWAY_GE(x1)) = [2]x1   
POL(COND_259_0_TWOWAY_GE(x1, x2)) = [2]x2   
POL(>(x1, x2)) = [-1]   
POL(+(x1, x2)) = x1 + x2   

The following pairs are in P>:

COND_259_0_TWOWAY_GE(TRUE, x1[1]) → 259_0_TWOWAY_GE(+(x1[1], -1))

The following pairs are in Pbound:

259_0_TWOWAY_GE(x1[0]) → COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])

The following pairs are in P:

259_0_TWOWAY_GE(x1[0]) → COND_259_0_TWOWAY_GE(>(x1[0], -1), x1[0])

There are no usable rules.

(8) Complex Obligation (AND)

(9) Obligation:

IDP problem:
The following function symbols are pre-defined:
!=~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


The following domains are used:

Integer


The ITRS R consists of the following rules:
259_0_twoWay_GE(-1) → 270_0_twoWay_Return
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, -1) → 383_0_twoWay_Return(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x1) → 383_0_twoWay_Return(x1 * -1)
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod(x0 < 1, 337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(x1 * x0)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod1(x0 < 1, 383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(x1 * x0)

The integer pair graph contains the following rules and edges:
(0): 259_0_TWOWAY_GE(x1[0]) → COND_259_0_TWOWAY_GE(x1[0] > -1, x1[0])


The set Q consists of the following terms:
259_0_twoWay_GE(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x0)
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1)

(10) IDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(11) TRUE

(12) Obligation:

IDP problem:
The following function symbols are pre-defined:
!=~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


The following domains are used:

Integer


The ITRS R consists of the following rules:
259_0_twoWay_GE(-1) → 270_0_twoWay_Return
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, -1) → 383_0_twoWay_Return(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x1) → 383_0_twoWay_Return(x1 * -1)
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod(x0 < 1, 337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(x1 * x0)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1) → Cond_299_1_twoWay_InvokeMethod1(x0 < 1, 383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1) → 383_0_twoWay_Return(x1 * x0)

The integer pair graph contains the following rules and edges:
(1): COND_259_0_TWOWAY_GE(TRUE, x1[1]) → 259_0_TWOWAY_GE(x1[1] + -1)


The set Q consists of the following terms:
259_0_twoWay_GE(-1)
299_1_twoWay_InvokeMethod(270_0_twoWay_Return, x0)
299_1_twoWay_InvokeMethod(337_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod(TRUE, 337_0_twoWay_Return(x0), x1)
299_1_twoWay_InvokeMethod(383_0_twoWay_Return(x0), x1)
Cond_299_1_twoWay_InvokeMethod1(TRUE, 383_0_twoWay_Return(x0), x1)

(13) IDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(14) TRUE