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'=1, [ B>=A ], cost: 1 3: evalfbb4in -> evalfreturnin : [ A>=1+B ], cost: 1 4: evalfbb2in -> evalfbb1in : [ D>=C ], cost: 1 5: evalfbb2in -> evalfbb3in : [ C>=1+D ], 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'=1, [ B>=A ], cost: 1 4: evalfbb2in -> evalfbb1in : [ D>=C ], cost: 1 5: evalfbb2in -> evalfbb3in : [ C>=1+D ], 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'=1, [ B>=A ], cost: 1 5: evalfbb2in -> evalfbb4in : A'=1+A, [ C>=1+D ], cost: 2 4: evalfbb2in -> evalfbb2in : C'=1+C, [ D>=C ], cost: 2 Eliminating 1 self-loops for location evalfbb2in Self-Loop 4 has the metering function: 1-C+D, 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'=1, [ B>=A ], cost: 1 9: evalfbb2in -> [8] : C'=1+D, [ D>=C ], cost: 2-2*C+2*D 5: [8] -> evalfbb4in : A'=1+A, [ C>=1+D ], cost: 2 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb4in : A'=1, [], cost: 2 2: evalfbb4in -> evalfbb4in : A'=1+A, C'=1+D, [ B>=A && D>=1 && 1+D>=1+D ], cost: 3+2*D 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+D, [ B>=A && D>=1 ], cost: 3+3*B+2*(1+B-A)*D-3*A Applied simple chaining: Start location: evalfstart 0: evalfstart -> [9] : A'=1+B, C'=1+D, [ B>=1 && D>=1 ], cost: 2+3*B+2*B*D Final control flow graph problem, now checking costs for infinitely many models: Start location: evalfstart 0: evalfstart -> [9] : A'=1+B, C'=1+D, [ B>=1 && D>=1 ], cost: 2+3*B+2*B*D Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 2+3*B+2*B*D and guard: B>=1 && D>=1: B: Pos, D: Pos Found new complexity n^2, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=1 && D>=1 Final Cost: 2+3*B+2*B*D 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),?)