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