Trying to load file: main.koat Initial Control flow graph problem: Start location: l0 0: l0 -> l1 : A'=0, [], cost: 1 1: l1 -> l1 : A'=1+A, B'=-1+B, [ B>=1 ], cost: 1 2: l1 -> l2 : C'=A, [ 0>=B ], cost: 1 3: l2 -> l3 : D'=C, [ C>=1 ], cost: 1 5: l3 -> l2 : C'=-1+C, [ 0>=D && C>=1 ], cost: 1 4: l3 -> l3 : D'=-1+D, [ D>=1 && C>=1 ], cost: 1 Eliminating 1 self-loops for location l1 Self-Loop 1 has the metering function: B, resulting in the new transition 6. Removing the self-loops: 1. Eliminating 1 self-loops for location l3 Self-Loop 4 has the metering function: D, resulting in the new transition 7. Removing the self-loops: 4. Removed all Self-loops using metering functions (where possible): Start location: l0 0: l0 -> l1 : A'=0, [], cost: 1 6: l1 -> [4] : A'=B+A, B'=0, [ B>=1 ], cost: B 3: l2 -> l3 : D'=C, [ C>=1 ], cost: 1 7: l3 -> [5] : D'=0, [ D>=1 && C>=1 ], cost: D 2: [4] -> l2 : C'=A, [ 0>=B ], cost: 1 5: [5] -> l2 : C'=-1+C, [ 0>=D && C>=1 ], cost: 1 Applied simple chaining: Start location: l0 0: l0 -> l2 : A'=B, B'=0, C'=B, [ B>=1 && 0>=0 ], cost: 2+B 3: l2 -> l2 : C'=-1+C, D'=0, [ C>=1 && C>=1 && C>=1 && 0>=0 && C>=1 ], cost: 2+C Eliminating 1 self-loops for location l2 Self-Loop 3 has the metering function: C, resulting in the new transition 8. Removing the self-loops: 3. Removed all Self-loops using metering functions (where possible): Start location: l0 0: l0 -> l2 : A'=B, B'=0, C'=B, [ B>=1 && 0>=0 ], cost: 2+B 8: l2 -> [6] : C'=0, D'=0, [ C>=1 ], cost: 5/2*C+1/2*C^2 Applied simple chaining: Start location: l0 0: l0 -> [6] : A'=B, B'=0, C'=0, D'=0, [ B>=1 && 0>=0 && B>=1 ], cost: 2+7/2*B+1/2*B^2 Final control flow graph problem, now checking costs for infinitely many models: Start location: l0 0: l0 -> [6] : A'=B, B'=0, C'=0, D'=0, [ B>=1 && 0>=0 && B>=1 ], cost: 2+7/2*B+1/2*B^2 Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 2+7/2*B+1/2*B^2 and guard: B>=1 && 0>=0 && B>=1: B: Pos Found new complexity n^2, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=1 && 0>=0 && B>=1 Final Cost: 2+7/2*B+1/2*B^2 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),?)