WORST_CASE(INF,?) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: l4 0: l0 -> l1 : e^0'=e^post_1, n^0'=n^post_1, [ 1<=e^0 && n^0<=100 && n^post_1==11+n^0 && e^post_1==1+e^0 ], cost: 1 2: l0 -> l2 : e^0'=e^post_3, n^0'=n^post_3, [ 1<=e^0 && 101<=n^0 && n^post_3==-10+n^0 && e^post_3==-1+e^0 ], cost: 1 1: l1 -> l0 : e^0'=e^post_2, n^0'=n^post_2, [ e^0==e^post_2 && n^0==n^post_2 ], cost: 1 3: l2 -> l0 : e^0'=e^post_4, n^0'=n^post_4, [ e^0==e^post_4 && n^0==n^post_4 ], cost: 1 4: l3 -> l0 : e^0'=e^post_5, n^0'=n^post_5, [ n^post_5==n^post_5 && e^post_5==1 ], cost: 1 5: l4 -> l3 : e^0'=e^post_6, n^0'=n^post_6, [ e^0==e^post_6 && n^0==n^post_6 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 5: l4 -> l3 : e^0'=e^post_6, n^0'=n^post_6, [ e^0==e^post_6 && n^0==n^post_6 ], cost: 1 Simplified all rules, resulting in: Start location: l4 0: l0 -> l1 : e^0'=1+e^0, n^0'=11+n^0, [ 1<=e^0 && n^0<=100 ], cost: 1 2: l0 -> l2 : e^0'=-1+e^0, n^0'=-10+n^0, [ 1<=e^0 && 101<=n^0 ], cost: 1 1: l1 -> l0 : [], cost: 1 3: l2 -> l0 : [], cost: 1 4: l3 -> l0 : e^0'=1, n^0'=n^post_5, [], cost: 1 5: l4 -> l3 : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: l4 7: l0 -> l0 : e^0'=1+e^0, n^0'=11+n^0, [ 1<=e^0 && n^0<=100 ], cost: 2 8: l0 -> l0 : e^0'=-1+e^0, n^0'=-10+n^0, [ 1<=e^0 && 101<=n^0 ], cost: 2 6: l4 -> l0 : e^0'=1, n^0'=n^post_5, [], cost: 2 Accelerating simple loops of location 0. Accelerating the following rules: 7: l0 -> l0 : e^0'=1+e^0, n^0'=11+n^0, [ 1<=e^0 && n^0<=100 ], cost: 2 8: l0 -> l0 : e^0'=-1+e^0, n^0'=-10+n^0, [ 1<=e^0 && 101<=n^0 ], cost: 2 Accelerated rule 7 with metering function meter (where 11*meter==100-n^0), yielding the new rule 9. Accelerated rule 8 with metering function meter_1 (where 10*meter_1==-100+n^0) (after adding e^0>=n^0), yielding the new rule 10. During metering: Instantiating temporary variables by {meter_1==1} Nested simple loops 7 (outer loop) and 10 (inner loop) with metering function 89-n^0+10*meter_1, resulting in the new rules: 11. Removing the simple loops: 7. Accelerated all simple loops using metering functions (where possible): Start location: l4 8: l0 -> l0 : e^0'=-1+e^0, n^0'=-10+n^0, [ 1<=e^0 && 101<=n^0 ], cost: 2 9: l0 -> l0 : e^0'=e^0+meter, n^0'=11*meter+n^0, [ 1<=e^0 && n^0<=100 && 11*meter==100-n^0 && meter>=1 ], cost: 2*meter 10: l0 -> l0 : e^0'=e^0-meter_1, n^0'=n^0-10*meter_1, [ 1<=e^0 && 101<=n^0 && e^0>=n^0 && 10*meter_1==-100+n^0 && meter_1>=1 ], cost: 2*meter_1 11: l0 -> l0 : e^0'=89+(-89+n^0-10*meter_1)*meter_1+e^0-n^0+10*meter_1, n^0'=979+10*(-89+n^0-10*meter_1)*meter_1-10*n^0+110*meter_1, [ 1<=e^0 && n^0<=100 && 101<=11+n^0 && 1+e^0>=11+n^0 && 10*meter_1==-89+n^0 && meter_1>=1 && 89-n^0+10*meter_1>=1 ], cost: 178-2*(-89+n^0-10*meter_1)*meter_1-2*n^0+20*meter_1 6: l4 -> l0 : e^0'=1, n^0'=n^post_5, [], cost: 2 Chained accelerated rules (with incoming rules): Start location: l4 6: l4 -> l0 : e^0'=1, n^0'=n^post_5, [], cost: 2 12: l4 -> l0 : e^0'=0, n^0'=-10+n^post_5, [ 101<=n^post_5 ], cost: 4 13: l4 -> l0 : e^0'=1+meter, n^0'=100, [ 100-11*meter<=100 && meter>=1 ], cost: 2+2*meter Removed unreachable locations (and leaf rules with constant cost): Start location: l4 13: l4 -> l0 : e^0'=1+meter, n^0'=100, [ 100-11*meter<=100 && meter>=1 ], cost: 2+2*meter ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: l4 13: l4 -> l0 : e^0'=1+meter, n^0'=100, [ 100-11*meter<=100 && meter>=1 ], cost: 2+2*meter Computing asymptotic complexity for rule 13 Simplified the guard: 13: l4 -> l0 : e^0'=1+meter, n^0'=100, [ meter>=1 ], cost: 2+2*meter Solved the limit problem by the following transformations: Created initial limit problem: meter (+/+!), 2+2*meter (+) [not solved] removing all constraints (solved by SMT) resulting limit problem: [solved] applying transformation rule (C) using substitution {meter==n} resulting limit problem: [solved] Solution: meter / n Resulting cost 2+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+2*n Rule cost: 2+2*meter Rule guard: [ meter>=1 ] WORST_CASE(INF,?)