WORST_CASE(Omega(1),?) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: [0] 0: [0] -> [1] : [ n>=1 && d>=0 ], cost: 1 1: [1] -> [2] : [ d<2 ], cost: 1 2: [1] -> [3] : [ d>=2 ], cost: 1 3: [2] -> [4] : log'=0, firstMultiply'=d, [], cost: 1 4: [4] -> [5] : d'=firstMultiply*d, log'=1+log, [ d<=n ], cost: 1 6: [4] -> [3] : [ d>n ], cost: 1 5: [5] -> [4] : [ 0<=0 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 0: [0] -> [1] : [ n>=1 && d>=0 ], cost: 1 Removed unreachable and leaf rules: Start location: [0] 0: [0] -> [1] : [ n>=1 && d>=0 ], cost: 1 1: [1] -> [2] : [ d<2 ], cost: 1 3: [2] -> [4] : log'=0, firstMultiply'=d, [], cost: 1 4: [4] -> [5] : d'=firstMultiply*d, log'=1+log, [ d<=n ], cost: 1 5: [5] -> [4] : [ 0<=0 ], cost: 1 Simplified all rules, resulting in: Start location: [0] 0: [0] -> [1] : [ n>=1 && d>=0 ], cost: 1 1: [1] -> [2] : [ d<2 ], cost: 1 3: [2] -> [4] : log'=0, firstMultiply'=d, [], cost: 1 4: [4] -> [5] : d'=firstMultiply*d, log'=1+log, [ d<=n ], cost: 1 5: [5] -> [4] : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: [0] 8: [0] -> [4] : log'=0, firstMultiply'=d, [ n>=1 && d>=0 && d<2 ], cost: 3 9: [4] -> [4] : d'=firstMultiply*d, log'=1+log, [ d<=n ], cost: 2 Accelerating simple loops of location 4. Accelerating the following rules: 9: [4] -> [4] : d'=firstMultiply*d, log'=1+log, [ d<=n ], cost: 2 Accelerated rule 9 with non-termination, yielding the new rule 10. [accelerate] Nesting with 0 inner and 1 outer candidates Accelerated all simple loops using metering functions (where possible): Start location: [0] 8: [0] -> [4] : log'=0, firstMultiply'=d, [ n>=1 && d>=0 && d<2 ], cost: 3 9: [4] -> [4] : d'=firstMultiply*d, log'=1+log, [ d<=n ], cost: 2 10: [4] -> [6] : [ d<=n && n==0 && firstMultiply==-8 && d==0 ], cost: NONTERM Chained accelerated rules (with incoming rules): Start location: [0] 8: [0] -> [4] : log'=0, firstMultiply'=d, [ n>=1 && d>=0 && d<2 ], cost: 3 11: [0] -> [4] : d'=d^2, log'=1, firstMultiply'=d, [ n>=1 && d>=0 && d<2 && d<=n ], cost: 5 Removed unreachable locations (and leaf rules with constant cost): Start location: [0] ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: [0] Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Constant Cpx degree: 0 Solved cost: 1 Rule cost: 1 Rule guard: [ n>=1 && d>=0 ] WORST_CASE(Omega(1),?)