Trying to load file: main.koat Initial Control flow graph problem: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb10in : A'=B, B'=A, [], cost: 1 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 3: evalfbb10in -> evalfreturnin : [ 0>=B ], cost: 1 4: evalfbb8in -> evalfbb6in : D'=B, [ A>=C ], cost: 1 5: evalfbb8in -> evalfbb9in : [ C>=1+A ], cost: 1 14: evalfreturnin -> evalfstop : [], cost: 1 6: evalfbb6in -> evalfbb4in : E'=1, [ B+C>=D ], cost: 1 7: evalfbb6in -> evalfbb7in : [ D>=1+B+C ], cost: 1 13: evalfbb9in -> evalfbb10in : B'=-1+B, [], cost: 1 8: evalfbb4in -> evalfbb3in : [ D>=E ], cost: 1 9: evalfbb4in -> evalfbb5in : [ E>=1+D ], cost: 1 12: evalfbb7in -> evalfbb8in : C'=1+C, [], cost: 1 10: evalfbb3in -> evalfbb4in : E'=1+E, [], cost: 1 11: evalfbb5in -> evalfbb6in : D'=1+D, [], cost: 1 Simplified the transitions: Start location: evalfstart 0: evalfstart -> evalfentryin : [], cost: 1 1: evalfentryin -> evalfbb10in : A'=B, B'=A, [], cost: 1 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 4: evalfbb8in -> evalfbb6in : D'=B, [ A>=C ], cost: 1 5: evalfbb8in -> evalfbb9in : [ C>=1+A ], cost: 1 6: evalfbb6in -> evalfbb4in : E'=1, [ B+C>=D ], cost: 1 7: evalfbb6in -> evalfbb7in : [ D>=1+B+C ], cost: 1 13: evalfbb9in -> evalfbb10in : B'=-1+B, [], cost: 1 8: evalfbb4in -> evalfbb3in : [ D>=E ], cost: 1 9: evalfbb4in -> evalfbb5in : [ E>=1+D ], cost: 1 12: evalfbb7in -> evalfbb8in : C'=1+C, [], cost: 1 10: evalfbb3in -> evalfbb4in : E'=1+E, [], cost: 1 11: evalfbb5in -> evalfbb6in : D'=1+D, [], cost: 1 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 5: evalfbb8in -> evalfbb10in : B'=-1+B, [ C>=1+A ], cost: 2 4: evalfbb8in -> evalfbb6in : D'=B, [ A>=C ], cost: 1 7: evalfbb6in -> evalfbb8in : C'=1+C, [ D>=1+B+C ], cost: 2 6: evalfbb6in -> evalfbb4in : E'=1, [ B+C>=D ], cost: 1 9: evalfbb4in -> evalfbb6in : D'=1+D, [ E>=1+D ], cost: 2 8: evalfbb4in -> evalfbb4in : E'=1+E, [ D>=E ], cost: 2 Eliminating 1 self-loops for location evalfbb4in Self-Loop 8 has the metering function: 1-E+D, resulting in the new transition 15. Removing the self-loops: 8. Removed all Self-loops using metering functions (where possible): Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 5: evalfbb8in -> evalfbb10in : B'=-1+B, [ C>=1+A ], cost: 2 4: evalfbb8in -> evalfbb6in : D'=B, [ A>=C ], cost: 1 7: evalfbb6in -> evalfbb8in : C'=1+C, [ D>=1+B+C ], cost: 2 6: evalfbb6in -> evalfbb4in : E'=1, [ B+C>=D ], cost: 1 15: evalfbb4in -> [12] : E'=1+D, [ D>=E ], cost: 2-2*E+2*D 9: [12] -> evalfbb6in : D'=1+D, [ E>=1+D ], cost: 2 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 5: evalfbb8in -> evalfbb10in : B'=-1+B, [ C>=1+A ], cost: 2 4: evalfbb8in -> evalfbb6in : D'=B, [ A>=C ], cost: 1 7: evalfbb6in -> evalfbb8in : C'=1+C, [ D>=1+B+C ], cost: 2 6: evalfbb6in -> evalfbb6in : D'=1+D, E'=1+D, [ B+C>=D && D>=1 && 1+D>=1+D ], cost: 3+2*D Eliminating 1 self-loops for location evalfbb6in Self-Loop 6 has the metering function: 1+B+C-D, resulting in the new transition 16. Removing the self-loops: 6. Removed all Self-loops using metering functions (where possible): Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 5: evalfbb8in -> evalfbb10in : B'=-1+B, [ C>=1+A ], cost: 2 4: evalfbb8in -> evalfbb6in : D'=B, [ A>=C ], cost: 1 16: evalfbb6in -> [13] : D'=1+B+C, E'=1+B+C, [ B+C>=D && D>=1 ], cost: 2+2*B+2*C+2*(1+B+C-D)*D-2*D+(1+B+C-D)^2 7: [13] -> evalfbb8in : C'=1+C, [ D>=1+B+C ], cost: 2 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 5: evalfbb8in -> evalfbb10in : B'=-1+B, [ C>=1+A ], cost: 2 4: evalfbb8in -> evalfbb8in : C'=1+C, D'=1+B+C, E'=1+B+C, [ A>=C && B+C>=B && B>=1 && 1+B+C>=1+B+C ], cost: 5+2*B*(1+C)+2*C+(1+C)^2 Eliminating 1 self-loops for location evalfbb8in Self-Loop 4 has the metering function: 1-C+A, resulting in the new transition 17. Removing the self-loops: 4. Removed all Self-loops using metering functions (where possible): Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb8in : C'=1, [ B>=1 ], cost: 1 17: evalfbb8in -> [14] : C'=1+A, D'=1+B+A, E'=1+B+A, [ A>=C && B+C>=B && B>=1 ], cost: 25/6+3/2*(-1+C-A)^2-2*B*C*(-1+C-A)-1/3*(-1+C-A)^3-C^2*(-1+C-A)-25/6*C-3*C*(-1+C-A)+B*(-1+C-A)^2-B*(-1+C-A)+C*(-1+C-A)^2+25/6*A 5: [14] -> evalfbb10in : B'=-1+B, [ C>=1+A ], cost: 2 Applied simple chaining: Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 2: evalfbb10in -> evalfbb10in : B'=-1+B, C'=1+A, D'=1+B+A, E'=1+B+A, [ B>=1 && A>=1 && 1+B>=B && B>=1 && 1+A>=1+A ], cost: 3+1/3*A^3+5/2*A^2+3*B*A+B*A^2+49/6*A Eliminating 1 self-loops for location evalfbb10in Self-Loop 2 has the metering function: B, resulting in the new transition 18. Removing the self-loops: 2. Removed all Self-loops using metering functions (where possible): Start location: evalfstart 0: evalfstart -> evalfbb10in : A'=B, B'=A, [], cost: 2 18: evalfbb10in -> [15] : B'=0, C'=1+A, D'=2+A, E'=2+A, [ B>=1 && A>=1 ], cost: 1/2*B^2*A^2+3*B+3/2*B^2*A+29/3*B*A+3*B*A^2+1/3*B*A^3 Applied simple chaining: Start location: evalfstart 0: evalfstart -> [15] : A'=B, B'=0, C'=1+B, D'=2+B, E'=2+B, [ A>=1 && B>=1 ], cost: 2+1/3*B^3*A+1/2*B^2*A^2+3*B^2*A+29/3*B*A+3/2*B*A^2+3*A Final control flow graph problem, now checking costs for infinitely many models: Start location: evalfstart 0: evalfstart -> [15] : A'=B, B'=0, C'=1+B, D'=2+B, E'=2+B, [ A>=1 && B>=1 ], cost: 2+1/3*B^3*A+1/2*B^2*A^2+3*B^2*A+29/3*B*A+3/2*B*A^2+3*A Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 2+1/3*B^3*A+1/2*B^2*A^2+3*B^2*A+29/3*B*A+3/2*B*A^2+3*A and guard: A>=1 && B>=1: B: Pos, A: Pos Found new complexity n^4, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: A>=1 && B>=1 Final Cost: 2+1/3*B^3*A+1/2*B^2*A^2+3*B^2*A+29/3*B*A+3/2*B*A^2+3*A Obtained the following complexity w.r.t. the length of the input n: Complexity class: n^4 Complexity value: 4 WORST_CASE(Omega(n^4),?)