Trying to load file: main.koat Initial Control flow graph problem: Start location: start 0: eval1 -> eval2 : A'=1+A, B'=1, [ A>=0 ], cost: 1 2: eval2 -> eval1 : A'=-2+A, [ A>=0 && B>=1 && B>=1+A ], cost: 1 1: eval2 -> eval2 : B'=1+B, [ A>=0 && B>=1 && A>=B ], cost: 1 3: start -> eval1 : [], cost: 1 Eliminating 1 self-loops for location eval2 Self-Loop 1 has the metering function: 1-B+A, resulting in the new transition 4. Removing the self-loops: 1. Removed all Self-loops using metering functions (where possible): Start location: start 0: eval1 -> eval2 : A'=1+A, B'=1, [ A>=0 ], cost: 1 4: eval2 -> [3] : B'=1+A, [ A>=0 && B>=1 && A>=B ], cost: 1-B+A 3: start -> eval1 : [], cost: 1 2: [3] -> eval1 : A'=-2+A, [ A>=0 && B>=1 && B>=1+A ], cost: 1 Applied simple chaining: Start location: start 0: eval1 -> eval1 : A'=-1+A, B'=2+A, [ A>=0 && 1+A>=0 && 1>=1 && 1+A>=1 && 1+A>=0 && 2+A>=1 && 2+A>=2+A ], cost: 3+A 3: start -> eval1 : [], cost: 1 Eliminating 1 self-loops for location eval1 Self-Loop 0 has the metering function: 1+A, resulting in the new transition 5. Removing the self-loops: 0. Removed all Self-loops using metering functions (where possible): Start location: start 5: eval1 -> [4] : A'=-1, B'=2, [ A>=0 ], cost: 7/2-1/2*(1+A)^2+(1+A)*A+7/2*A 3: start -> eval1 : [], cost: 1 Applied simple chaining: Start location: start 3: start -> [4] : A'=-1, B'=2, [ A>=0 ], cost: 9/2-1/2*(1+A)^2+(1+A)*A+7/2*A Final control flow graph problem, now checking costs for infinitely many models: Start location: start 3: start -> [4] : A'=-1, B'=2, [ A>=0 ], cost: 9/2-1/2*(1+A)^2+(1+A)*A+7/2*A Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 9/2-1/2*(1+A)^2+(1+A)*A+7/2*A and guard: A>=0: A: Pos Found new complexity n^2, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: A>=0 Final Cost: 9/2-1/2*(1+A)^2+(1+A)*A+7/2*A Obtained the following complexity w.r.t. the length of the input n: Complexity class: n^2 Complexity value: 2 WORST_CASE(Omega(n^2),?)