Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f0 -> f1 : A'=0, [], cost: 1 1: f1 -> f1 : B'=-1+B, C'=free, [ B>=1 && free>=1 ], cost: 1 2: f1 -> f1 : B'=-2+B, C'=free_1, [ B>=1 && 0>=free_1 ], cost: 1 3: f1 -> f4 : C'=free_2, [ 0>=B ], cost: 1 4: f4 -> f4 : A'=1, C'=free_3, [ C>=1 ], cost: 1 5: f4 -> f4 : A'=2, C'=free_4, [ 0>=C ], cost: 1 Eliminating 2 self-loops for location f1 Self-Loop 1 has the metering function: B, resulting in the new transition 6. Self-Loop 2 has the metering function: meter, resulting in the new transition 7. Removing the self-loops: 1 2. Eliminating 2 self-loops for location f4 Removing the self-loops: 4 5. Adding an epsilon transition (to model nonexecution of the loops): 10. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f1 : A'=0, [], cost: 1 6: f1 -> [3] : B'=0, C'=free, [ B>=1 && free>=1 ], cost: B 7: f1 -> [3] : B'=B-2*meter, C'=free_1, [ B>=1 && 0>=free_1 && 2*meter==B ], cost: meter 8: f4 -> [4] : A'=1, C'=free_3, [ C>=1 ], cost: 1 9: f4 -> [4] : A'=2, C'=free_4, [ 0>=C ], cost: 1 10: f4 -> [4] : [], cost: 0 3: [3] -> f4 : C'=free_2, [ 0>=B ], cost: 1 Applied chaining over branches and pruning: Start location: f0 11: f0 -> [3] : A'=0, B'=0, C'=free, [ B>=1 && free>=1 ], cost: 1+B 12: f0 -> [3] : A'=0, B'=B-2*meter, C'=free_1, [ B>=1 && 0>=free_1 && 2*meter==B ], cost: 1+meter Final control flow graph problem, now checking costs for infinitely many models: Start location: f0 11: f0 -> [3] : A'=0, B'=0, C'=free, [ B>=1 && free>=1 ], cost: 1+B 12: f0 -> [3] : A'=0, B'=B-2*meter, C'=free_1, [ B>=1 && 0>=free_1 && 2*meter==B ], cost: 1+meter Computing complexity for remaining 2 transitions. Found configuration with infinitely models for cost: 1+B and guard: B>=1 && free>=1: free: Pos, B: Pos Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=1 && free>=1 Final Cost: 1+B Obtained the following complexity w.r.t. the length of the input n: Complexity class: n^1 Complexity value: 1 WORST_CASE(Omega(n^1),?)