(0) Obligation:

JBC Problem based on JBC Program:
public class TimesPlusUserDef {
public static void main(String[] args) {
int x, y;
x = args[0].length();
y = args[1].length();
times(x, y);
}

public static int times(int x, int y) {
if (y == 0)
return 0;
if (y > 0)
return plus(times(x, y - 1), x);
return 0;
}

public static int plus(int x, int y) {
if (y > 0) {
return 1 + plus(x, y-1);
} else if (x > 0) {
return 1 + plus(x-1, y);
} else {
return 0;
}
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

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

TimesPlusUserDef.times(II)I: Graph of 50 nodes with 0 SCCs.

TimesPlusUserDef.plus(II)I: Graph of 63 nodes with 0 SCCs.


(3) TerminationGraphToSCCProof (SOUND transformation)

Splitted TerminationGraph to 2 SCCss.

(4) Complex Obligation (AND)

(5) Obligation:

SCC of termination graph based on JBC Program.
SCC contains nodes from the following methods: TimesPlusUserDef.plus(II)I
SCC calls the following helper methods: TimesPlusUserDef.plus(II)I
Performed SCC analyses:
  • Used field analysis yielded the following read fields:
  • Marker field analysis yielded the following relations that could be markers:

(6) SCCToIntTRSProof (SOUND transformation)

Transformed FIGraph SCCs to intTRSs. Log:

Generated rules. Obtained 26 IRules

P rules:
f1801_0_plus_LE(EOS, i653, matching1, i653, matching2, matching3) → f1802_0_plus_LE(EOS, i653, 0, i653, 0, 0) | &&(&&(=(matching1, 0), =(matching2, 0)), =(matching3, 0))
f1801_0_plus_LE(EOS, i653, i656, i653, i656, i656) → f1803_0_plus_LE(EOS, i653, i656, i653, i656, i656)
f1802_0_plus_LE(EOS, i653, matching1, i653, matching2, matching3) → f1804_0_plus_Load(EOS, i653, 0, i653, 0) | &&(&&(&&(<=(0, 0), =(matching1, 0)), =(matching2, 0)), =(matching3, 0))
f1804_0_plus_Load(EOS, i653, matching1, i653, matching2) → f1807_0_plus_LE(EOS, i653, 0, i653, 0, i653) | &&(=(matching1, 0), =(matching2, 0))
f1807_0_plus_LE(EOS, i658, matching1, i658, matching2, i658) → f1811_0_plus_LE(EOS, i658, 0, i658, 0, i658) | &&(=(matching1, 0), =(matching2, 0))
f1811_0_plus_LE(EOS, i658, matching1, i658, matching2, i658) → f1816_0_plus_ConstantStackPush(EOS, i658, 0, i658, 0) | &&(&&(>(i658, 0), =(matching1, 0)), =(matching2, 0))
f1816_0_plus_ConstantStackPush(EOS, i658, matching1, i658, matching2) → f1822_0_plus_Load(EOS, i658, 0, i658, 0, 1) | &&(=(matching1, 0), =(matching2, 0))
f1822_0_plus_Load(EOS, i658, matching1, i658, matching2, matching3) → f1825_0_plus_ConstantStackPush(EOS, i658, 0, 0, 1, i658) | &&(&&(=(matching1, 0), =(matching2, 0)), =(matching3, 1))
f1825_0_plus_ConstantStackPush(EOS, i658, matching1, matching2, matching3, i658) → f1832_0_plus_IntArithmetic(EOS, i658, 0, 0, 1, i658, 1) | &&(&&(=(matching1, 0), =(matching2, 0)), =(matching3, 1))
f1832_0_plus_IntArithmetic(EOS, i658, matching1, matching2, matching3, i658, matching4) → f1838_0_plus_Load(EOS, i658, 0, 0, 1, -(i658, 1)) | &&(&&(&&(&&(>(i658, 0), =(matching1, 0)), =(matching2, 0)), =(matching3, 1)), =(matching4, 1))
f1838_0_plus_Load(EOS, i658, matching1, matching2, matching3, i662) → f1847_0_plus_InvokeMethod(EOS, i658, 0, 1, i662, 0) | &&(&&(=(matching1, 0), =(matching2, 0)), =(matching3, 1))
f1847_0_plus_InvokeMethod(EOS, i658, matching1, matching2, i662, matching3) → f1861_0_plus_Load(EOS, i662, 0, i662, 0) | &&(&&(=(matching1, 0), =(matching2, 1)), =(matching3, 0))
f1847_0_plus_InvokeMethod(EOS, i658, matching1, matching2, i662, matching3) → f1861_1_plus_Load(EOS, i658, 0, 1, i662, 0, i662, 0) | &&(&&(=(matching1, 0), =(matching2, 1)), =(matching3, 0))
f1861_0_plus_Load(EOS, i662, matching1, i662, matching2) → f1872_0_plus_Load(EOS, i662, 0, i662, 0) | &&(=(matching1, 0), =(matching2, 0))
f1872_0_plus_Load(EOS, i662, matching1, i662, matching2) → f1799_0_plus_Load(EOS, i662, 0, i662, 0) | &&(=(matching1, 0), =(matching2, 0))
f1799_0_plus_Load(EOS, i653, i654, i653, i654) → f1801_0_plus_LE(EOS, i653, i654, i653, i654, i654)
f1803_0_plus_LE(EOS, i653, i656, i653, i656, i656) → f1806_0_plus_ConstantStackPush(EOS, i653, i656, i653, i656) | >(i656, 0)
f1806_0_plus_ConstantStackPush(EOS, i653, i656, i653, i656) → f1809_0_plus_Load(EOS, i653, i656, i653, i656, 1)
f1809_0_plus_Load(EOS, i653, i656, i653, i656, matching1) → f1812_0_plus_Load(EOS, i653, i656, i653, i656, 1, i653) | =(matching1, 1)
f1812_0_plus_Load(EOS, i653, i656, i653, i656, matching1, i653) → f1817_0_plus_ConstantStackPush(EOS, i653, i656, i653, i656, 1, i653, i656) | =(matching1, 1)
f1817_0_plus_ConstantStackPush(EOS, i653, i656, i653, i656, matching1, i653, i656) → f1823_0_plus_IntArithmetic(EOS, i653, i656, i653, i656, 1, i653, i656, 1) | =(matching1, 1)
f1823_0_plus_IntArithmetic(EOS, i653, i656, i653, i656, matching1, i653, i656, matching2) → f1827_0_plus_InvokeMethod(EOS, i653, i656, i653, i656, 1, i653, -(i656, 1)) | &&(&&(>(i656, 0), =(matching1, 1)), =(matching2, 1))
f1827_0_plus_InvokeMethod(EOS, i653, i656, i653, i656, matching1, i653, i661) → f1835_0_plus_Load(EOS, i653, i661, i653, i661) | =(matching1, 1)
f1827_0_plus_InvokeMethod(EOS, i653, i656, i653, i656, matching1, i653, i661) → f1835_1_plus_Load(EOS, i653, i656, i653, i656, 1, i653, i661, i653, i661) | =(matching1, 1)
f1835_0_plus_Load(EOS, i653, i661, i653, i661) → f1841_0_plus_Load(EOS, i653, i661, i653, i661)
f1841_0_plus_Load(EOS, i653, i661, i653, i661) → f1799_0_plus_Load(EOS, i653, i661, i653, i661)

Combined rules. Obtained 4 IRules

P rules:
f1801_0_plus_LE(EOS, x0, 0, x0, 0, 0) → f1861_1_plus_Load(EOS, x0, 0, 1, -(x0, 1), 0, -(x0, 1), 0) | >(x0, 0)
f1801_0_plus_LE(EOS, x0, 0, x0, 0, 0) → f1801_0_plus_LE(EOS, -(x0, 1), 0, -(x0, 1), 0, 0) | >(x0, 0)
f1801_0_plus_LE(EOS, x0, x1, x0, x1, x1) → f1835_1_plus_Load(EOS, x0, x1, x0, x1, 1, x0, -(x1, 1), x0, -(x1, 1)) | >(x1, 0)
f1801_0_plus_LE(EOS, x0, x1, x0, x1, x1) → f1801_0_plus_LE(EOS, x0, -(x1, 1), x0, -(x1, 1), -(x1, 1)) | >(x1, 0)

Filtered ground terms:


f1801_0_plus_LE(x1, x2, x3, x4, x5, x6) → f1801_0_plus_LE(x2, x3, x4, x5, x6)
Cond_f1801_0_plus_LE(x1, x2, x3, x4, x5, x6, x7) → Cond_f1801_0_plus_LE(x1, x3, x5)
f1861_1_plus_Load(x1, x2, x3, x4, x5, x6, x7, x8) → f1861_1_plus_Load(x2, x5, x7)
Cond_f1801_0_plus_LE1(x1, x2, x3, x4, x5, x6, x7) → Cond_f1801_0_plus_LE1(x1, x3, x5)
Cond_f1801_0_plus_LE2(x1, x2, x3, x4, x5, x6, x7) → Cond_f1801_0_plus_LE2(x1, x3, x4, x5, x6, x7)
f1835_1_plus_Load(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) → f1835_1_plus_Load(x2, x3, x4, x5, x7, x8, x9, x10)
Cond_f1801_0_plus_LE3(x1, x2, x3, x4, x5, x6, x7) → Cond_f1801_0_plus_LE3(x1, x3, x4, x5, x6, x7)

Filtered duplicate terms:


f1801_0_plus_LE(x1, x2, x3, x4, x5) → f1801_0_plus_LE(x3, x5)
Cond_f1801_0_plus_LE(x1, x2, x3) → Cond_f1801_0_plus_LE(x1, x3)
f1861_1_plus_Load(x1, x2, x3) → f1861_1_plus_Load(x3)
Cond_f1801_0_plus_LE1(x1, x2, x3) → Cond_f1801_0_plus_LE1(x1, x3)
Cond_f1801_0_plus_LE2(x1, x2, x3, x4, x5, x6) → Cond_f1801_0_plus_LE2(x1, x4, x6)
f1835_1_plus_Load(x1, x2, x3, x4, x5, x6, x7, x8) → f1835_1_plus_Load(x7, x8)
Cond_f1801_0_plus_LE3(x1, x2, x3, x4, x5, x6) → Cond_f1801_0_plus_LE3(x1, x4, x6)

Filtered unneeded terms:


Cond_f1801_0_plus_LE(x1, x2) → Cond_f1801_0_plus_LE(x1)
Cond_f1801_0_plus_LE2(x1, x2, x3) → Cond_f1801_0_plus_LE2(x1)

Prepared 4 rules for path length conversion:

P rules:
f1801_0_plus_LE(x0, 0) → f1861_1_plus_Load(-(x0, 1)) | >(x0, 0)
f1801_0_plus_LE(x0, 0) → f1801_0_plus_LE(-(x0, 1), 0) | >(x0, 0)
f1801_0_plus_LE(x0, x1) → f1835_1_plus_Load(x0, -(x1, 1)) | >(x1, 0)
f1801_0_plus_LE(x0, x1) → f1801_0_plus_LE(x0, -(x1, 1)) | >(x1, 0)

Finished conversion. Obtained 2 rules.

P rules:
f1801_0_plus_LE(x1, c0) → f1801_0_plus_LE(-(x1, 1), 0) | &&(>(x1, 0), =(0, c0))
f1801_0_plus_LE(x4, x5) → f1801_0_plus_LE(x4, -(x5, 1)) | >(x5, 0)

(7) Obligation:

Rules:
f1801_0_plus_LE(x1, c0) → f1801_0_plus_LE(-(x1, 1), 0) | &&(>(x1, 0), =(0, c0))
f1801_0_plus_LE(x4, x5) → f1801_0_plus_LE(x4, -(x5, 1)) | >(x5, 0)

(8) TerminationGraphProcessor (SOUND transformation)

Constructed the termination graph and obtained 2 non-trivial SCCs.


(9) Complex Obligation (AND)

(10) Obligation:

Rules:
f1801_0_plus_LE(x2, x3) → f1801_0_plus_LE(x2, -(x3, 1)) | >(x3, 0)

(11) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f1801_0_plus_LE(x3, x5)] = x5

Therefore the following rule(s) have been dropped:


f1801_0_plus_LE(x0, x1) → f1801_0_plus_LE(x0, -(x1, 1)) | >(x1, 0)

(12) YES

(13) Obligation:

Rules:
f1801_0_plus_LE(x0, x1) → f1801_0_plus_LE(-(x0, 1), 0) | &&(>(x0, 0), =(0, x1))

(14) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f1801_0_plus_LE(x3, x5)] = x3 + c6·x5

Therefore the following rule(s) have been dropped:


f1801_0_plus_LE(x0, x1) → f1801_0_plus_LE(-(x0, 1), 0) | &&(>(x0, 0), =(0, x1))

(15) YES

(16) Obligation:

SCC of termination graph based on JBC Program.
SCC contains nodes from the following methods: TimesPlusUserDef.times(II)I
SCC calls the following helper methods: TimesPlusUserDef.times(II)I, TimesPlusUserDef.plus(II)I
Performed SCC analyses:
  • Used field analysis yielded the following read fields:
  • Marker field analysis yielded the following relations that could be markers:

(17) SCCToIntTRSProof (SOUND transformation)

Transformed FIGraph SCCs to intTRSs. Log:

Generated rules. Obtained 13 IRules

P rules:
f286_0_times_NE(EOS, i18, i43, i18, i43, i43) → f290_0_times_NE(EOS, i18, i43, i18, i43, i43)
f290_0_times_NE(EOS, i18, i43, i18, i43, i43) → f295_0_times_Load(EOS, i18, i43, i18, i43) | >(i43, 0)
f295_0_times_Load(EOS, i18, i43, i18, i43) → f311_0_times_LE(EOS, i18, i43, i18, i43, i43)
f311_0_times_LE(EOS, i18, i43, i18, i43, i43) → f326_0_times_Load(EOS, i18, i43, i18, i43) | >(i43, 0)
f326_0_times_Load(EOS, i18, i43, i18, i43) → f342_0_times_Load(EOS, i18, i43, i18, i43, i18)
f342_0_times_Load(EOS, i18, i43, i18, i43, i18) → f398_0_times_ConstantStackPush(EOS, i18, i43, i18, i18, i43)
f398_0_times_ConstantStackPush(EOS, i18, i43, i18, i18, i43) → f405_0_times_IntArithmetic(EOS, i18, i43, i18, i18, i43, 1)
f405_0_times_IntArithmetic(EOS, i18, i43, i18, i18, i43, matching1) → f409_0_times_InvokeMethod(EOS, i18, i43, i18, i18, -(i43, 1)) | &&(>(i43, 0), =(matching1, 1))
f409_0_times_InvokeMethod(EOS, i18, i43, i18, i18, i60) → f417_0_times_Load(EOS, i18, i60, i18, i60)
f409_0_times_InvokeMethod(EOS, i18, i43, i18, i18, i60) → f417_1_times_Load(EOS, i18, i43, i18, i18, i60, i18, i60)
f417_0_times_Load(EOS, i18, i60, i18, i60) → f425_0_times_Load(EOS, i18, i60, i18, i60)
f425_0_times_Load(EOS, i18, i60, i18, i60) → f279_0_times_Load(EOS, i18, i60, i18, i60)
f279_0_times_Load(EOS, i18, i36, i18, i36) → f286_0_times_NE(EOS, i18, i36, i18, i36, i36)

Combined rules. Obtained 2 IRules

P rules:
f286_0_times_NE(EOS, x0, x1, x0, x1, x1) → f417_1_times_Load(EOS, x0, x1, x0, x0, -(x1, 1), x0, -(x1, 1)) | >(x1, 0)
f286_0_times_NE(EOS, x0, x1, x0, x1, x1) → f286_0_times_NE(EOS, x0, -(x1, 1), x0, -(x1, 1), -(x1, 1)) | >(x1, 0)

Filtered ground terms:


f286_0_times_NE(x1, x2, x3, x4, x5, x6) → f286_0_times_NE(x2, x3, x4, x5, x6)
Cond_f286_0_times_NE(x1, x2, x3, x4, x5, x6, x7) → Cond_f286_0_times_NE(x1, x3, x4, x5, x6, x7)
f417_1_times_Load(x1, x2, x3, x4, x5, x6, x7, x8) → f417_1_times_Load(x2, x3, x4, x5, x6, x7, x8)
Cond_f286_0_times_NE1(x1, x2, x3, x4, x5, x6, x7) → Cond_f286_0_times_NE1(x1, x3, x4, x5, x6, x7)

Filtered duplicate terms:


f286_0_times_NE(x1, x2, x3, x4, x5) → f286_0_times_NE(x3, x5)
Cond_f286_0_times_NE(x1, x2, x3, x4, x5, x6) → Cond_f286_0_times_NE(x1, x4, x6)
f417_1_times_Load(x1, x2, x3, x4, x5, x6, x7) → f417_1_times_Load(x6, x7)
Cond_f286_0_times_NE1(x1, x2, x3, x4, x5, x6) → Cond_f286_0_times_NE1(x1, x4, x6)

Filtered unneeded terms:


Cond_f286_0_times_NE(x1, x2, x3) → Cond_f286_0_times_NE(x1)
Cond_f286_0_times_NE1(x1, x2, x3) → Cond_f286_0_times_NE1(x1, x3)
f286_0_times_NE(x1, x2) → f286_0_times_NE(x2)

Prepared 2 rules for path length conversion:

P rules:
f286_0_times_NE(x1) → f417_1_times_Load(x0, -(x1, 1)) | >(x1, 0)
f286_0_times_NE(x1) → f286_0_times_NE(-(x1, 1)) | >(x1, 0)

Finished conversion. Obtained 1 rules.

P rules:
f286_0_times_NE(x2) → f286_0_times_NE(-(x2, 1)) | >(x2, 0)

(18) Obligation:

Rules:
f286_0_times_NE(x2) → f286_0_times_NE(-(x2, 1)) | >(x2, 0)

(19) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f286_0_times_NE(x2)] = x2

Therefore the following rule(s) have been dropped:


f286_0_times_NE(x0) → f286_0_times_NE(-(x0, 1)) | >(x0, 0)

(20) YES