WORST_CASE(Omega(1),?) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: l5 0: l0 -> l1 : op1^0'=op1^post_1, op2^0'=op2^post_1, [ op2^0<=0 && 0<=op2^0 && 0<=op1^0 && op1^0==op1^post_1 && op2^0==op2^post_1 ], cost: 1 6: l1 -> l4 : op1^0'=op1^post_7, op2^0'=op2^post_7, [ 1<=op1^0 && op1^post_7==-1+op1^0 && op2^post_7==1+op2^0 ], cost: 1 1: l2 -> l3 : op1^0'=op1^post_2, op2^0'=op2^post_2, [ 1<=op2^0 && op1^post_2==1+op1^0 && op2^post_2==-1+op2^0 ], cost: 1 3: l2 -> l4 : op1^0'=op1^post_4, op2^0'=op2^post_4, [ 1<=op1^0 && op1^post_4==-1+op1^0 && op2^post_4==1+op2^0 ], cost: 1 2: l3 -> l2 : op1^0'=op1^post_3, op2^0'=op2^post_3, [ op1^0==op1^post_3 && op2^0==op2^post_3 ], cost: 1 4: l4 -> l2 : op1^0'=op1^post_5, op2^0'=op2^post_5, [ 1<=op2^0 && op2^post_5==-1+op2^0 && op1^0==op1^post_5 ], cost: 1 5: l4 -> l1 : op1^0'=op1^post_6, op2^0'=op2^post_6, [ op1^0==op1^post_6 && op2^0==op2^post_6 ], cost: 1 7: l5 -> l0 : op1^0'=op1^post_8, op2^0'=op2^post_8, [ op1^0==op1^post_8 && op2^0==op2^post_8 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 7: l5 -> l0 : op1^0'=op1^post_8, op2^0'=op2^post_8, [ op1^0==op1^post_8 && op2^0==op2^post_8 ], cost: 1 Simplified all rules, resulting in: Start location: l5 0: l0 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 1 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 1: l2 -> l3 : op1^0'=1+op1^0, op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 1 3: l2 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 2: l3 -> l2 : [], cost: 1 4: l4 -> l2 : op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 1 5: l4 -> l1 : [], cost: 1 7: l5 -> l0 : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: l5 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 3: l2 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 9: l2 -> l2 : op1^0'=1+op1^0, op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 2 4: l4 -> l2 : op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 1 5: l4 -> l1 : [], cost: 1 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Accelerating simple loops of location 2. Accelerating the following rules: 9: l2 -> l2 : op1^0'=1+op1^0, op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 2 Accelerated rule 9 with backward acceleration, yielding the new rule 10. [accelerate] Nesting with 1 inner and 1 outer candidates Removing the simple loops: 9. Accelerated all simple loops using metering functions (where possible): Start location: l5 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 3: l2 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 10: l2 -> l2 : op1^0'=op2^0+op1^0, op2^0'=0, [ op2^0>=0 ], cost: 2*op2^0 4: l4 -> l2 : op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 1 5: l4 -> l1 : [], cost: 1 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Chained accelerated rules (with incoming rules): Start location: l5 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 3: l2 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 4: l4 -> l2 : op2^0'=-1+op2^0, [ 1<=op2^0 ], cost: 1 5: l4 -> l1 : [], cost: 1 11: l4 -> l2 : op1^0'=-1+op2^0+op1^0, op2^0'=0, [ 1<=op2^0 ], cost: -1+2*op2^0 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l5 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 5: l4 -> l1 : [], cost: 1 12: l4 -> l4 : op1^0'=-1+op1^0, op2^0'=op2^0, [ 1<=op2^0 && 1<=op1^0 ], cost: 2 13: l4 -> l4 : op1^0'=-2+op2^0+op1^0, op2^0'=1, [ 1<=op2^0 && 1<=-1+op2^0+op1^0 ], cost: 2*op2^0 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Accelerating simple loops of location 4. Simplified some of the simple loops (and removed duplicate rules). Accelerating the following rules: 12: l4 -> l4 : op1^0'=-1+op1^0, [ 1<=op2^0 && 1<=op1^0 ], cost: 2 13: l4 -> l4 : op1^0'=-2+op2^0+op1^0, op2^0'=1, [ 1<=op2^0 && 1<=-1+op2^0+op1^0 ], cost: 2*op2^0 Accelerated rule 12 with backward acceleration, yielding the new rule 14. Accelerated rule 13 with backward acceleration, yielding the new rule 15. [accelerate] Nesting with 2 inner and 2 outer candidates Removing the simple loops: 12 13. Accelerated all simple loops using metering functions (where possible): Start location: l5 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 5: l4 -> l1 : [], cost: 1 14: l4 -> l4 : op1^0'=0, [ 1<=op2^0 && op1^0>=0 ], cost: 2*op1^0 15: l4 -> l4 : op1^0'=0, op2^0'=1, [ 1<=op2^0 && op1^0>=1 ], cost: 2*op1^0 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Chained accelerated rules (with incoming rules): Start location: l5 6: l1 -> l4 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 1 16: l1 -> l4 : op1^0'=0, op2^0'=1+op2^0, [ 1<=op1^0 && 1<=1+op2^0 ], cost: -1+2*op1^0 17: l1 -> l4 : op1^0'=0, op2^0'=1, [ 1<=1+op2^0 && -1+op1^0>=1 ], cost: -1+2*op1^0 5: l4 -> l1 : [], cost: 1 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l5 18: l1 -> l1 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 2 19: l1 -> l1 : op1^0'=0, op2^0'=1+op2^0, [ 1<=op1^0 && 1<=1+op2^0 ], cost: 2*op1^0 20: l1 -> l1 : op1^0'=0, op2^0'=1, [ 1<=1+op2^0 && -1+op1^0>=1 ], cost: 2*op1^0 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Accelerating simple loops of location 1. Accelerating the following rules: 18: l1 -> l1 : op1^0'=-1+op1^0, op2^0'=1+op2^0, [ 1<=op1^0 ], cost: 2 19: l1 -> l1 : op1^0'=0, op2^0'=1+op2^0, [ 1<=op1^0 && 1<=1+op2^0 ], cost: 2*op1^0 20: l1 -> l1 : op1^0'=0, op2^0'=1, [ 1<=1+op2^0 && -1+op1^0>=1 ], cost: 2*op1^0 Accelerated rule 18 with backward acceleration, yielding the new rule 21. Failed to prove monotonicity of the guard of rule 19. Failed to prove monotonicity of the guard of rule 20. [accelerate] Nesting with 3 inner and 3 outer candidates Removing the simple loops: 18. Accelerated all simple loops using metering functions (where possible): Start location: l5 19: l1 -> l1 : op1^0'=0, op2^0'=1+op2^0, [ 1<=op1^0 && 1<=1+op2^0 ], cost: 2*op1^0 20: l1 -> l1 : op1^0'=0, op2^0'=1, [ 1<=1+op2^0 && -1+op1^0>=1 ], cost: 2*op1^0 21: l1 -> l1 : op1^0'=0, op2^0'=op2^0+op1^0, [ op1^0>=0 ], cost: 2*op1^0 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 Chained accelerated rules (with incoming rules): Start location: l5 8: l5 -> l1 : [ op2^0==0 && 0<=op1^0 ], cost: 2 22: l5 -> l1 : op1^0'=0, op2^0'=1+op2^0, [ op2^0==0 && 1<=op1^0 ], cost: 2+2*op1^0 23: l5 -> l1 : op1^0'=0, op2^0'=1, [ op2^0==0 && -1+op1^0>=1 ], cost: 2+2*op1^0 24: l5 -> l1 : op1^0'=0, op2^0'=op2^0+op1^0, [ op2^0==0 && 0<=op1^0 ], cost: 2+2*op1^0 Removed unreachable locations (and leaf rules with constant cost): Start location: l5 22: l5 -> l1 : op1^0'=0, op2^0'=1+op2^0, [ op2^0==0 && 1<=op1^0 ], cost: 2+2*op1^0 23: l5 -> l1 : op1^0'=0, op2^0'=1, [ op2^0==0 && -1+op1^0>=1 ], cost: 2+2*op1^0 24: l5 -> l1 : op1^0'=0, op2^0'=op2^0+op1^0, [ op2^0==0 && 0<=op1^0 ], cost: 2+2*op1^0 ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: l5 22: l5 -> l1 : op1^0'=0, op2^0'=1+op2^0, [ op2^0==0 && 1<=op1^0 ], cost: 2+2*op1^0 23: l5 -> l1 : op1^0'=0, op2^0'=1, [ op2^0==0 && -1+op1^0>=1 ], cost: 2+2*op1^0 24: l5 -> l1 : op1^0'=0, op2^0'=op2^0+op1^0, [ op2^0==0 && 0<=op1^0 ], cost: 2+2*op1^0 Computing asymptotic complexity for rule 22 Resulting cost 0 has complexity: Unknown Computing asymptotic complexity for rule 23 Resulting cost 0 has complexity: Unknown Computing asymptotic complexity for rule 24 Resulting cost 0 has complexity: Unknown 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: [ op1^0==op1^post_8 && op2^0==op2^post_8 ] WORST_CASE(Omega(1),?)