NO ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: l6 0: l0 -> l1 : len^0'=len^post_1, tmp^0'=tmp^post_1, [ len^post_1==1+len^0 && tmp^0==tmp^post_1 ], cost: 1 7: l1 -> l3 : len^0'=len^post_8, tmp^0'=tmp^post_8, [ tmp^post_8==tmp^post_8 && len^0==len^post_8 ], cost: 1 1: l2 -> l0 : len^0'=len^post_2, tmp^0'=tmp^post_2, [ 5<=len^0 && len^0==len^post_2 && tmp^0==tmp^post_2 ], cost: 1 2: l2 -> l0 : len^0'=len^post_3, tmp^0'=tmp^post_3, [ 1+len^0<=4 && len^0==len^post_3 && tmp^0==tmp^post_3 ], cost: 1 3: l2 -> l0 : len^0'=len^post_4, tmp^0'=tmp^post_4, [ len^0<=4 && 4<=len^0 && len^post_4==0 && tmp^0==tmp^post_4 ], cost: 1 4: l3 -> l4 : len^0'=len^post_5, tmp^0'=tmp^post_5, [ tmp^0<=0 && 0<=tmp^0 && len^0==len^post_5 && tmp^0==tmp^post_5 ], cost: 1 5: l3 -> l2 : len^0'=len^post_6, tmp^0'=tmp^post_6, [ 1<=tmp^0 && len^0==len^post_6 && tmp^0==tmp^post_6 ], cost: 1 6: l3 -> l2 : len^0'=len^post_7, tmp^0'=tmp^post_7, [ 1+tmp^0<=0 && len^0==len^post_7 && tmp^0==tmp^post_7 ], cost: 1 8: l5 -> l1 : len^0'=len^post_9, tmp^0'=tmp^post_9, [ len^post_9==0 && tmp^0==tmp^post_9 ], cost: 1 9: l6 -> l5 : len^0'=len^post_10, tmp^0'=tmp^post_10, [ len^0==len^post_10 && tmp^0==tmp^post_10 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 9: l6 -> l5 : len^0'=len^post_10, tmp^0'=tmp^post_10, [ len^0==len^post_10 && tmp^0==tmp^post_10 ], cost: 1 Removed unreachable and leaf rules: Start location: l6 0: l0 -> l1 : len^0'=len^post_1, tmp^0'=tmp^post_1, [ len^post_1==1+len^0 && tmp^0==tmp^post_1 ], cost: 1 7: l1 -> l3 : len^0'=len^post_8, tmp^0'=tmp^post_8, [ tmp^post_8==tmp^post_8 && len^0==len^post_8 ], cost: 1 1: l2 -> l0 : len^0'=len^post_2, tmp^0'=tmp^post_2, [ 5<=len^0 && len^0==len^post_2 && tmp^0==tmp^post_2 ], cost: 1 2: l2 -> l0 : len^0'=len^post_3, tmp^0'=tmp^post_3, [ 1+len^0<=4 && len^0==len^post_3 && tmp^0==tmp^post_3 ], cost: 1 3: l2 -> l0 : len^0'=len^post_4, tmp^0'=tmp^post_4, [ len^0<=4 && 4<=len^0 && len^post_4==0 && tmp^0==tmp^post_4 ], cost: 1 5: l3 -> l2 : len^0'=len^post_6, tmp^0'=tmp^post_6, [ 1<=tmp^0 && len^0==len^post_6 && tmp^0==tmp^post_6 ], cost: 1 6: l3 -> l2 : len^0'=len^post_7, tmp^0'=tmp^post_7, [ 1+tmp^0<=0 && len^0==len^post_7 && tmp^0==tmp^post_7 ], cost: 1 8: l5 -> l1 : len^0'=len^post_9, tmp^0'=tmp^post_9, [ len^post_9==0 && tmp^0==tmp^post_9 ], cost: 1 9: l6 -> l5 : len^0'=len^post_10, tmp^0'=tmp^post_10, [ len^0==len^post_10 && tmp^0==tmp^post_10 ], cost: 1 Simplified all rules, resulting in: Start location: l6 0: l0 -> l1 : len^0'=1+len^0, [], cost: 1 7: l1 -> l3 : tmp^0'=tmp^post_8, [], cost: 1 1: l2 -> l0 : [ 5<=len^0 ], cost: 1 2: l2 -> l0 : [ 1+len^0<=4 ], cost: 1 3: l2 -> l0 : len^0'=0, [ -4+len^0==0 ], cost: 1 5: l3 -> l2 : [ 1<=tmp^0 ], cost: 1 6: l3 -> l2 : [ 1+tmp^0<=0 ], cost: 1 8: l5 -> l1 : len^0'=0, [], cost: 1 9: l6 -> l5 : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: l6 0: l0 -> l1 : len^0'=1+len^0, [], cost: 1 7: l1 -> l3 : tmp^0'=tmp^post_8, [], cost: 1 1: l2 -> l0 : [ 5<=len^0 ], cost: 1 2: l2 -> l0 : [ 1+len^0<=4 ], cost: 1 3: l2 -> l0 : len^0'=0, [ -4+len^0==0 ], cost: 1 5: l3 -> l2 : [ 1<=tmp^0 ], cost: 1 6: l3 -> l2 : [ 1+tmp^0<=0 ], cost: 1 10: l6 -> l1 : len^0'=0, [], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l6 11: l1 -> l2 : tmp^0'=tmp^post_8, [ 1<=tmp^post_8 ], cost: 2 12: l1 -> l2 : tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 ], cost: 2 13: l2 -> l1 : len^0'=1+len^0, [ 5<=len^0 ], cost: 2 14: l2 -> l1 : len^0'=1+len^0, [ 1+len^0<=4 ], cost: 2 15: l2 -> l1 : len^0'=1, [ -4+len^0==0 ], cost: 2 10: l6 -> l1 : len^0'=0, [], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l6 16: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && 5<=len^0 ], cost: 4 17: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && 1+len^0<=4 ], cost: 4 18: l1 -> l1 : len^0'=1, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && -4+len^0==0 ], cost: 4 19: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && 5<=len^0 ], cost: 4 20: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && 1+len^0<=4 ], cost: 4 21: l1 -> l1 : len^0'=1, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && -4+len^0==0 ], cost: 4 10: l6 -> l1 : len^0'=0, [], cost: 2 Accelerating simple loops of location 1. Accelerating the following rules: 16: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && 5<=len^0 ], cost: 4 17: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && 1+len^0<=4 ], cost: 4 18: l1 -> l1 : len^0'=1, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && -4+len^0==0 ], cost: 4 19: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && 5<=len^0 ], cost: 4 20: l1 -> l1 : len^0'=1+len^0, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && 1+len^0<=4 ], cost: 4 21: l1 -> l1 : len^0'=1, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && -4+len^0==0 ], cost: 4 Accelerated rule 16 with non-termination, yielding the new rule 22. Accelerated rule 17 with backward acceleration, yielding the new rule 23. Failed to prove monotonicity of the guard of rule 18. Accelerated rule 19 with non-termination, yielding the new rule 24. Accelerated rule 20 with backward acceleration, yielding the new rule 25. Failed to prove monotonicity of the guard of rule 21. [accelerate] Nesting with 4 inner and 4 outer candidates Nested simple loops 18 (outer loop) and 23 (inner loop) with Rule(1 | 1<=tmp^post_8, 4-len^0>=1, | NONTERM || 7 | ), resulting in the new rules: 26, 27. Nested simple loops 21 (outer loop) and 25 (inner loop) with Rule(1 | 1+tmp^post_8<=0, 4-len^0>=1, | NONTERM || 7 | ), resulting in the new rules: 28, 29. Removing the simple loops: 16 17 18 19 20 21. Accelerated all simple loops using metering functions (where possible): Start location: l6 22: l1 -> [7] : [ 1<=tmp^post_8 && 5<=len^0 ], cost: NONTERM 23: l1 -> l1 : len^0'=4, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 && 4-len^0>=1 ], cost: 16-4*len^0 24: l1 -> [7] : [ 1+tmp^post_8<=0 && 5<=len^0 ], cost: NONTERM 25: l1 -> l1 : len^0'=4, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 && 4-len^0>=1 ], cost: 16-4*len^0 26: l1 -> [7] : [ 1<=tmp^post_8 && 4-len^0>=1 ], cost: NONTERM 27: l1 -> [7] : [ 1<=tmp^post_8 && -4+len^0==0 ], cost: NONTERM 28: l1 -> [7] : [ 1+tmp^post_8<=0 && 4-len^0>=1 ], cost: NONTERM 29: l1 -> [7] : [ 1+tmp^post_8<=0 && -4+len^0==0 ], cost: NONTERM 10: l6 -> l1 : len^0'=0, [], cost: 2 Chained accelerated rules (with incoming rules): Start location: l6 10: l6 -> l1 : len^0'=0, [], cost: 2 30: l6 -> l1 : len^0'=4, tmp^0'=tmp^post_8, [ 1<=tmp^post_8 ], cost: 18 31: l6 -> l1 : len^0'=4, tmp^0'=tmp^post_8, [ 1+tmp^post_8<=0 ], cost: 18 32: l6 -> [7] : [], cost: NONTERM 33: l6 -> [7] : [], cost: NONTERM Removed unreachable locations (and leaf rules with constant cost): Start location: l6 32: l6 -> [7] : [], cost: NONTERM 33: l6 -> [7] : [], cost: NONTERM ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: l6 33: l6 -> [7] : [], cost: NONTERM Computing asymptotic complexity for rule 33 Guard is satisfiable, yielding nontermination Resulting cost NONTERM has complexity: Nonterm Found new complexity Nonterm. Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Nonterm Cpx degree: Nonterm Solved cost: NONTERM Rule cost: NONTERM Rule guard: [] NO