### (0) Obligation:

JBC Problem based on JBC Program:
Manifest-Version: 1.0 Created-By: 1.6.0_22 (Sun Microsystems Inc.) Main-Class: Avg
`public class Avg {	public static void main(String[] args) {		int x, y;		x = args[0].length();		y = args[1].length();		average(x,y);	}	public static int average(int x, int y) {		if (x > 0) {			return average(x-1, y+1);		} else if (y > 2) {			return 1 + average(x+1, y-2);		} else {			return 1;		}	}}`

### (1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

### (2) Obligation:

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

Avg.average(II)I: Graph of 64 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: Avg.average(II)I
SCC calls the following helper methods: Avg.average(II)I
Performed SCC analyses: UsedFieldsAnalysis

### (5) SCCToIDPv1Proof (SOUND transformation)

Transformed FIGraph SCCs to IDPs. Log:

Generated 28 rules for P and 46 rules for R.

P rules:
284_0_average_LE(EOS(STATIC_284), matching1, i37, matching2) → 295_0_average_LE(EOS(STATIC_295), 0, i37, 0) | &&(=(matching1, 0), =(matching2, 0))
284_0_average_LE(EOS(STATIC_284), i47, i37, i47) → 297_0_average_LE(EOS(STATIC_297), i47, i37, i47)
295_0_average_LE(EOS(STATIC_295), matching1, i37, matching2) → 307_0_average_Load(EOS(STATIC_307), 0, i37) | &&(&&(<=(0, 0), =(matching1, 0)), =(matching2, 0))
307_0_average_Load(EOS(STATIC_307), matching1, i37) → 327_0_average_ConstantStackPush(EOS(STATIC_327), 0, i37, i37) | =(matching1, 0)
327_0_average_ConstantStackPush(EOS(STATIC_327), matching1, i37, i37) → 347_0_average_LE(EOS(STATIC_347), 0, i37, i37, 2) | =(matching1, 0)
347_0_average_LE(EOS(STATIC_347), matching1, i58, i58, matching2) → 362_0_average_LE(EOS(STATIC_362), 0, i58, i58, 2) | &&(=(matching1, 0), =(matching2, 2))
362_0_average_LE(EOS(STATIC_362), matching1, i58, i58, matching2) → 376_0_average_ConstantStackPush(EOS(STATIC_376), 0, i58) | &&(&&(>(i58, 2), =(matching1, 0)), =(matching2, 2))
376_0_average_ConstantStackPush(EOS(STATIC_376), matching1, i58) → 385_0_average_Load(EOS(STATIC_385), 0, i58, 1) | =(matching1, 0)
385_0_average_Load(EOS(STATIC_385), matching1, i58, matching2) → 396_0_average_ConstantStackPush(EOS(STATIC_396), i58, 1, 0) | &&(=(matching1, 0), =(matching2, 1))
396_0_average_ConstantStackPush(EOS(STATIC_396), i58, matching1, matching2) → 411_0_average_IntArithmetic(EOS(STATIC_411), i58, 1, 0, 1) | &&(=(matching1, 1), =(matching2, 0))
411_0_average_IntArithmetic(EOS(STATIC_411), i58, matching1, matching2, matching3) → 420_0_average_Load(EOS(STATIC_420), i58, 1, 1) | &&(&&(=(matching1, 1), =(matching2, 0)), =(matching3, 1))
420_0_average_Load(EOS(STATIC_420), i58, matching1, matching2) → 430_0_average_ConstantStackPush(EOS(STATIC_430), 1, 1, i58) | &&(=(matching1, 1), =(matching2, 1))
430_0_average_ConstantStackPush(EOS(STATIC_430), matching1, matching2, i58) → 437_0_average_IntArithmetic(EOS(STATIC_437), 1, 1, i58, 2) | &&(=(matching1, 1), =(matching2, 1))
437_0_average_IntArithmetic(EOS(STATIC_437), matching1, matching2, i58, matching3) → 444_0_average_InvokeMethod(EOS(STATIC_444), 1, 1, -(i58, 2)) | &&(&&(&&(>(i58, 0), =(matching1, 1)), =(matching2, 1)), =(matching3, 2))
444_0_average_InvokeMethod(EOS(STATIC_444), matching1, matching2, i71) → 447_1_average_InvokeMethod(447_0_average_Load(EOS(STATIC_447), 1, i71), 1, 1, i71) | &&(=(matching1, 1), =(matching2, 1))
266_0_average_Load(EOS(STATIC_266), i18, i37) → 284_0_average_LE(EOS(STATIC_284), i18, i37, i18)
297_0_average_LE(EOS(STATIC_297), i47, i37, i47) → 309_0_average_Load(EOS(STATIC_309), i47, i37) | >(i47, 0)
309_0_average_Load(EOS(STATIC_309), i47, i37) → 329_0_average_ConstantStackPush(EOS(STATIC_329), i47, i37, i47)
329_0_average_ConstantStackPush(EOS(STATIC_329), i47, i37, i47) → 349_0_average_IntArithmetic(EOS(STATIC_349), i47, i37, i47, 1)
349_0_average_IntArithmetic(EOS(STATIC_349), i47, i37, i47, matching1) → 364_0_average_Load(EOS(STATIC_364), i47, i37, -(i47, 1)) | &&(>(i47, 0), =(matching1, 1))
364_0_average_Load(EOS(STATIC_364), i47, i37, i59) → 377_0_average_ConstantStackPush(EOS(STATIC_377), i47, i37, i59, i37)
377_0_average_ConstantStackPush(EOS(STATIC_377), i47, i37, i59, i37) → 387_0_average_IntArithmetic(EOS(STATIC_387), i47, i37, i59, i37, 1)
387_0_average_IntArithmetic(EOS(STATIC_387), i47, i37, i59, i37, matching1) → 398_0_average_InvokeMethod(EOS(STATIC_398), i47, i37, i59, +(i37, 1)) | &&(>=(i37, 0), =(matching1, 1))
398_0_average_InvokeMethod(EOS(STATIC_398), i47, i37, i59, i64) → 413_1_average_InvokeMethod(413_0_average_Load(EOS(STATIC_413), i59, i64), i47, i37, i59, i64)
R rules:
347_0_average_LE(EOS(STATIC_347), matching1, i57, i57, matching2) → 361_0_average_LE(EOS(STATIC_361), 0, i57, i57, 2) | &&(=(matching1, 0), =(matching2, 2))
361_0_average_LE(EOS(STATIC_361), matching1, i57, i57, matching2) → 373_0_average_ConstantStackPush(EOS(STATIC_373)) | &&(&&(<=(i57, 2), =(matching1, 0)), =(matching2, 2))
373_0_average_ConstantStackPush(EOS(STATIC_373)) → 384_0_average_Return(EOS(STATIC_384), 1)
413_1_average_InvokeMethod(384_0_average_Return(EOS(STATIC_384), matching1), i47, i37, matching2, i70) → 446_0_average_Return(EOS(STATIC_446), i47, i37, 0, i70, 1) | &&(=(matching1, 1), =(matching2, 0))
413_1_average_InvokeMethod(449_0_average_Return(EOS(STATIC_449), i78, i79, matching1), i47, i37, i78, i79) → 465_0_average_Return(EOS(STATIC_465), i47, i37, i78, i79, i78, i79, 1) | =(matching1, 1)
413_1_average_InvokeMethod(473_0_average_Return(EOS(STATIC_473), i90, i91, matching1), i47, i37, i90, i91) → 502_0_average_Return(EOS(STATIC_502), i47, i37, i90, i91, i90, i91, 1) | =(matching1, 1)
413_1_average_InvokeMethod(580_0_average_Return(EOS(STATIC_580), i150, i151, i126), i47, i37, i150, i151) → 609_0_average_Return(EOS(STATIC_609), i47, i37, i150, i151, i150, i151, i126)
413_1_average_InvokeMethod(700_0_average_Return(EOS(STATIC_700), i216, i217, i192), i47, i37, i216, i217) → 725_0_average_Return(EOS(STATIC_725), i47, i37, i216, i217, i216, i217, i192)
413_1_average_InvokeMethod(805_0_average_Return(EOS(STATIC_805), i284, i285, i261), i47, i37, i284, i285) → 830_0_average_Return(EOS(STATIC_830), i47, i37, i284, i285, i284, i285, i261)
413_1_average_InvokeMethod(812_0_average_Return(EOS(STATIC_812), i277), i47, i37, matching1, i297) → 850_0_average_Return(EOS(STATIC_850), i47, i37, 0, i297, i277) | =(matching1, 0)
413_1_average_InvokeMethod(859_0_average_Return(EOS(STATIC_859), i316, i317, i303), i47, i37, i316, i317) → 878_0_average_Return(EOS(STATIC_878), i47, i37, i316, i317, i316, i317, i303)
446_0_average_Return(EOS(STATIC_446), i47, i37, matching1, i70, matching2) → 449_0_average_Return(EOS(STATIC_449), i47, i37, 1) | &&(=(matching1, 0), =(matching2, 1))
447_1_average_InvokeMethod(449_0_average_Return(EOS(STATIC_449), matching1, i82, matching2), matching3, matching4, i82) → 467_0_average_Return(EOS(STATIC_467), 1, 1, i82, 1, i82, 1) | &&(&&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1)), =(matching4, 1))
447_1_average_InvokeMethod(473_0_average_Return(EOS(STATIC_473), matching1, i93, matching2), matching3, matching4, i93) → 505_0_average_Return(EOS(STATIC_505), 1, 1, i93, 1, i93, 1) | &&(&&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1)), =(matching4, 1))
447_1_average_InvokeMethod(580_0_average_Return(EOS(STATIC_580), matching1, i152, i126), matching2, matching3, i152) → 612_0_average_Return(EOS(STATIC_612), 1, 1, i152, 1, i152, i126) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
447_1_average_InvokeMethod(700_0_average_Return(EOS(STATIC_700), matching1, i218, i192), matching2, matching3, i218) → 727_0_average_Return(EOS(STATIC_727), 1, 1, i218, 1, i218, i192) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
447_1_average_InvokeMethod(805_0_average_Return(EOS(STATIC_805), matching1, i286, i261), matching2, matching3, i286) → 832_0_average_Return(EOS(STATIC_832), 1, 1, i286, 1, i286, i261) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
447_1_average_InvokeMethod(859_0_average_Return(EOS(STATIC_859), matching1, i318, i303), matching2, matching3, i318) → 880_0_average_Return(EOS(STATIC_880), 1, 1, i318, 1, i318, i303) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
449_0_average_Return(EOS(STATIC_449), i47, i37, matching1) → 473_0_average_Return(EOS(STATIC_473), i47, i37, 1) | =(matching1, 1)
465_0_average_Return(EOS(STATIC_465), i47, i37, i78, i79, i78, i79, matching1) → 560_0_average_Return(EOS(STATIC_560), i47, i37, i78, i79, i78, i79, 1) | =(matching1, 1)
467_0_average_Return(EOS(STATIC_467), matching1, matching2, i82, matching3, i82, matching4) → 569_0_average_Return(EOS(STATIC_569), 1, 1, i82, 1, i82, 1) | &&(&&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1)), =(matching4, 1))
473_0_average_Return(EOS(STATIC_473), i47, i37, matching1) → 580_0_average_Return(EOS(STATIC_580), i47, i37, 1) | =(matching1, 1)
502_0_average_Return(EOS(STATIC_502), i47, i37, i90, i91, i90, i91, matching1) → 465_0_average_Return(EOS(STATIC_465), i47, i37, i90, i91, i90, i91, 1) | =(matching1, 1)
505_0_average_Return(EOS(STATIC_505), matching1, matching2, i93, matching3, i93, matching4) → 467_0_average_Return(EOS(STATIC_467), 1, 1, i93, 1, i93, 1) | &&(&&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1)), =(matching4, 1))
560_0_average_Return(EOS(STATIC_560), i47, i37, i124, i125, i124, i125, i126) → 679_0_average_Return(EOS(STATIC_679), i47, i37, i124, i125, i124, i125, i126)
569_0_average_Return(EOS(STATIC_569), matching1, matching2, i133, matching3, i133, i134) → 688_0_average_Return(EOS(STATIC_688), 1, 1, i133, 1, i133, i134) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
580_0_average_Return(EOS(STATIC_580), i47, i37, i126) → 700_0_average_Return(EOS(STATIC_700), i47, i37, i126)
609_0_average_Return(EOS(STATIC_609), i47, i37, i150, i151, i150, i151, i126) → 560_0_average_Return(EOS(STATIC_560), i47, i37, i150, i151, i150, i151, i126)
612_0_average_Return(EOS(STATIC_612), matching1, matching2, i152, matching3, i152, i126) → 569_0_average_Return(EOS(STATIC_569), 1, 1, i152, 1, i152, i126) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
635_0_average_Return(EOS(STATIC_635), i47, i37, matching1, i170, i169) → 750_0_average_Return(EOS(STATIC_750), i47, i37, 0, i170, i169) | =(matching1, 0)
679_0_average_Return(EOS(STATIC_679), i47, i37, i190, i191, i190, i191, i192) → 789_0_average_Return(EOS(STATIC_789), i47, i37, i190, i191, i190, i191, i192)
688_0_average_Return(EOS(STATIC_688), matching1, matching2, i198, matching3, i198, i199) → 796_0_average_Return(EOS(STATIC_796), 1, 1, i198, 1, i198, i199) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
700_0_average_Return(EOS(STATIC_700), i47, i37, i192) → 805_0_average_Return(EOS(STATIC_805), i47, i37, i192)
725_0_average_Return(EOS(STATIC_725), i47, i37, i216, i217, i216, i217, i192) → 679_0_average_Return(EOS(STATIC_679), i47, i37, i216, i217, i216, i217, i192)
727_0_average_Return(EOS(STATIC_727), matching1, matching2, i218, matching3, i218, i192) → 688_0_average_Return(EOS(STATIC_688), 1, 1, i218, 1, i218, i192) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
750_0_average_Return(EOS(STATIC_750), i47, i37, matching1, i237, i236) → 851_0_average_Return(EOS(STATIC_851), i47, i37, 0, i237, i236) | =(matching1, 0)
789_0_average_Return(EOS(STATIC_789), i47, i37, i259, i260, i259, i260, i261) → 805_0_average_Return(EOS(STATIC_805), i47, i37, i261)
796_0_average_Return(EOS(STATIC_796), matching1, matching2, i267, matching3, i267, i268) → 807_0_average_IntArithmetic(EOS(STATIC_807), 1, i268) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
805_0_average_Return(EOS(STATIC_805), i47, i37, i261) → 859_0_average_Return(EOS(STATIC_859), i47, i37, i261)
807_0_average_IntArithmetic(EOS(STATIC_807), matching1, i268) → 812_0_average_Return(EOS(STATIC_812), +(1, i268)) | =(matching1, 1)
830_0_average_Return(EOS(STATIC_830), i47, i37, i284, i285, i284, i285, i261) → 789_0_average_Return(EOS(STATIC_789), i47, i37, i284, i285, i284, i285, i261)
832_0_average_Return(EOS(STATIC_832), matching1, matching2, i286, matching3, i286, i261) → 796_0_average_Return(EOS(STATIC_796), 1, 1, i286, 1, i286, i261) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))
850_0_average_Return(EOS(STATIC_850), i47, i37, matching1, i297, i277) → 851_0_average_Return(EOS(STATIC_851), i47, i37, 0, i297, i277) | =(matching1, 0)
851_0_average_Return(EOS(STATIC_851), i47, i37, matching1, i304, i303) → 859_0_average_Return(EOS(STATIC_859), i47, i37, i303) | =(matching1, 0)
878_0_average_Return(EOS(STATIC_878), i47, i37, i316, i317, i316, i317, i303) → 789_0_average_Return(EOS(STATIC_789), i47, i37, i316, i317, i316, i317, i303)
880_0_average_Return(EOS(STATIC_880), matching1, matching2, i318, matching3, i318, i303) → 796_0_average_Return(EOS(STATIC_796), 1, 1, i318, 1, i318, i303) | &&(&&(=(matching1, 1), =(matching2, 1)), =(matching3, 1))

Combined rules. Obtained 2 conditional rules for P and 14 conditional rules for R.

P rules:
284_0_average_LE(EOS(STATIC_284), 0, x1, 0) → 447_1_average_InvokeMethod(284_0_average_LE(EOS(STATIC_284), 1, -(x1, 2), 1), 1, 1, -(x1, 2)) | >(x1, 2)
284_0_average_LE(EOS(STATIC_284), x0, x1, x0) → 413_1_average_InvokeMethod(284_0_average_LE(EOS(STATIC_284), -(x0, 1), +(x1, 1), -(x0, 1)), x0, x1, -(x0, 1), +(x1, 1)) | &&(>(+(x1, 1), 0), >(x0, 0))
R rules:
413_1_average_InvokeMethod(384_0_average_Return(EOS(STATIC_384), 1), x1, x2, 0, x4) → 859_0_average_Return(EOS(STATIC_859), x1, x2, 1)
413_1_average_InvokeMethod(805_0_average_Return(EOS(STATIC_805), x0, x1, x2), x3, x4, x0, x1) → 859_0_average_Return(EOS(STATIC_859), x3, x4, x2)
413_1_average_InvokeMethod(859_0_average_Return(EOS(STATIC_859), x0, x1, x2), x3, x4, x0, x1) → 859_0_average_Return(EOS(STATIC_859), x3, x4, x2)
413_1_average_InvokeMethod(700_0_average_Return(EOS(STATIC_700), x0, x1, x2), x3, x4, x0, x1) → 859_0_average_Return(EOS(STATIC_859), x3, x4, x2)
413_1_average_InvokeMethod(449_0_average_Return(EOS(STATIC_449), x0, x1, 1), x3, x4, x0, x1) → 859_0_average_Return(EOS(STATIC_859), x3, x4, 1)
413_1_average_InvokeMethod(473_0_average_Return(EOS(STATIC_473), x0, x1, 1), x3, x4, x0, x1) → 859_0_average_Return(EOS(STATIC_859), x3, x4, 1)
413_1_average_InvokeMethod(580_0_average_Return(EOS(STATIC_580), x0, x1, x2), x3, x4, x0, x1) → 859_0_average_Return(EOS(STATIC_859), x3, x4, x2)
413_1_average_InvokeMethod(812_0_average_Return(EOS(STATIC_812), x0), x1, x2, 0, x4) → 859_0_average_Return(EOS(STATIC_859), x1, x2, x0)
447_1_average_InvokeMethod(805_0_average_Return(EOS(STATIC_805), 1, x1, x2), 1, 1, x1) → 812_0_average_Return(EOS(STATIC_812), +(1, x2))
447_1_average_InvokeMethod(859_0_average_Return(EOS(STATIC_859), 1, x1, x2), 1, 1, x1) → 812_0_average_Return(EOS(STATIC_812), +(1, x2))
447_1_average_InvokeMethod(700_0_average_Return(EOS(STATIC_700), 1, x1, x2), 1, 1, x1) → 812_0_average_Return(EOS(STATIC_812), +(1, x2))
447_1_average_InvokeMethod(449_0_average_Return(EOS(STATIC_449), 1, x1, 1), 1, 1, x1) → 812_0_average_Return(EOS(STATIC_812), 2)
447_1_average_InvokeMethod(473_0_average_Return(EOS(STATIC_473), 1, x1, 1), 1, 1, x1) → 812_0_average_Return(EOS(STATIC_812), 2)
447_1_average_InvokeMethod(580_0_average_Return(EOS(STATIC_580), 1, x1, x2), 1, 1, x1) → 812_0_average_Return(EOS(STATIC_812), +(1, x2))

Filtered ground terms:

284_0_average_LE(x1, x2, x3, x4) → 284_0_average_LE(x2, x3, x4)
Cond_284_0_average_LE1(x1, x2, x3, x4, x5) → Cond_284_0_average_LE1(x1, x3, x4, x5)
447_1_average_InvokeMethod(x1, x2, x3, x4) → 447_1_average_InvokeMethod(x1, x4)
Cond_284_0_average_LE(x1, x2, x3, x4, x5) → Cond_284_0_average_LE(x1, x4)
812_0_average_Return(x1, x2) → 812_0_average_Return(x2)
580_0_average_Return(x1, x2, x3, x4) → 580_0_average_Return(x2, x3, x4)
473_0_average_Return(x1, x2, x3, x4) → 473_0_average_Return(x2, x3)
449_0_average_Return(x1, x2, x3, x4) → 449_0_average_Return(x2, x3)
700_0_average_Return(x1, x2, x3, x4) → 700_0_average_Return(x2, x3, x4)
859_0_average_Return(x1, x2, x3, x4) → 859_0_average_Return(x2, x3, x4)
805_0_average_Return(x1, x2, x3, x4) → 805_0_average_Return(x2, x3, x4)
384_0_average_Return(x1, x2) → 384_0_average_Return

Filtered duplicate args:

284_0_average_LE(x1, x2, x3) → 284_0_average_LE(x2, x3)
447_1_average_InvokeMethod(x1, x2) → 447_1_average_InvokeMethod(x1)
Cond_284_0_average_LE1(x1, x2, x3, x4) → Cond_284_0_average_LE1(x1, x3, x4)

Filtered unneeded arguments:

413_1_average_InvokeMethod(x1, x2, x3, x4, x5) → 413_1_average_InvokeMethod(x1, x2, x4)
805_0_average_Return(x1, x2, x3) → 805_0_average_Return(x1)
859_0_average_Return(x1, x2, x3) → 859_0_average_Return(x1)
700_0_average_Return(x1, x2, x3) → 700_0_average_Return(x1)
449_0_average_Return(x1, x2) → 449_0_average_Return(x1)
473_0_average_Return(x1, x2) → 473_0_average_Return(x1)
580_0_average_Return(x1, x2, x3) → 580_0_average_Return(x1)

Combined rules. Obtained 2 conditional rules for P and 14 conditional rules for R.

P rules:
284_0_average_LE(x1, 0) → 447_1_average_InvokeMethod(284_0_average_LE(-(x1, 2), 1)) | >(x1, 2)
284_0_average_LE(x1, x0) → 413_1_average_InvokeMethod(284_0_average_LE(+(x1, 1), -(x0, 1)), x0, -(x0, 1)) | &&(>(x1, -1), >(x0, 0))
R rules:
413_1_average_InvokeMethod(384_0_average_Return, x1, 0) → 859_0_average_Return(x1)
413_1_average_InvokeMethod(805_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(859_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(700_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(449_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(473_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(580_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0) → 859_0_average_Return(x1)
447_1_average_InvokeMethod(805_0_average_Return(1)) → 812_0_average_Return(+(1, x2))
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(+(1, x2))
447_1_average_InvokeMethod(700_0_average_Return(1)) → 812_0_average_Return(+(1, x2))
447_1_average_InvokeMethod(449_0_average_Return(1)) → 812_0_average_Return(2)
447_1_average_InvokeMethod(473_0_average_Return(1)) → 812_0_average_Return(2)
447_1_average_InvokeMethod(580_0_average_Return(1)) → 812_0_average_Return(+(1, x2))

Performed bisimulation on rules. Used the following equivalence classes: {[859_0_average_Return_1, 805_0_average_Return_1, 700_0_average_Return_1, 449_0_average_Return_1, 473_0_average_Return_1, 580_0_average_Return_1]=859_0_average_Return_1}

Finished conversion. Obtained 4 rules for P and 5 rules for R. System has predefined symbols.

P rules:
284_0_AVERAGE_LE(x1, 0) → COND_284_0_AVERAGE_LE(>(x1, 2), x1, 0)
COND_284_0_AVERAGE_LE(TRUE, x1, 0) → 284_0_AVERAGE_LE(-(x1, 2), 1)
284_0_AVERAGE_LE(x1, x0) → COND_284_0_AVERAGE_LE1(&&(>(x1, -1), >(x0, 0)), x1, x0)
COND_284_0_AVERAGE_LE1(TRUE, x1, x0) → 284_0_AVERAGE_LE(+(x1, 1), -(x0, 1))
R rules:
413_1_average_InvokeMethod(384_0_average_Return, x1, 0) → 859_0_average_Return(x1)
413_1_average_InvokeMethod(859_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0) → 859_0_average_Return(x1)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(+(1, x2))
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(2)

### (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, Boolean

The ITRS R consists of the following rules:
413_1_average_InvokeMethod(384_0_average_Return, x1, 0) → 859_0_average_Return(x1)
413_1_average_InvokeMethod(859_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0) → 859_0_average_Return(x1)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(1 + x2)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(2)

The integer pair graph contains the following rules and edges:
(0): 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(x1[0] > 2, x1[0], 0)
(1): COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(x1[1] - 2, 1)
(2): 284_0_AVERAGE_LE(x1[2], x0[2]) → COND_284_0_AVERAGE_LE1(x1[2] > -1 && x0[2] > 0, x1[2], x0[2])
(3): COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3]) → 284_0_AVERAGE_LE(x1[3] + 1, x0[3] - 1)

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

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

(1) -> (2), if (x1[1] - 2* x1[2]1* x0[2])

(2) -> (3), if (x1[2] > -1 && x0[2] > 0x1[2]* x1[3]x0[2]* x0[3])

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

(3) -> (2), if (x1[3] + 1* x1[2]x0[3] - 1* x0[2])

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (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@654f8017 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 284_0_AVERAGE_LE(x1, 0) → COND_284_0_AVERAGE_LE(>(x1, 2), x1, 0) the following chains were created:
• We consider the chain 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0), COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1) which results in the following constraint:

(1)    (>(x1[0], 2)=TRUEx1[0]=x1[1]284_0_AVERAGE_LE(x1[0], 0)≥NonInfC∧284_0_AVERAGE_LE(x1[0], 0)≥COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)∧(UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥))

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

(2)    (>(x1[0], 2)=TRUE284_0_AVERAGE_LE(x1[0], 0)≥NonInfC∧284_0_AVERAGE_LE(x1[0], 0)≥COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)∧(UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥))

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

(3)    (x1[0] + [-3] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x1[0] ≥ 0∧[(-1)bso_16] ≥ 0)

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

(4)    (x1[0] + [-3] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x1[0] ≥ 0∧[(-1)bso_16] ≥ 0)

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

(5)    (x1[0] + [-3] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x1[0] ≥ 0∧[(-1)bso_16] ≥ 0)

We simplified constraint (5) using rule (IDP_SMT_SPLIT) which results in the following new constraint:

(6)    (x1[0] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(2)bni_15 + (-1)Bound*bni_15] + [bni_15]x1[0] ≥ 0∧[(-1)bso_16] ≥ 0)

For Pair COND_284_0_AVERAGE_LE(TRUE, x1, 0) → 284_0_AVERAGE_LE(-(x1, 2), 1) the following chains were created:
• We consider the chain COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1) which results in the following constraint:

(7)    (COND_284_0_AVERAGE_LE(TRUE, x1[1], 0)≥NonInfC∧COND_284_0_AVERAGE_LE(TRUE, x1[1], 0)≥284_0_AVERAGE_LE(-(x1[1], 2), 1)∧(UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥))

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

(8)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_17] = 0∧[(-1)bso_18] ≥ 0)

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

(9)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_17] = 0∧[(-1)bso_18] ≥ 0)

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

(10)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_17] = 0∧[(-1)bso_18] ≥ 0)

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

(11)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_17] = 0∧0 = 0∧[(-1)bso_18] ≥ 0)

For Pair 284_0_AVERAGE_LE(x1, x0) → COND_284_0_AVERAGE_LE1(&&(>(x1, -1), >(x0, 0)), x1, x0) the following chains were created:
• We consider the chain 284_0_AVERAGE_LE(x1[2], x0[2]) → COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2]), COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3]) → 284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1)) which results in the following constraint:

(12)    (&&(>(x1[2], -1), >(x0[2], 0))=TRUEx1[2]=x1[3]x0[2]=x0[3]284_0_AVERAGE_LE(x1[2], x0[2])≥NonInfC∧284_0_AVERAGE_LE(x1[2], x0[2])≥COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])∧(UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥))

We simplified constraint (12) using rules (IV), (IDP_BOOLEAN) which results in the following new constraint:

(13)    (>(x1[2], -1)=TRUE>(x0[2], 0)=TRUE284_0_AVERAGE_LE(x1[2], x0[2])≥NonInfC∧284_0_AVERAGE_LE(x1[2], x0[2])≥COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])∧(UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥))

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

(14)    (x1[2] ≥ 0∧x0[2] + [-1] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥)∧[(-1)bni_19 + (-1)Bound*bni_19] + [(2)bni_19]x0[2] + [bni_19]x1[2] ≥ 0∧[(-1)bso_20] ≥ 0)

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

(15)    (x1[2] ≥ 0∧x0[2] + [-1] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥)∧[(-1)bni_19 + (-1)Bound*bni_19] + [(2)bni_19]x0[2] + [bni_19]x1[2] ≥ 0∧[(-1)bso_20] ≥ 0)

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

(16)    (x1[2] ≥ 0∧x0[2] + [-1] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥)∧[(-1)bni_19 + (-1)Bound*bni_19] + [(2)bni_19]x0[2] + [bni_19]x1[2] ≥ 0∧[(-1)bso_20] ≥ 0)

We simplified constraint (16) using rule (IDP_SMT_SPLIT) which results in the following new constraint:

(17)    (x1[2] ≥ 0∧x0[2] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥)∧[bni_19 + (-1)Bound*bni_19] + [(2)bni_19]x0[2] + [bni_19]x1[2] ≥ 0∧[(-1)bso_20] ≥ 0)

For Pair COND_284_0_AVERAGE_LE1(TRUE, x1, x0) → 284_0_AVERAGE_LE(+(x1, 1), -(x0, 1)) the following chains were created:
• We consider the chain COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3]) → 284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1)) which results in the following constraint:

(18)    (COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3])≥NonInfC∧COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3])≥284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))∧(UIncreasing(284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))), ≥))

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

(19)    ((UIncreasing(284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))), ≥)∧[bni_21] = 0∧[1 + (-1)bso_22] ≥ 0)

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

(20)    ((UIncreasing(284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))), ≥)∧[bni_21] = 0∧[1 + (-1)bso_22] ≥ 0)

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

(21)    ((UIncreasing(284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))), ≥)∧[bni_21] = 0∧[1 + (-1)bso_22] ≥ 0)

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

(22)    ((UIncreasing(284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))), ≥)∧[bni_21] = 0∧0 = 0∧0 = 0∧[1 + (-1)bso_22] ≥ 0)

To summarize, we get the following constraints P for the following pairs.
• 284_0_AVERAGE_LE(x1, 0) → COND_284_0_AVERAGE_LE(>(x1, 2), x1, 0)
• (x1[0] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(2)bni_15 + (-1)Bound*bni_15] + [bni_15]x1[0] ≥ 0∧[(-1)bso_16] ≥ 0)

• COND_284_0_AVERAGE_LE(TRUE, x1, 0) → 284_0_AVERAGE_LE(-(x1, 2), 1)
• ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_17] = 0∧0 = 0∧[(-1)bso_18] ≥ 0)

• 284_0_AVERAGE_LE(x1, x0) → COND_284_0_AVERAGE_LE1(&&(>(x1, -1), >(x0, 0)), x1, x0)
• (x1[2] ≥ 0∧x0[2] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])), ≥)∧[bni_19 + (-1)Bound*bni_19] + [(2)bni_19]x0[2] + [bni_19]x1[2] ≥ 0∧[(-1)bso_20] ≥ 0)

• COND_284_0_AVERAGE_LE1(TRUE, x1, x0) → 284_0_AVERAGE_LE(+(x1, 1), -(x0, 1))
• ((UIncreasing(284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))), ≥)∧[bni_21] = 0∧0 = 0∧0 = 0∧[1 + (-1)bso_22] ≥ 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(413_1_average_InvokeMethod(x1, x2, x3)) = [-1]
POL(384_0_average_Return) = [-1]
POL(0) = 0
POL(859_0_average_Return(x1)) = [-1]
POL(812_0_average_Return(x1)) = x1
POL(447_1_average_InvokeMethod(x1)) = [-1]
POL(1) = [1]
POL(+(x1, x2)) = x1 + x2
POL(2) = [2]
POL(284_0_AVERAGE_LE(x1, x2)) = [-1] + [2]x2 + x1
POL(COND_284_0_AVERAGE_LE(x1, x2, x3)) = [-1] + x2
POL(>(x1, x2)) = [-1]
POL(-(x1, x2)) = x1 + [-1]x2
POL(COND_284_0_AVERAGE_LE1(x1, x2, x3)) = [-1] + [2]x3 + x2
POL(&&(x1, x2)) = [-1]
POL(-1) = [-1]

The following pairs are in P>:

COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3]) → 284_0_AVERAGE_LE(+(x1[3], 1), -(x0[3], 1))

The following pairs are in Pbound:

284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)
284_0_AVERAGE_LE(x1[2], x0[2]) → COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])

The following pairs are in P:

284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)
COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1)
284_0_AVERAGE_LE(x1[2], x0[2]) → COND_284_0_AVERAGE_LE1(&&(>(x1[2], -1), >(x0[2], 0)), x1[2], x0[2])

There are no usable rules.

### (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, Boolean

The ITRS R consists of the following rules:
413_1_average_InvokeMethod(384_0_average_Return, x1, 0) → 859_0_average_Return(x1)
413_1_average_InvokeMethod(859_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0) → 859_0_average_Return(x1)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(1 + x2)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(2)

The integer pair graph contains the following rules and edges:
(0): 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(x1[0] > 2, x1[0], 0)
(1): COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(x1[1] - 2, 1)
(2): 284_0_AVERAGE_LE(x1[2], x0[2]) → COND_284_0_AVERAGE_LE1(x1[2] > -1 && x0[2] > 0, x1[2], x0[2])

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

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

(1) -> (2), if (x1[1] - 2* x1[2]1* x0[2])

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (10) IDependencyGraphProof (EQUIVALENT transformation)

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

### (11) 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:
413_1_average_InvokeMethod(384_0_average_Return, x1, 0) → 859_0_average_Return(x1)
413_1_average_InvokeMethod(859_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0) → 859_0_average_Return(x1)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(1 + x2)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(2)

The integer pair graph contains the following rules and edges:
(1): COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(x1[1] - 2, 1)
(0): 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(x1[0] > 2, x1[0], 0)

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

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

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (12) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

### (13) 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

R is empty.

The integer pair graph contains the following rules and edges:
(1): COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(x1[1] - 2, 1)
(0): 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(x1[0] > 2, x1[0], 0)

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

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

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (14) 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@654f8017 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 COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1) the following chains were created:
• We consider the chain COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1) which results in the following constraint:

(1)    (COND_284_0_AVERAGE_LE(TRUE, x1[1], 0)≥NonInfC∧COND_284_0_AVERAGE_LE(TRUE, x1[1], 0)≥284_0_AVERAGE_LE(-(x1[1], 2), 1)∧(UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥))

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

(2)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_6] = 0∧[2 + (-1)bso_7] ≥ 0)

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

(3)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_6] = 0∧[2 + (-1)bso_7] ≥ 0)

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

(4)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_6] = 0∧[2 + (-1)bso_7] ≥ 0)

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

(5)    ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_6] = 0∧0 = 0∧[2 + (-1)bso_7] ≥ 0)

For Pair 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0) the following chains were created:
• We consider the chain 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0), COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1) which results in the following constraint:

(6)    (>(x1[0], 2)=TRUEx1[0]=x1[1]284_0_AVERAGE_LE(x1[0], 0)≥NonInfC∧284_0_AVERAGE_LE(x1[0], 0)≥COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)∧(UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥))

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

(7)    (>(x1[0], 2)=TRUE284_0_AVERAGE_LE(x1[0], 0)≥NonInfC∧284_0_AVERAGE_LE(x1[0], 0)≥COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)∧(UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥))

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

(8)    (x1[0] + [-3] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(-1)bni_8 + (-1)Bound*bni_8] + [bni_8]x1[0] ≥ 0∧[(-1)bso_9] ≥ 0)

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

(9)    (x1[0] + [-3] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(-1)bni_8 + (-1)Bound*bni_8] + [bni_8]x1[0] ≥ 0∧[(-1)bso_9] ≥ 0)

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

(10)    (x1[0] + [-3] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(-1)bni_8 + (-1)Bound*bni_8] + [bni_8]x1[0] ≥ 0∧[(-1)bso_9] ≥ 0)

We simplified constraint (10) using rule (IDP_SMT_SPLIT) which results in the following new constraint:

(11)    (x1[0] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(2)bni_8 + (-1)Bound*bni_8] + [bni_8]x1[0] ≥ 0∧[(-1)bso_9] ≥ 0)

To summarize, we get the following constraints P for the following pairs.
• COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1)
• ((UIncreasing(284_0_AVERAGE_LE(-(x1[1], 2), 1)), ≥)∧[bni_6] = 0∧0 = 0∧[2 + (-1)bso_7] ≥ 0)

• 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)
• (x1[0] ≥ 0 ⇒ (UIncreasing(COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)), ≥)∧[(2)bni_8 + (-1)Bound*bni_8] + [bni_8]x1[0] ≥ 0∧[(-1)bso_9] ≥ 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(COND_284_0_AVERAGE_LE(x1, x2, x3)) = [-1] + x2
POL(0) = 0
POL(284_0_AVERAGE_LE(x1, x2)) = [-1] + x1
POL(-(x1, x2)) = x1 + [-1]x2
POL(2) = [2]
POL(1) = [1]
POL(>(x1, x2)) = [-1]

The following pairs are in P>:

COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(-(x1[1], 2), 1)

The following pairs are in Pbound:

284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)

The following pairs are in P:

284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(>(x1[0], 2), x1[0], 0)

There are no usable rules.

### (16) 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

R is empty.

The integer pair graph contains the following rules and edges:
(0): 284_0_AVERAGE_LE(x1[0], 0) → COND_284_0_AVERAGE_LE(x1[0] > 2, x1[0], 0)

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (17) IDependencyGraphProof (EQUIVALENT transformation)

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

### (19) 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

R is empty.

The integer pair graph contains the following rules and edges:
(1): COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(x1[1] - 2, 1)

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (20) IDependencyGraphProof (EQUIVALENT transformation)

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

### (22) 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:
413_1_average_InvokeMethod(384_0_average_Return, x1, 0) → 859_0_average_Return(x1)
413_1_average_InvokeMethod(859_0_average_Return(x0), x3, x0) → 859_0_average_Return(x3)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0) → 859_0_average_Return(x1)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(1 + x2)
447_1_average_InvokeMethod(859_0_average_Return(1)) → 812_0_average_Return(2)

The integer pair graph contains the following rules and edges:
(1): COND_284_0_AVERAGE_LE(TRUE, x1[1], 0) → 284_0_AVERAGE_LE(x1[1] - 2, 1)
(3): COND_284_0_AVERAGE_LE1(TRUE, x1[3], x0[3]) → 284_0_AVERAGE_LE(x1[3] + 1, x0[3] - 1)

The set Q consists of the following terms:
413_1_average_InvokeMethod(384_0_average_Return, x0, 0)
413_1_average_InvokeMethod(859_0_average_Return(x0), x1, x0)
413_1_average_InvokeMethod(812_0_average_Return(x0), x1, 0)
447_1_average_InvokeMethod(859_0_average_Return(1))

### (23) IDependencyGraphProof (EQUIVALENT transformation)

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