/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.jar /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.jar # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty termination of the given Bare JBC problem could be proven: (0) Bare JBC problem (1) BareJBCToJBCProof [EQUIVALENT, 97 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 709 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 0 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 137 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 41 ms] (12) IRSwT (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] (14) IRSwT (15) TempFilterProof [SOUND, 17 ms] (16) IntTRS (17) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (18) YES ---------------------------------------- (0) Obligation: need to prove termination of the following program: public class HanoiR { private void solve(int h, int from, int to, int support) { if (h < 1) return; else if (h == 1) { //System.out.println("from " + from + " to " + to + "\n"); } else { solve(h - 1, from, support, to); //System.out.println("from " + from + " to " + to + "\n"); solve(h - 1, support, to, from); } } public static void main(String[] args) { Random.args = args; new HanoiR().solve(Random.random(),1,2,3); } } public class Random { static String[] args; static int index = 0; public static int random() { if (index >= args.length) return 0; String string = args[index]; index++; return string.length(); } } ---------------------------------------- (1) BareJBCToJBCProof (EQUIVALENT) initialized classpath ---------------------------------------- (2) Obligation: need to prove termination of the following program: public class HanoiR { private void solve(int h, int from, int to, int support) { if (h < 1) return; else if (h == 1) { //System.out.println("from " + from + " to " + to + "\n"); } else { solve(h - 1, from, support, to); //System.out.println("from " + from + " to " + to + "\n"); solve(h - 1, support, to, from); } } public static void main(String[] args) { Random.args = args; new HanoiR().solve(Random.random(),1,2,3); } } public class Random { static String[] args; static int index = 0; public static int random() { if (index >= args.length) return 0; String string = args[index]; index++; return string.length(); } } ---------------------------------------- (3) JBCToGraph (EQUIVALENT) Constructed TerminationGraph. ---------------------------------------- (4) Obligation: Termination Graph based on JBC Program: HanoiR.main([Ljava/lang/String;)V: Graph of 139 nodes with 0 SCCs. HanoiR.solve(IIII)V: Graph of 43 nodes with 0 SCCs. ---------------------------------------- (5) TerminationGraphToSCCProof (SOUND) Splitted TerminationGraph to 1 SCCs. ---------------------------------------- (6) Obligation: SCC of termination graph based on JBC Program. SCC contains nodes from the following methods: HanoiR.solve(IIII)V SCC calls the following helper methods: HanoiR.solve(IIII)V Performed SCC analyses: *Used field analysis yielded the following read fields: *Marker field analysis yielded the following relations that could be markers: ---------------------------------------- (7) SCCToIRSProof (SOUND) Transformed FIGraph SCCs to intTRSs. Log: Generated rules. Obtained 36 IRulesP rules: f1101_0_solve_ConstantStackPush(EOS(STATIC_1101), i352, i352, i352) -> f1102_0_solve_GE(EOS(STATIC_1102), i352, i352, i352, 1) :|: TRUE f1102_0_solve_GE(EOS(STATIC_1102), i361, i361, i361, matching1) -> f1108_0_solve_GE(EOS(STATIC_1108), i361, i361, i361, 1) :|: TRUE && matching1 = 1 f1108_0_solve_GE(EOS(STATIC_1108), i361, i361, i361, matching1) -> f1110_0_solve_Load(EOS(STATIC_1110), i361, i361) :|: i361 >= 1 && matching1 = 1 f1110_0_solve_Load(EOS(STATIC_1110), i361, i361) -> f1112_0_solve_ConstantStackPush(EOS(STATIC_1112), i361, i361, i361) :|: TRUE f1112_0_solve_ConstantStackPush(EOS(STATIC_1112), i361, i361, i361) -> f1118_0_solve_NE(EOS(STATIC_1118), i361, i361, i361, 1) :|: TRUE f1118_0_solve_NE(EOS(STATIC_1118), i385, i385, i385, matching1) -> f1131_0_solve_NE(EOS(STATIC_1131), i385, i385, i385, 1) :|: TRUE && matching1 = 1 f1131_0_solve_NE(EOS(STATIC_1131), i385, i385, i385, matching1) -> f1135_0_solve_Load(EOS(STATIC_1135), i385, i385) :|: i385 > 1 && matching1 = 1 f1135_0_solve_Load(EOS(STATIC_1135), i385, i385) -> f1137_0_solve_Load(EOS(STATIC_1137), i385, i385) :|: TRUE f1137_0_solve_Load(EOS(STATIC_1137), i385, i385) -> f1139_0_solve_ConstantStackPush(EOS(STATIC_1139), i385, i385, i385) :|: TRUE f1139_0_solve_ConstantStackPush(EOS(STATIC_1139), i385, i385, i385) -> f1145_0_solve_IntArithmetic(EOS(STATIC_1145), i385, i385, i385, 1) :|: TRUE f1145_0_solve_IntArithmetic(EOS(STATIC_1145), i385, i385, i385, matching1) -> f1148_0_solve_Load(EOS(STATIC_1148), i385, i385, i385 - 1) :|: i385 > 0 && matching1 = 1 f1148_0_solve_Load(EOS(STATIC_1148), i385, i385, i399) -> f1149_0_solve_Load(EOS(STATIC_1149), i385, i385, i399) :|: TRUE f1149_0_solve_Load(EOS(STATIC_1149), i385, i385, i399) -> f1151_0_solve_Load(EOS(STATIC_1151), i385, i385, i399) :|: TRUE f1151_0_solve_Load(EOS(STATIC_1151), i385, i385, i399) -> f1153_0_solve_InvokeMethod(EOS(STATIC_1153), i385, i385, i399) :|: TRUE f1153_0_solve_InvokeMethod(EOS(STATIC_1153), i385, i385, i399) -> f1155_0_solve_Load(EOS(STATIC_1155), i399, i399) :|: i385 > 1 && i399 >= 1 && i399 < i385 f1153_0_solve_InvokeMethod(EOS(STATIC_1153), i385, i385, i399) -> f1155_1_solve_Load(EOS(STATIC_1155), i385, i385, i399) :|: i385 > 1 && i399 >= 1 && i399 < i385 f1155_0_solve_Load(EOS(STATIC_1155), i399, i399) -> f1157_0_solve_Load(EOS(STATIC_1157), i399, i399) :|: TRUE f1157_0_solve_Load(EOS(STATIC_1157), i399, i399) -> f1163_0_solve_Load(EOS(STATIC_1163), i399, i399) :|: TRUE f1163_0_solve_Load(EOS(STATIC_1163), i399, i399) -> f1100_0_solve_Load(EOS(STATIC_1100), i399, i399) :|: TRUE f1100_0_solve_Load(EOS(STATIC_1100), i352, i352) -> f1101_0_solve_ConstantStackPush(EOS(STATIC_1101), i352, i352, i352) :|: TRUE f1505_0_solve_Return(EOS(STATIC_1505), i385, i385) -> f1506_0_solve_Load(EOS(STATIC_1506), i385, i385) :|: TRUE f1506_0_solve_Load(EOS(STATIC_1506), i385, i385) -> f1507_0_solve_Load(EOS(STATIC_1507), i385, i385) :|: TRUE f1507_0_solve_Load(EOS(STATIC_1507), i385, i385) -> f1508_0_solve_ConstantStackPush(EOS(STATIC_1508), i385, i385) :|: TRUE f1508_0_solve_ConstantStackPush(EOS(STATIC_1508), i385, i385) -> f1509_0_solve_IntArithmetic(EOS(STATIC_1509), i385, i385, 1) :|: TRUE f1509_0_solve_IntArithmetic(EOS(STATIC_1509), i385, i385, matching1) -> f1510_0_solve_Load(EOS(STATIC_1510), i385, i385 - 1) :|: i385 > 0 && matching1 = 1 f1510_0_solve_Load(EOS(STATIC_1510), i385, i483) -> f1511_0_solve_Load(EOS(STATIC_1511), i385, i483) :|: TRUE f1511_0_solve_Load(EOS(STATIC_1511), i385, i483) -> f1512_0_solve_Load(EOS(STATIC_1512), i385, i483) :|: TRUE f1512_0_solve_Load(EOS(STATIC_1512), i385, i483) -> f1513_0_solve_InvokeMethod(EOS(STATIC_1513), i385, i483) :|: TRUE f1513_0_solve_InvokeMethod(EOS(STATIC_1513), i385, i483) -> f1514_0_solve_Load(EOS(STATIC_1514), i483, i483) :|: i385 > 1 && i483 >= 1 && i483 < i385 f1513_0_solve_InvokeMethod(EOS(STATIC_1513), i385, i483) -> f1514_1_solve_Load(EOS(STATIC_1514), i385, i483) :|: i385 > 1 && i483 >= 1 && i483 < i385 f1514_0_solve_Load(EOS(STATIC_1514), i483, i483) -> f1515_0_solve_Load(EOS(STATIC_1515), i483, i483) :|: TRUE f1515_0_solve_Load(EOS(STATIC_1515), i483, i483) -> f1519_0_solve_Load(EOS(STATIC_1519), i483, i483) :|: TRUE f1519_0_solve_Load(EOS(STATIC_1519), i483, i483) -> f1100_0_solve_Load(EOS(STATIC_1100), i483, i483) :|: TRUE f1901_0_solve_Return(EOS(STATIC_1901), i385, i385) -> f1505_0_solve_Return(EOS(STATIC_1505), i385, i385) :|: TRUE f1155_1_solve_Load(EOS(STATIC_1155), i385, i385, i399) -> f1505_0_solve_Return(EOS(STATIC_1505), i385, i385) :|: TRUE f1155_1_solve_Load(EOS(STATIC_1155), i385, i385, i399) -> f1901_0_solve_Return(EOS(STATIC_1901), i385, i385) :|: TRUE Combined rules. Obtained 4 IRulesP rules: f1101_0_solve_ConstantStackPush(EOS(STATIC_1101), i352:0, i352:0, i352:0) -> f1505_0_solve_Return(EOS(STATIC_1505), i352:0, i352:0) :|: i352:0 > 1 && i352:0 - 1 < i352:0 f1101_0_solve_ConstantStackPush(EOS(STATIC_1101), i352:0, i352:0, i352:0) -> f1101_0_solve_ConstantStackPush(EOS(STATIC_1101), i352:0 - 1, i352:0 - 1, i352:0 - 1) :|: i352:0 > 1 && i352:0 - 1 < i352:0 f1505_0_solve_Return(EOS(STATIC_1505), i385:0, i385:0) -> f1101_0_solve_ConstantStackPush(EOS(STATIC_1101), i385:0 - 1, i385:0 - 1, i385:0 - 1) :|: i385:0 > 1 && i385:0 - 1 < i385:0 Removed following non-SCC rules: f1505_0_solve_Return(EOS(STATIC_1505), i385:0, i385:0) -> f1514_1_solve_Load(EOS(STATIC_1514), i385:0, i385:0 - 1) :|: i385:0 > 1 && i385:0 - 1 < i385:0 Filtered constant ground arguments: f1101_0_solve_ConstantStackPush(x1, x2, x3, x4) -> f1101_0_solve_ConstantStackPush(x2, x3, x4) f1505_0_solve_Return(x1, x2, x3) -> f1505_0_solve_Return(x2, x3) Filtered duplicate arguments: f1101_0_solve_ConstantStackPush(x1, x2, x3) -> f1101_0_solve_ConstantStackPush(x3) f1505_0_solve_Return(x1, x2) -> f1505_0_solve_Return(x2) Finished conversion. Obtained 3 rules.P rules: f1101_0_solve_ConstantStackPush(i352:0) -> f1505_0_solve_Return(i352:0) :|: i352:0 > 1 && i352:0 - 1 < i352:0 f1101_0_solve_ConstantStackPush(i352:0) -> f1101_0_solve_ConstantStackPush(i352:0 - 1) :|: i352:0 > 1 && i352:0 - 1 < i352:0 f1505_0_solve_Return(i385:0) -> f1101_0_solve_ConstantStackPush(i385:0 - 1) :|: i385:0 > 1 && i385:0 - 1 < i385:0 ---------------------------------------- (8) Obligation: Rules: f1101_0_solve_ConstantStackPush(i352:0) -> f1505_0_solve_Return(i352:0) :|: i352:0 > 1 && i352:0 - 1 < i352:0 f1101_0_solve_ConstantStackPush(x) -> f1101_0_solve_ConstantStackPush(x - 1) :|: x > 1 && x - 1 < x f1505_0_solve_Return(i385:0) -> f1101_0_solve_ConstantStackPush(i385:0 - 1) :|: i385:0 > 1 && i385:0 - 1 < i385:0 ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f1101_0_solve_ConstantStackPush(i352:0) -> f1505_0_solve_Return(i352:0) :|: i352:0 > 1 && i352:0 - 1 < i352:0 f1101_0_solve_ConstantStackPush(x) -> f1101_0_solve_ConstantStackPush(arith) :|: x > 1 && x - 1 < x && arith = x - 1 f1505_0_solve_Return(x1) -> f1101_0_solve_ConstantStackPush(x2) :|: x1 > 1 && x1 - 1 < x1 && x2 = x1 - 1 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f1101_0_solve_ConstantStackPush(i352:0) -> f1505_0_solve_Return(i352:0) :|: i352:0 > 1 && i352:0 - 1 < i352:0 (2) f1101_0_solve_ConstantStackPush(x) -> f1101_0_solve_ConstantStackPush(arith) :|: x > 1 && x - 1 < x && arith = x - 1 (3) f1505_0_solve_Return(x1) -> f1101_0_solve_ConstantStackPush(x2) :|: x1 > 1 && x1 - 1 < x1 && x2 = x1 - 1 Arcs: (1) -> (3) (2) -> (1), (2) (3) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (12) Obligation: Termination digraph: Nodes: (1) f1101_0_solve_ConstantStackPush(i352:0) -> f1505_0_solve_Return(i352:0) :|: i352:0 > 1 && i352:0 - 1 < i352:0 (2) f1101_0_solve_ConstantStackPush(x) -> f1101_0_solve_ConstantStackPush(arith) :|: x > 1 && x - 1 < x && arith = x - 1 (3) f1505_0_solve_Return(x1) -> f1101_0_solve_ConstantStackPush(x2) :|: x1 > 1 && x1 - 1 < x1 && x2 = x1 - 1 Arcs: (1) -> (3) (2) -> (1), (2) (3) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (13) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (14) Obligation: Rules: f1101_0_solve_ConstantStackPush(i352:0:0) -> f1101_0_solve_ConstantStackPush(i352:0:0 - 1) :|: i352:0:0 - 1 < i352:0:0 && i352:0:0 > 1 f1101_0_solve_ConstantStackPush(x:0) -> f1101_0_solve_ConstantStackPush(x:0 - 1) :|: x:0 > 1 && x:0 - 1 < x:0 ---------------------------------------- (15) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f1101_0_solve_ConstantStackPush(INTEGER) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (16) Obligation: Rules: f1101_0_solve_ConstantStackPush(i352:0:0) -> f1101_0_solve_ConstantStackPush(c) :|: c = i352:0:0 - 1 && (i352:0:0 - 1 < i352:0:0 && i352:0:0 > 1) f1101_0_solve_ConstantStackPush(x:0) -> f1101_0_solve_ConstantStackPush(c1) :|: c1 = x:0 - 1 && (x:0 > 1 && x:0 - 1 < x:0) ---------------------------------------- (17) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f1101_0_solve_ConstantStackPush(x)] = x The following rules are decreasing: f1101_0_solve_ConstantStackPush(i352:0:0) -> f1101_0_solve_ConstantStackPush(c) :|: c = i352:0:0 - 1 && (i352:0:0 - 1 < i352:0:0 && i352:0:0 > 1) f1101_0_solve_ConstantStackPush(x:0) -> f1101_0_solve_ConstantStackPush(c1) :|: c1 = x:0 - 1 && (x:0 > 1 && x:0 - 1 < x:0) The following rules are bounded: f1101_0_solve_ConstantStackPush(i352:0:0) -> f1101_0_solve_ConstantStackPush(c) :|: c = i352:0:0 - 1 && (i352:0:0 - 1 < i352:0:0 && i352:0:0 > 1) f1101_0_solve_ConstantStackPush(x:0) -> f1101_0_solve_ConstantStackPush(c1) :|: c1 = x:0 - 1 && (x:0 > 1 && x:0 - 1 < x:0) ---------------------------------------- (18) YES