Trying to load file: main.koat Initial Control flow graph problem: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb4in : A'=1, [], cost: 1 2: evalfbb4in -> evalfbb2in : C'=A, [ B>=A ], cost: 1 3: evalfbb4in -> evalfreturnin : [ A>=1+B ], cost: 1 4: evalfbb2in -> evalfbb1in : [ B>=C ], cost: 1 5: evalfbb2in -> evalfbb3in : [ C>=1+B ], 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'=1, [], cost: 1 2: evalfbb4in -> evalfbb2in : C'=A, [ B>=A ], cost: 1 4: evalfbb2in -> evalfbb1in : [ B>=C ], cost: 1 5: evalfbb2in -> evalfbb3in : [ C>=1+B ], 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'=1, [], cost: 2 2: evalfbb4in -> evalfbb2in : C'=A, [ B>=A ], cost: 1 5: evalfbb2in -> evalfbb4in : A'=1+A, [ C>=1+B ], cost: 2 4: evalfbb2in -> evalfbb2in : C'=1+C, [ B>=C ], cost: 2 Eliminating 1 self-loops for location evalfbb2in Self-Loop 4 has the metering function: 1+B-C, 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'=1, [], cost: 2 2: evalfbb4in -> evalfbb2in : C'=A, [ B>=A ], cost: 1 9: evalfbb2in -> [8] : C'=1+B, [ B>=C ], cost: 2+2*B-2*C 5: [8] -> evalfbb4in : A'=1+A, [ C>=1+B ], cost: 2 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb4in : A'=1, [], cost: 2 2: evalfbb4in -> evalfbb4in : A'=1+A, C'=1+B, [ B>=A && B>=A && 1+B>=1+B ], cost: 5+2*B-2*A Eliminating 1 self-loops for location evalfbb4in Self-Loop 2 has the metering function: 1+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'=1, [], cost: 2 10: evalfbb4in -> [9] : A'=1+B, C'=1+B, [ B>=A ], cost: 6+6*B-(1+B-A)^2-6*A-2*(1+B-A)*A+2*B*(1+B-A) Applied simple chaining: Start location: evalfstart 0: evalfstart -> [9] : A'=1+B, C'=1+B, [ B>=1 ], 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'=1+B, C'=1+B, [ B>=1 ], 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: B: Pos Found new complexity n^2, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=1 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),?)