Trying to load file: main.koat Initial Control flow graph problem: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb4in : A'=0, [], cost: 1 2: evalfbb4in -> evalfbb2in : C'=0, [ B>=1+A ], cost: 1 3: evalfbb4in -> evalfreturnin : [ A>=B ], cost: 1 4: evalfbb2in -> evalfbb1in : [ A>=C ], cost: 1 5: evalfbb2in -> evalfbb3in : [ C>=1+A ], cost: 1 8: evalfreturnin -> evalfstop : [], cost: 1 6: evalfbb1in -> evalfbb2in : C'=1+C, [], cost: 1 7: evalfbb3in -> evalfbb4in : A'=1+A, [], cost: 1 Simplified the transitions: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb4in : A'=0, [], cost: 1 2: evalfbb4in -> evalfbb2in : C'=0, [ B>=1+A ], cost: 1 4: evalfbb2in -> evalfbb1in : [ A>=C ], cost: 1 5: evalfbb2in -> evalfbb3in : [ C>=1+A ], cost: 1 6: evalfbb1in -> evalfbb2in : C'=1+C, [], cost: 1 7: evalfbb3in -> evalfbb4in : A'=1+A, [], cost: 1 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb4in : A'=0, [], cost: 2 2: evalfbb4in -> evalfbb2in : C'=0, [ B>=1+A ], cost: 1 5: evalfbb2in -> evalfbb4in : A'=1+A, [ C>=1+A ], cost: 2 4: evalfbb2in -> evalfbb2in : C'=1+C, [ A>=C ], cost: 2 Eliminating 1 self-loops for location evalfbb2in Self-Loop 4 has the metering function: 1-C+A, resulting in the new transition 9. Removing the self-loops: 4. Removed all Self-loops using metering functions (where possible): Start location: evalfstart 0: evalfstart -> evalfbb4in : A'=0, [], cost: 2 2: evalfbb4in -> evalfbb2in : C'=0, [ B>=1+A ], cost: 1 9: evalfbb2in -> [8] : C'=1+A, [ A>=C ], cost: 2-2*C+2*A 5: [8] -> evalfbb4in : A'=1+A, [ C>=1+A ], cost: 2 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb4in : A'=0, [], cost: 2 2: evalfbb4in -> evalfbb4in : A'=1+A, C'=1+A, [ B>=1+A && A>=0 && 1+A>=1+A ], cost: 5+2*A Eliminating 1 self-loops for location evalfbb4in Self-Loop 2 has the metering function: B-A, resulting in the new transition 10. Removing the self-loops: 2. Removed all Self-loops using metering functions (where possible): Start location: evalfstart 0: evalfstart -> evalfbb4in : A'=0, [], cost: 2 10: evalfbb4in -> [9] : A'=B, C'=B, [ B>=1+A && A>=0 ], cost: 4*B+(B-A)^2+2*(B-A)*A-4*A Applied simple chaining: Start location: evalfstart 0: evalfstart -> [9] : A'=B, C'=B, [ B>=1 && 0>=0 ], cost: 2+4*B+B^2 Final control flow graph problem, now checking costs for infinitely many models: Start location: evalfstart 0: evalfstart -> [9] : A'=B, C'=B, [ B>=1 && 0>=0 ], cost: 2+4*B+B^2 Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 2+4*B+B^2 and guard: B>=1 && 0>=0: 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 Final Cost: 2+4*B+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),?)