WORST_CASE(INF,?) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: __init 0: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=arg1P_1, arg2'=arg2P_1, arg3'=arg3P_1, arg4'=arg4P_1, [ arg1>0 && arg2>-1 && arg2==arg1P_1 && arg2==arg2P_1 && arg2==arg3P_1 ], cost: 1 1: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1P_2, arg2'=arg2P_2, arg3'=arg3P_2, arg4'=arg4P_2, [ arg1>=arg2 && arg1>1 && arg2>4 && arg1==arg3 && -1+arg1==arg1P_2 && -1+arg2==arg2P_2 && -1+arg1==arg3P_2 ], cost: 1 2: f74_0_loop_aux_LE -> f135_0_loop_aux_InvokeMethod : arg1'=arg1P_3, arg2'=arg2P_3, arg3'=arg3P_3, arg4'=arg4P_3, [ arg11 && 1+arg1>=2*arg2 && arg1>0 && arg1==arg3 && arg1==arg1P_3 && arg2==arg2P_3 && 1+arg1==arg3P_3 && 1+arg2==arg4P_3 ], cost: 1 3: f74_0_loop_aux_LE -> f135_0_loop_aux_InvokeMethod : arg1'=arg1P_4, arg2'=arg2P_4, arg3'=arg3P_4, arg4'=arg4P_4, [ arg11 && 1+arg1<2*arg2 && arg1>0 && arg1==arg3 && arg1==arg1P_4 && arg2==arg2P_4 && 1+arg1==arg3P_4 && -1+arg2==arg4P_4 ], cost: 1 5: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1P_6, arg2'=arg2P_6, arg3'=arg3P_6, arg4'=arg4P_6, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2<=2 && arg2>-1 && arg1==arg3 && -1+arg1==arg1P_6 && 2+arg2==arg2P_6 && -1+arg1==arg3P_6 ], cost: 1 6: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1P_7, arg2'=arg2P_7, arg3'=arg3P_7, arg4'=arg4P_7, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2>2 && arg2>-1 && arg1==arg3 && arg1==arg1P_7 && 1+arg2==arg2P_7 && arg1==arg3P_7 ], cost: 1 4: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=arg1P_5, arg2'=arg2P_5, arg3'=arg3P_5, arg4'=arg4P_5, [ arg1>0 && arg2>1 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 && arg3==arg1P_5 && arg4==arg2P_5 && arg3==arg3P_5 ], cost: 1 7: __init -> f1_0_main_Load : arg1'=arg1P_8, arg2'=arg2P_8, arg3'=arg3P_8, arg4'=arg4P_8, [], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 7: __init -> f1_0_main_Load : arg1'=arg1P_8, arg2'=arg2P_8, arg3'=arg3P_8, arg4'=arg4P_8, [], cost: 1 Removed rules with unsatisfiable guard: Start location: __init 0: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=arg1P_1, arg2'=arg2P_1, arg3'=arg3P_1, arg4'=arg4P_1, [ arg1>0 && arg2>-1 && arg2==arg1P_1 && arg2==arg2P_1 && arg2==arg3P_1 ], cost: 1 1: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1P_2, arg2'=arg2P_2, arg3'=arg3P_2, arg4'=arg4P_2, [ arg1>=arg2 && arg1>1 && arg2>4 && arg1==arg3 && -1+arg1==arg1P_2 && -1+arg2==arg2P_2 && -1+arg1==arg3P_2 ], cost: 1 3: f74_0_loop_aux_LE -> f135_0_loop_aux_InvokeMethod : arg1'=arg1P_4, arg2'=arg2P_4, arg3'=arg3P_4, arg4'=arg4P_4, [ arg11 && 1+arg1<2*arg2 && arg1>0 && arg1==arg3 && arg1==arg1P_4 && arg2==arg2P_4 && 1+arg1==arg3P_4 && -1+arg2==arg4P_4 ], cost: 1 5: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1P_6, arg2'=arg2P_6, arg3'=arg3P_6, arg4'=arg4P_6, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2<=2 && arg2>-1 && arg1==arg3 && -1+arg1==arg1P_6 && 2+arg2==arg2P_6 && -1+arg1==arg3P_6 ], cost: 1 6: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1P_7, arg2'=arg2P_7, arg3'=arg3P_7, arg4'=arg4P_7, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2>2 && arg2>-1 && arg1==arg3 && arg1==arg1P_7 && 1+arg2==arg2P_7 && arg1==arg3P_7 ], cost: 1 4: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=arg1P_5, arg2'=arg2P_5, arg3'=arg3P_5, arg4'=arg4P_5, [ arg1>0 && arg2>1 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 && arg3==arg1P_5 && arg4==arg2P_5 && arg3==arg3P_5 ], cost: 1 7: __init -> f1_0_main_Load : arg1'=arg1P_8, arg2'=arg2P_8, arg3'=arg3P_8, arg4'=arg4P_8, [], cost: 1 Simplified all rules, resulting in: Start location: __init 0: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=arg2, arg3'=arg2, arg4'=arg4P_1, [ arg1>0 && arg2>-1 ], cost: 1 1: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=-1+arg1, arg2'=-1+arg2, arg3'=-1+arg1, arg4'=arg4P_2, [ arg1>=arg2 && arg1>1 && arg2>4 && arg1==arg3 ], cost: 1 3: f74_0_loop_aux_LE -> f135_0_loop_aux_InvokeMethod : arg3'=1+arg1, arg4'=-1+arg2, [ arg11 && arg1>0 && arg1==arg3 ], cost: 1 5: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=-1+arg1, arg2'=2+arg2, arg3'=-1+arg1, arg4'=arg4P_6, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2<=2 && arg2>-1 && arg1==arg3 ], cost: 1 6: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg2'=1+arg2, arg3'=arg1, arg4'=arg4P_7, [ arg2<5 && -2+arg1-arg2>2 && arg2>-1 && arg1==arg3 ], cost: 1 4: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=arg3, arg2'=arg4, arg4'=arg4P_5, [ arg1>0 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 ], cost: 1 7: __init -> f1_0_main_Load : arg1'=arg1P_8, arg2'=arg2P_8, arg3'=arg3P_8, arg4'=arg4P_8, [], cost: 1 ### Simplification by acceleration and chaining ### Accelerating simple loops of location 1. Accelerating the following rules: 1: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=-1+arg1, arg2'=-1+arg2, arg3'=-1+arg1, arg4'=arg4P_2, [ arg1>=arg2 && arg1>1 && arg2>4 && arg1==arg3 ], cost: 1 5: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=-1+arg1, arg2'=2+arg2, arg3'=-1+arg1, arg4'=arg4P_6, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2<=2 && arg2>-1 && arg1==arg3 ], cost: 1 6: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg2'=1+arg2, arg3'=arg1, arg4'=arg4P_7, [ arg2<5 && -2+arg1-arg2>2 && arg2>-1 && arg1==arg3 ], cost: 1 Accelerated rule 1 with metering function -4+arg2, yielding the new rule 8. Found no metering function for rule 5. Found no metering function for rule 6. Removing the simple loops: 1. Accelerated all simple loops using metering functions (where possible): Start location: __init 0: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=arg2, arg3'=arg2, arg4'=arg4P_1, [ arg1>0 && arg2>-1 ], cost: 1 3: f74_0_loop_aux_LE -> f135_0_loop_aux_InvokeMethod : arg3'=1+arg1, arg4'=-1+arg2, [ arg11 && arg1>0 && arg1==arg3 ], cost: 1 5: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=-1+arg1, arg2'=2+arg2, arg3'=-1+arg1, arg4'=arg4P_6, [ arg1>0 && arg1>=arg2 && arg2<5 && -2+arg1-arg2<=2 && arg2>-1 && arg1==arg3 ], cost: 1 6: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg2'=1+arg2, arg3'=arg1, arg4'=arg4P_7, [ arg2<5 && -2+arg1-arg2>2 && arg2>-1 && arg1==arg3 ], cost: 1 8: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=4+arg1-arg2, arg2'=4, arg3'=4+arg1-arg2, arg4'=arg4P_2, [ arg1>=arg2 && arg1>1 && arg2>4 && arg1==arg3 ], cost: -4+arg2 4: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=arg3, arg2'=arg4, arg4'=arg4P_5, [ arg1>0 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 ], cost: 1 7: __init -> f1_0_main_Load : arg1'=arg1P_8, arg2'=arg2P_8, arg3'=arg3P_8, arg4'=arg4P_8, [], cost: 1 Chained accelerated rules (with incoming rules): Start location: __init 0: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=arg2, arg3'=arg2, arg4'=arg4P_1, [ arg1>0 && arg2>-1 ], cost: 1 9: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=-1+arg2, arg2'=2+arg2, arg3'=-1+arg2, arg4'=arg4P_6, [ arg1>0 && arg2>0 && arg2<5 ], cost: 2 12: f1_0_main_Load -> f74_0_loop_aux_LE : arg1'=4, arg2'=4, arg3'=4, arg4'=arg4P_2, [ arg1>0 && arg2>4 ], cost: -3+arg2 3: f74_0_loop_aux_LE -> f135_0_loop_aux_InvokeMethod : arg3'=1+arg1, arg4'=-1+arg2, [ arg11 && arg1>0 && arg1==arg3 ], cost: 1 4: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=arg3, arg2'=arg4, arg4'=arg4P_5, [ arg1>0 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 ], cost: 1 10: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=-1+arg3, arg2'=2+arg4, arg3'=-1+arg3, arg4'=arg4P_6, [ arg1>0 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 && arg3>=arg4 && arg4<5 && -2+arg3-arg4<=2 ], cost: 2 11: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=arg3, arg2'=1+arg4, arg4'=arg4P_7, [ arg1>0 && arg3>1 && arg4>0 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 && arg4<5 && -2+arg3-arg4>2 ], cost: 2 13: f135_0_loop_aux_InvokeMethod -> f74_0_loop_aux_LE : arg1'=4+arg3-arg4, arg2'=4, arg3'=4+arg3-arg4, arg4'=arg4P_2, [ arg1>0 && arg3>1 && arg2>arg1 && arg2>=arg3 && arg1<=arg4 && arg3>=arg4 && arg4>4 ], cost: -3+arg4 7: __init -> f1_0_main_Load : arg1'=arg1P_8, arg2'=arg2P_8, arg3'=arg3P_8, arg4'=arg4P_8, [], cost: 1 Eliminated locations (on tree-shaped paths): Start location: __init 17: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=1+arg1, arg2'=-1+arg2, arg3'=1+arg1, arg4'=arg4P_5, [ arg11 && arg1>0 && arg1==arg3 ], cost: 2 18: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=arg1, arg2'=1+arg2, arg3'=arg1, arg4'=arg4P_6, [ arg11 && arg1>0 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2<5 ], cost: 3 19: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=6+arg1-arg2, arg2'=4, arg3'=6+arg1-arg2, arg4'=arg4P_2, [ arg10 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2>4 ], cost: -3+arg2 14: __init -> f74_0_loop_aux_LE : arg1'=arg2P_8, arg2'=arg2P_8, arg3'=arg2P_8, arg4'=arg4P_1, [ arg1P_8>0 && arg2P_8>-1 ], cost: 2 15: __init -> f74_0_loop_aux_LE : arg1'=-1+arg2P_8, arg2'=2+arg2P_8, arg3'=-1+arg2P_8, arg4'=arg4P_6, [ arg1P_8>0 && arg2P_8>0 && arg2P_8<5 ], cost: 3 16: __init -> f74_0_loop_aux_LE : arg1'=4, arg2'=4, arg3'=4, arg4'=arg4P_2, [ arg1P_8>0 && arg2P_8>4 ], cost: -2+arg2P_8 Accelerating simple loops of location 1. Simplified some of the simple loops (and removed duplicate rules). Accelerating the following rules: 17: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=1+arg1, arg2'=-1+arg2, arg3'=1+arg1, arg4'=arg4P_5, [ arg11 && arg1>0 && arg1==arg3 ], cost: 2 18: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg2'=1+arg2, arg3'=arg1, arg4'=arg4P_6, [ arg11 && arg1>0 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2<5 ], cost: 3 19: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=6+arg1-arg2, arg2'=4, arg3'=6+arg1-arg2, arg4'=arg4P_2, [ arg10 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2>4 ], cost: -3+arg2 Accelerated rule 17 with metering function meter_2 (where 2*meter_2==-arg1+arg2), yielding the new rule 20. Accelerated rule 18 with metering function meter_3 (where 2*meter_3==7+arg1-2*arg2), yielding the new rule 21. Accelerated rule 19 with NONTERM (after strengthening guard), yielding the new rule 22. Nested simple loops 18 (outer loop) and 20 (inner loop) with metering function meter_4 (where 2*meter_4==-meter_2-arg1+arg2), resulting in the new rules: 23. During metering: Instantiating temporary variables by {meter_3==1} Nested simple loops 17 (outer loop) and 21 (inner loop) with metering function meter_6 (where 2*meter_6==-12-2*arg1+2*meter_3+3*arg2), resulting in the new rules: 24. Removing the simple loops: 17 18. Accelerated all simple loops using metering functions (where possible): Start location: __init 19: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=6+arg1-arg2, arg2'=4, arg3'=6+arg1-arg2, arg4'=arg4P_2, [ arg10 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2>4 ], cost: -3+arg2 20: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=meter_2+arg1, arg2'=-meter_2+arg2, arg3'=meter_2+arg1, arg4'=arg4P_5, [ arg11 && arg1>0 && arg1==arg3 && 2*meter_2==-arg1+arg2 && meter_2>=1 ], cost: 2*meter_2 21: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg2'=meter_3+arg2, arg3'=arg1, arg4'=arg4P_6, [ arg11 && arg1>0 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2<5 && 2*meter_3==7+arg1-2*arg2 && meter_3>=1 ], cost: 3*meter_3 22: f74_0_loop_aux_LE -> [5] : [ arg1>0 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2>4 && 6+arg1-arg2<4 ], cost: NONTERM 23: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=meter_2*meter_4+arg1, arg2'=-meter_2*meter_4+meter_4+arg2, arg3'=meter_2*meter_4+arg1, arg4'=arg4P_5, [ arg11 && arg1>0 && arg1==arg3 && 1+arg1>=-1+arg2 && -1+arg2<5 && 2*meter_2==1-arg1+arg2 && meter_2>=1 && 2*meter_4==-meter_2-arg1+arg2 && meter_4>=1 ], cost: 2*meter_2*meter_4+3*meter_4 24: f74_0_loop_aux_LE -> f74_0_loop_aux_LE : arg1'=meter_6+arg1, arg2'=-meter_6+meter_6*meter_3+arg2, arg3'=meter_6+arg1, arg4'=arg4P_6, [ arg1>0 && arg1==arg3 && 1+arg1<-1+arg2 && -1+arg2>1 && 2+arg1>=-2+arg2 && -2+arg2<5 && 2*meter_3==10+arg1-2*arg2 && meter_3>=1 && 2*meter_6==-12-2*arg1+2*meter_3+3*arg2 && meter_6>=1 ], cost: 2*meter_6+3*meter_6*meter_3 14: __init -> f74_0_loop_aux_LE : arg1'=arg2P_8, arg2'=arg2P_8, arg3'=arg2P_8, arg4'=arg4P_1, [ arg1P_8>0 && arg2P_8>-1 ], cost: 2 15: __init -> f74_0_loop_aux_LE : arg1'=-1+arg2P_8, arg2'=2+arg2P_8, arg3'=-1+arg2P_8, arg4'=arg4P_6, [ arg1P_8>0 && arg2P_8>0 && arg2P_8<5 ], cost: 3 16: __init -> f74_0_loop_aux_LE : arg1'=4, arg2'=4, arg3'=4, arg4'=arg4P_2, [ arg1P_8>0 && arg2P_8>4 ], cost: -2+arg2P_8 Chained accelerated rules (with incoming rules): Start location: __init 14: __init -> f74_0_loop_aux_LE : arg1'=arg2P_8, arg2'=arg2P_8, arg3'=arg2P_8, arg4'=arg4P_1, [ arg1P_8>0 && arg2P_8>-1 ], cost: 2 15: __init -> f74_0_loop_aux_LE : arg1'=-1+arg2P_8, arg2'=2+arg2P_8, arg3'=-1+arg2P_8, arg4'=arg4P_6, [ arg1P_8>0 && arg2P_8>0 && arg2P_8<5 ], cost: 3 16: __init -> f74_0_loop_aux_LE : arg1'=4, arg2'=4, arg3'=4, arg4'=arg4P_2, [ arg1P_8>0 && arg2P_8>4 ], cost: -2+arg2P_8 Removed unreachable locations (and leaf rules with constant cost): Start location: __init 16: __init -> f74_0_loop_aux_LE : arg1'=4, arg2'=4, arg3'=4, arg4'=arg4P_2, [ arg1P_8>0 && arg2P_8>4 ], cost: -2+arg2P_8 ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: __init 16: __init -> f74_0_loop_aux_LE : arg1'=4, arg2'=4, arg3'=4, arg4'=arg4P_2, [ arg1P_8>0 && arg2P_8>4 ], cost: -2+arg2P_8 Computing asymptotic complexity for rule 16 Solved the limit problem by the following transformations: Created initial limit problem: -2+arg2P_8 (+), -4+arg2P_8 (+/+!), arg1P_8 (+/+!) [not solved] removing all constraints (solved by SMT) resulting limit problem: [solved] applying transformation rule (C) using substitution {arg1P_8==n,arg2P_8==n} resulting limit problem: [solved] Solution: arg1P_8 / n arg2P_8 / n Resulting cost -2+n has complexity: Unbounded Found new complexity Unbounded. Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Unbounded Cpx degree: Unbounded Solved cost: -2+n Rule cost: -2+arg2P_8 Rule guard: [ arg1P_8>0 && arg2P_8>4 ] WORST_CASE(INF,?)