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