YES proof of /export/starexec/sandbox/benchmark/theBenchmark.c # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Termination of the given C Problem could be proven: (0) C Problem (1) CToIRSProof [EQUIVALENT, 68 ms] (2) IntTRS (3) TerminationGraphProcessor [SOUND, 116 ms] (4) IntTRS (5) IntTRSCompressionProof [EQUIVALENT, 0 ms] (6) IntTRS (7) PolynomialOrderProcessor [EQUIVALENT, 25 ms] (8) AND (9) IntTRS (10) IntTRSCompressionProof [EQUIVALENT, 0 ms] (11) IntTRS (12) RankingReductionPairProof [EQUIVALENT, 21 ms] (13) AND (14) IntTRS (15) TerminationGraphProcessor [EQUIVALENT, 13 ms] (16) AND (17) IntTRS (18) IntTRSCompressionProof [EQUIVALENT, 2 ms] (19) IntTRS (20) PolynomialOrderProcessor [EQUIVALENT, 2 ms] (21) YES (22) IntTRS (23) IntTRSCompressionProof [EQUIVALENT, 1 ms] (24) IntTRS (25) RankingReductionPairProof [EQUIVALENT, 0 ms] (26) YES (27) IntTRS (28) IntTRSCompressionProof [EQUIVALENT, 0 ms] (29) IntTRS (30) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (31) IntTRS (32) IntTRSCompressionProof [EQUIVALENT, 0 ms] (33) IntTRS (34) RankingReductionPairProof [EQUIVALENT, 0 ms] (35) YES (36) IntTRS (37) TerminationGraphProcessor [EQUIVALENT, 0 ms] (38) YES ---------------------------------------- (0) Obligation: c file /export/starexec/sandbox/benchmark/theBenchmark.c ---------------------------------------- (1) CToIRSProof (EQUIVALENT) Parsed C Integer Program as IRS. ---------------------------------------- (2) Obligation: Rules: f1(x, y, n, b) -> f2(x, y, x_1, b) :|: TRUE f2(x1, x2, x3, x4) -> f3(x1, x2, x3, x5) :|: TRUE f3(x6, x7, x8, x9) -> f4(x10, x7, x8, x9) :|: TRUE f4(x11, x12, x13, x14) -> f5(x11, x15, x13, x14) :|: TRUE f7(x16, x17, x18, x19) -> f10(x16, arith, x18, x19) :|: TRUE && arith = x17 + 1 f11(x20, x21, x22, x23) -> f14(x20, x21, x22, 1) :|: TRUE f10(x24, x25, x26, x27) -> f11(x24, x25, x26, x27) :|: x28 < 0 f10(x100, x101, x102, x103) -> f11(x100, x101, x102, x103) :|: x104 > 0 f10(x29, x30, x31, x32) -> f12(x29, x30, x31, x32) :|: x33 = 0 f14(x34, x35, x36, x37) -> f13(x34, x35, x36, x37) :|: TRUE f12(x38, x39, x40, x41) -> f13(x38, x39, x40, x41) :|: TRUE f8(x105, x106, x107, x108) -> f15(x105, x109, x107, x108) :|: TRUE && x109 = x106 - 1 f16(x110, x111, x112, x113) -> f19(x114, x111, x112, x113) :|: TRUE && x114 = x110 - 1 f19(x50, x51, x52, x53) -> f20(x50, x51, x52, 0) :|: TRUE f15(x54, x55, x56, x57) -> f16(x54, x55, x56, x57) :|: x58 < 0 f15(x115, x116, x117, x118) -> f16(x115, x116, x117, x118) :|: x119 > 0 f15(x59, x60, x61, x62) -> f17(x59, x60, x61, x62) :|: x63 = 0 f20(x64, x65, x66, x67) -> f18(x64, x65, x66, x67) :|: TRUE f17(x68, x69, x70, x71) -> f18(x68, x69, x70, x71) :|: TRUE f6(x72, x73, x74, x75) -> f7(x72, x73, x74, x75) :|: x75 = 0 f6(x76, x77, x78, x79) -> f8(x76, x77, x78, x79) :|: x79 < 0 f6(x120, x121, x122, x123) -> f8(x120, x121, x122, x123) :|: x123 > 0 f13(x80, x81, x82, x83) -> f9(x80, x81, x82, x83) :|: TRUE f18(x84, x85, x86, x87) -> f9(x84, x85, x86, x87) :|: TRUE f5(x88, x89, x90, x91) -> f6(x88, x89, x90, x91) :|: x88 >= 0 && 0 <= x89 && x89 <= x90 f9(x92, x93, x94, x95) -> f5(x92, x93, x94, x95) :|: TRUE f5(x96, x97, x98, x99) -> f21(x96, x97, x98, x99) :|: x97 > x98 f5(x124, x125, x126, x127) -> f21(x124, x125, x126, x127) :|: x124 < 0 f5(x128, x129, x130, x131) -> f21(x128, x129, x130, x131) :|: 0 > x129 Start term: f1(x, y, n, b) ---------------------------------------- (3) TerminationGraphProcessor (SOUND) Constructed the termination graph and obtained one non-trivial SCC. ---------------------------------------- (4) Obligation: Rules: f5(x88, x89, x90, x91) -> f6(x88, x89, x90, x91) :|: x88 >= 0 && 0 <= x89 && x89 <= x90 f9(x92, x93, x94, x95) -> f5(x92, x93, x94, x95) :|: TRUE f13(x80, x81, x82, x83) -> f9(x80, x81, x82, x83) :|: TRUE f14(x34, x35, x36, x37) -> f13(x34, x35, x36, x37) :|: TRUE f11(x20, x21, x22, x23) -> f14(x20, x21, x22, 1) :|: TRUE f10(x24, x25, x26, x27) -> f11(x24, x25, x26, x27) :|: x28 < 0 f7(x16, x17, x18, x19) -> f10(x16, arith, x18, x19) :|: TRUE && arith = x17 + 1 f6(x72, x73, x74, x75) -> f7(x72, x73, x74, x75) :|: x75 = 0 f10(x100, x101, x102, x103) -> f11(x100, x101, x102, x103) :|: x104 > 0 f12(x38, x39, x40, x41) -> f13(x38, x39, x40, x41) :|: TRUE f10(x29, x30, x31, x32) -> f12(x29, x30, x31, x32) :|: x33 = 0 f18(x84, x85, x86, x87) -> f9(x84, x85, x86, x87) :|: TRUE f20(x64, x65, x66, x67) -> f18(x64, x65, x66, x67) :|: TRUE f19(x50, x51, x52, x53) -> f20(x50, x51, x52, 0) :|: TRUE f16(x110, x111, x112, x113) -> f19(x114, x111, x112, x113) :|: TRUE && x114 = x110 - 1 f15(x54, x55, x56, x57) -> f16(x54, x55, x56, x57) :|: x58 < 0 f8(x105, x106, x107, x108) -> f15(x105, x109, x107, x108) :|: TRUE && x109 = x106 - 1 f6(x76, x77, x78, x79) -> f8(x76, x77, x78, x79) :|: x79 < 0 f6(x120, x121, x122, x123) -> f8(x120, x121, x122, x123) :|: x123 > 0 f15(x115, x116, x117, x118) -> f16(x115, x116, x117, x118) :|: x119 > 0 f17(x68, x69, x70, x71) -> f18(x68, x69, x70, x71) :|: TRUE f15(x59, x60, x61, x62) -> f17(x59, x60, x61, x62) :|: x63 = 0 ---------------------------------------- (5) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (6) Obligation: Rules: f9(x92:0, x93:0, x94:0, cons_0) -> f9(x92:0, x93:0 + 1, x94:0, 0) :|: x92:0 > -1 && x93:0 > -1 && x94:0 >= x93:0 && cons_0 = 0 f9(x, x1, x2, x3) -> f8(x, x1, x2, x3) :|: x2 >= x1 && x3 > 0 && x1 > -1 && x > -1 f9(x4, x5, x6, x7) -> f9(x4, x5 + 1, x6, 1) :|: x6 >= x5 && x8 > 0 && x5 > -1 && x4 > -1 && x7 = 0 f8(x105:0, x106:0, x107:0, x108:0) -> f9(x105:0, x106:0 - 1, x107:0, x108:0) :|: TRUE f8(x9, x10, x11, x12) -> f9(x9 - 1, x10 - 1, x11, 0) :|: x13 > 0 f9(x14, x15, x16, x17) -> f9(x14, x15 + 1, x16, 1) :|: x16 >= x15 && x18 < 0 && x15 > -1 && x14 > -1 && x17 = 0 f9(x19, x20, x21, x22) -> f8(x19, x20, x21, x22) :|: x21 >= x20 && x22 < 0 && x20 > -1 && x19 > -1 f8(x23, x24, x25, x26) -> f9(x23 - 1, x24 - 1, x25, 0) :|: x27 < 0 ---------------------------------------- (7) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f9(x, x1, x2, x3)] = x + x2 [f8(x4, x5, x6, x7)] = x4 + x6 The following rules are decreasing: f8(x9, x10, x11, x12) -> f9(x9 - 1, x10 - 1, x11, 0) :|: x13 > 0 f8(x23, x24, x25, x26) -> f9(x23 - 1, x24 - 1, x25, 0) :|: x27 < 0 The following rules are bounded: f9(x92:0, x93:0, x94:0, cons_0) -> f9(x92:0, x93:0 + 1, x94:0, 0) :|: x92:0 > -1 && x93:0 > -1 && x94:0 >= x93:0 && cons_0 = 0 f9(x, x1, x2, x3) -> f8(x, x1, x2, x3) :|: x2 >= x1 && x3 > 0 && x1 > -1 && x > -1 f9(x4, x5, x6, x7) -> f9(x4, x5 + 1, x6, 1) :|: x6 >= x5 && x8 > 0 && x5 > -1 && x4 > -1 && x7 = 0 f9(x14, x15, x16, x17) -> f9(x14, x15 + 1, x16, 1) :|: x16 >= x15 && x18 < 0 && x15 > -1 && x14 > -1 && x17 = 0 f9(x19, x20, x21, x22) -> f8(x19, x20, x21, x22) :|: x21 >= x20 && x22 < 0 && x20 > -1 && x19 > -1 ---------------------------------------- (8) Complex Obligation (AND) ---------------------------------------- (9) Obligation: Rules: f9(x92:0, x93:0, x94:0, cons_0) -> f9(x92:0, x93:0 + 1, x94:0, 0) :|: x92:0 > -1 && x93:0 > -1 && x94:0 >= x93:0 && cons_0 = 0 f9(x, x1, x2, x3) -> f8(x, x1, x2, x3) :|: x2 >= x1 && x3 > 0 && x1 > -1 && x > -1 f9(x4, x5, x6, x7) -> f9(x4, x5 + 1, x6, 1) :|: x6 >= x5 && x8 > 0 && x5 > -1 && x4 > -1 && x7 = 0 f8(x105:0, x106:0, x107:0, x108:0) -> f9(x105:0, x106:0 - 1, x107:0, x108:0) :|: TRUE f9(x14, x15, x16, x17) -> f9(x14, x15 + 1, x16, 1) :|: x16 >= x15 && x18 < 0 && x15 > -1 && x14 > -1 && x17 = 0 f9(x19, x20, x21, x22) -> f8(x19, x20, x21, x22) :|: x21 >= x20 && x22 < 0 && x20 > -1 && x19 > -1 ---------------------------------------- (10) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (11) Obligation: Rules: f9(x:0, x1:0, x2:0, x3:0) -> f9(x:0, x1:0 - 1, x2:0, x3:0) :|: x1:0 > -1 && x:0 > -1 && x3:0 > 0 && x2:0 >= x1:0 f9(x4:0, x5:0, x6:0, cons_0) -> f9(x4:0, x5:0 + 1, x6:0, 1) :|: x5:0 > -1 && x4:0 > -1 && x8:0 > 0 && x6:0 >= x5:0 && cons_0 = 0 f9(x, x1, x2, x3) -> f9(x, x1 + 1, x2, 0) :|: x > -1 && x1 > -1 && x2 >= x1 && x3 = 0 f9(x19:0, x20:0, x21:0, x22:0) -> f9(x19:0, x20:0 - 1, x21:0, x22:0) :|: x20:0 > -1 && x19:0 > -1 && x22:0 < 0 && x21:0 >= x20:0 f9(x4, x5, x6, x7) -> f9(x4, x5 + 1, x6, 1) :|: x5 > -1 && x4 > -1 && x8 < 0 && x6 >= x5 && x7 = 0 ---------------------------------------- (12) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f9 ] = -1*f9_4 The following rules are decreasing: f9(x4:0, x5:0, x6:0, cons_0) -> f9(x4:0, x5:0 + 1, x6:0, 1) :|: x5:0 > -1 && x4:0 > -1 && x8:0 > 0 && x6:0 >= x5:0 && cons_0 = 0 f9(x4, x5, x6, x7) -> f9(x4, x5 + 1, x6, 1) :|: x5 > -1 && x4 > -1 && x8 < 0 && x6 >= x5 && x7 = 0 The following rules are bounded: f9(x4:0, x5:0, x6:0, cons_0) -> f9(x4:0, x5:0 + 1, x6:0, 1) :|: x5:0 > -1 && x4:0 > -1 && x8:0 > 0 && x6:0 >= x5:0 && cons_0 = 0 f9(x, x1, x2, x3) -> f9(x, x1 + 1, x2, 0) :|: x > -1 && x1 > -1 && x2 >= x1 && x3 = 0 f9(x19:0, x20:0, x21:0, x22:0) -> f9(x19:0, x20:0 - 1, x21:0, x22:0) :|: x20:0 > -1 && x19:0 > -1 && x22:0 < 0 && x21:0 >= x20:0 ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Rules: f9(x:0, x1:0, x2:0, x3:0) -> f9(x:0, x1:0 - 1, x2:0, x3:0) :|: x1:0 > -1 && x:0 > -1 && x3:0 > 0 && x2:0 >= x1:0 f9(x, x1, x2, x3) -> f9(x, x1 + 1, x2, 0) :|: x > -1 && x1 > -1 && x2 >= x1 && x3 = 0 f9(x19:0, x20:0, x21:0, x22:0) -> f9(x19:0, x20:0 - 1, x21:0, x22:0) :|: x20:0 > -1 && x19:0 > -1 && x22:0 < 0 && x21:0 >= x20:0 ---------------------------------------- (15) TerminationGraphProcessor (EQUIVALENT) Constructed the termination graph and obtained 2 non-trivial SCCs. ---------------------------------------- (16) Complex Obligation (AND) ---------------------------------------- (17) Obligation: Rules: f9(x:0, x1:0, x2:0, x3:0) -> f9(x:0, x1:0 - 1, x2:0, x3:0) :|: x1:0 > -1 && x:0 > -1 && x3:0 > 0 && x2:0 >= x1:0 f9(x19:0, x20:0, x21:0, x22:0) -> f9(x19:0, x20:0 - 1, x21:0, x22:0) :|: x20:0 > -1 && x19:0 > -1 && x22:0 < 0 && x21:0 >= x20:0 ---------------------------------------- (18) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (19) Obligation: Rules: f9(x19:0:0, x20:0:0, x21:0:0, x22:0:0) -> f9(x19:0:0, x20:0:0 - 1, x21:0:0, x22:0:0) :|: x22:0:0 < 0 && x21:0:0 >= x20:0:0 && x19:0:0 > -1 && x20:0:0 > -1 f9(x:0:0, x1:0:0, x2:0:0, x3:0:0) -> f9(x:0:0, x1:0:0 - 1, x2:0:0, x3:0:0) :|: x3:0:0 > 0 && x2:0:0 >= x1:0:0 && x:0:0 > -1 && x1:0:0 > -1 ---------------------------------------- (20) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f9(x, x1, x2, x3)] = x1 The following rules are decreasing: f9(x19:0:0, x20:0:0, x21:0:0, x22:0:0) -> f9(x19:0:0, x20:0:0 - 1, x21:0:0, x22:0:0) :|: x22:0:0 < 0 && x21:0:0 >= x20:0:0 && x19:0:0 > -1 && x20:0:0 > -1 f9(x:0:0, x1:0:0, x2:0:0, x3:0:0) -> f9(x:0:0, x1:0:0 - 1, x2:0:0, x3:0:0) :|: x3:0:0 > 0 && x2:0:0 >= x1:0:0 && x:0:0 > -1 && x1:0:0 > -1 The following rules are bounded: f9(x19:0:0, x20:0:0, x21:0:0, x22:0:0) -> f9(x19:0:0, x20:0:0 - 1, x21:0:0, x22:0:0) :|: x22:0:0 < 0 && x21:0:0 >= x20:0:0 && x19:0:0 > -1 && x20:0:0 > -1 f9(x:0:0, x1:0:0, x2:0:0, x3:0:0) -> f9(x:0:0, x1:0:0 - 1, x2:0:0, x3:0:0) :|: x3:0:0 > 0 && x2:0:0 >= x1:0:0 && x:0:0 > -1 && x1:0:0 > -1 ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Rules: f9(x, x1, x2, x3) -> f9(x, x1 + 1, x2, 0) :|: x > -1 && x1 > -1 && x2 >= x1 && x3 = 0 ---------------------------------------- (23) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (24) Obligation: Rules: f9(x:0, x1:0, x2:0, cons_0) -> f9(x:0, x1:0 + 1, x2:0, 0) :|: x:0 > -1 && x1:0 > -1 && x2:0 >= x1:0 && cons_0 = 0 ---------------------------------------- (25) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f9 ] = -1*f9_2 + f9_3 The following rules are decreasing: f9(x:0, x1:0, x2:0, cons_0) -> f9(x:0, x1:0 + 1, x2:0, 0) :|: x:0 > -1 && x1:0 > -1 && x2:0 >= x1:0 && cons_0 = 0 The following rules are bounded: f9(x:0, x1:0, x2:0, cons_0) -> f9(x:0, x1:0 + 1, x2:0, 0) :|: x:0 > -1 && x1:0 > -1 && x2:0 >= x1:0 && cons_0 = 0 ---------------------------------------- (26) YES ---------------------------------------- (27) Obligation: Rules: f9(x:0, x1:0, x2:0, x3:0) -> f9(x:0, x1:0 - 1, x2:0, x3:0) :|: x1:0 > -1 && x:0 > -1 && x3:0 > 0 && x2:0 >= x1:0 f9(x4, x5, x6, x7) -> f9(x4, x5 + 1, x6, 1) :|: x5 > -1 && x4 > -1 && x8 < 0 && x6 >= x5 && x7 = 0 ---------------------------------------- (28) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (29) Obligation: Rules: f9(x4:0, x5:0, x6:0, cons_0) -> f9(x4:0, x5:0 + 1, x6:0, 1) :|: x8:0 < 0 && x6:0 >= x5:0 && x4:0 > -1 && x5:0 > -1 && cons_0 = 0 f9(x:0:0, x1:0:0, x2:0:0, x3:0:0) -> f9(x:0:0, x1:0:0 - 1, x2:0:0, x3:0:0) :|: x3:0:0 > 0 && x2:0:0 >= x1:0:0 && x:0:0 > -1 && x1:0:0 > -1 ---------------------------------------- (30) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f9(x, x1, x2, x3)] = -x3 The following rules are decreasing: f9(x4:0, x5:0, x6:0, cons_0) -> f9(x4:0, x5:0 + 1, x6:0, 1) :|: x8:0 < 0 && x6:0 >= x5:0 && x4:0 > -1 && x5:0 > -1 && cons_0 = 0 The following rules are bounded: f9(x4:0, x5:0, x6:0, cons_0) -> f9(x4:0, x5:0 + 1, x6:0, 1) :|: x8:0 < 0 && x6:0 >= x5:0 && x4:0 > -1 && x5:0 > -1 && cons_0 = 0 ---------------------------------------- (31) Obligation: Rules: f9(x:0:0, x1:0:0, x2:0:0, x3:0:0) -> f9(x:0:0, x1:0:0 - 1, x2:0:0, x3:0:0) :|: x3:0:0 > 0 && x2:0:0 >= x1:0:0 && x:0:0 > -1 && x1:0:0 > -1 ---------------------------------------- (32) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (33) Obligation: Rules: f9(x:0:0:0, x1:0:0:0, x2:0:0:0, x3:0:0:0) -> f9(x:0:0:0, x1:0:0:0 - 1, x2:0:0:0, x3:0:0:0) :|: x:0:0:0 > -1 && x1:0:0:0 > -1 && x2:0:0:0 >= x1:0:0:0 && x3:0:0:0 > 0 ---------------------------------------- (34) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f9 ] = f9_2 The following rules are decreasing: f9(x:0:0:0, x1:0:0:0, x2:0:0:0, x3:0:0:0) -> f9(x:0:0:0, x1:0:0:0 - 1, x2:0:0:0, x3:0:0:0) :|: x:0:0:0 > -1 && x1:0:0:0 > -1 && x2:0:0:0 >= x1:0:0:0 && x3:0:0:0 > 0 The following rules are bounded: f9(x:0:0:0, x1:0:0:0, x2:0:0:0, x3:0:0:0) -> f9(x:0:0:0, x1:0:0:0 - 1, x2:0:0:0, x3:0:0:0) :|: x:0:0:0 > -1 && x1:0:0:0 > -1 && x2:0:0:0 >= x1:0:0:0 && x3:0:0:0 > 0 ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Rules: f8(x105:0, x106:0, x107:0, x108:0) -> f9(x105:0, x106:0 - 1, x107:0, x108:0) :|: TRUE f8(x9, x10, x11, x12) -> f9(x9 - 1, x10 - 1, x11, 0) :|: x13 > 0 f8(x23, x24, x25, x26) -> f9(x23 - 1, x24 - 1, x25, 0) :|: x27 < 0 ---------------------------------------- (37) TerminationGraphProcessor (EQUIVALENT) Constructed the termination graph and obtained no non-trivial SCC(s). ---------------------------------------- (38) YES