Trying to load file: main.koat Initial Control flow graph problem: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubbleentryin : [], cost: 1 1: evalsipmabubbleentryin -> evalsipmabubblebb6in : [], cost: 1 2: evalsipmabubblebb6in -> evalsipmabubblebb4in : B'=0, [ A>=0 ], cost: 1 3: evalsipmabubblebb6in -> evalsipmabubblereturnin : [ 0>=1+A ], cost: 1 4: evalsipmabubblebb4in -> evalsipmabubblebb1in : [ A>=1+B ], cost: 1 5: evalsipmabubblebb4in -> evalsipmabubblebb5in : [ B>=A ], cost: 1 11: evalsipmabubblereturnin -> evalsipmabubblestop : [], cost: 1 6: evalsipmabubblebb1in -> evalsipmabubblebb2in : [ free>=1+free_1 ], cost: 1 7: evalsipmabubblebb1in -> evalsipmabubblebb3in : [ free_3>=free_2 ], cost: 1 10: evalsipmabubblebb5in -> evalsipmabubblebb6in : A'=-1+A, [], cost: 1 8: evalsipmabubblebb2in -> evalsipmabubblebb3in : [], cost: 1 9: evalsipmabubblebb3in -> evalsipmabubblebb4in : B'=1+B, [], cost: 1 Simplified the transitions: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubbleentryin : [], cost: 1 1: evalsipmabubbleentryin -> evalsipmabubblebb6in : [], cost: 1 2: evalsipmabubblebb6in -> evalsipmabubblebb4in : B'=0, [ A>=0 ], cost: 1 4: evalsipmabubblebb4in -> evalsipmabubblebb1in : [ A>=1+B ], cost: 1 5: evalsipmabubblebb4in -> evalsipmabubblebb5in : [ B>=A ], cost: 1 6: evalsipmabubblebb1in -> evalsipmabubblebb2in : [], cost: 1 7: evalsipmabubblebb1in -> evalsipmabubblebb3in : [], cost: 1 10: evalsipmabubblebb5in -> evalsipmabubblebb6in : A'=-1+A, [], cost: 1 8: evalsipmabubblebb2in -> evalsipmabubblebb3in : [], cost: 1 9: evalsipmabubblebb3in -> evalsipmabubblebb4in : B'=1+B, [], cost: 1 Applied simple chaining: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 2: evalsipmabubblebb6in -> evalsipmabubblebb4in : B'=0, [ A>=0 ], cost: 1 5: evalsipmabubblebb4in -> evalsipmabubblebb6in : A'=-1+A, [ B>=A ], cost: 2 4: evalsipmabubblebb4in -> evalsipmabubblebb1in : [ A>=1+B ], cost: 1 7: evalsipmabubblebb1in -> evalsipmabubblebb3in : [], cost: 1 6: evalsipmabubblebb1in -> evalsipmabubblebb3in : [], cost: 2 9: evalsipmabubblebb3in -> evalsipmabubblebb4in : B'=1+B, [], cost: 1 Applied chaining over branches and pruning: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 2: evalsipmabubblebb6in -> evalsipmabubblebb4in : B'=0, [ A>=0 ], cost: 1 5: evalsipmabubblebb4in -> evalsipmabubblebb6in : A'=-1+A, [ B>=A ], cost: 2 12: evalsipmabubblebb4in -> evalsipmabubblebb3in : [ A>=1+B ], cost: 2 13: evalsipmabubblebb4in -> evalsipmabubblebb3in : [ A>=1+B ], cost: 3 9: evalsipmabubblebb3in -> evalsipmabubblebb4in : B'=1+B, [], cost: 1 Applied chaining over branches and pruning: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 2: evalsipmabubblebb6in -> evalsipmabubblebb4in : B'=0, [ A>=0 ], cost: 1 5: evalsipmabubblebb4in -> evalsipmabubblebb6in : A'=-1+A, [ B>=A ], cost: 2 14: evalsipmabubblebb4in -> evalsipmabubblebb4in : B'=1+B, [ A>=1+B ], cost: 3 15: evalsipmabubblebb4in -> evalsipmabubblebb4in : B'=1+B, [ A>=1+B ], cost: 4 Eliminating 2 self-loops for location evalsipmabubblebb4in Self-Loop 14 has the metering function: -B+A, resulting in the new transition 16. Self-Loop 15 has the metering function: -B+A, resulting in the new transition 17. Removing the self-loops: 14 15. Removed all Self-loops using metering functions (where possible): Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 2: evalsipmabubblebb6in -> evalsipmabubblebb4in : B'=0, [ A>=0 ], cost: 1 16: evalsipmabubblebb4in -> [10] : B'=A, [ A>=1+B ], cost: -3*B+3*A 17: evalsipmabubblebb4in -> [10] : B'=A, [ A>=1+B ], cost: -4*B+4*A 5: [10] -> evalsipmabubblebb6in : A'=-1+A, [ B>=A ], cost: 2 Applied chaining over branches and pruning: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 18: evalsipmabubblebb6in -> [10] : B'=A, [ A>=0 && A>=1 ], cost: 1+3*A 19: evalsipmabubblebb6in -> [10] : B'=A, [ A>=0 && A>=1 ], cost: 1+4*A 5: [10] -> evalsipmabubblebb6in : A'=-1+A, [ B>=A ], cost: 2 Applied chaining over branches and pruning: Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 20: evalsipmabubblebb6in -> evalsipmabubblebb6in : A'=-1+A, B'=A, [ A>=0 && A>=1 && A>=A ], cost: 3+3*A 21: evalsipmabubblebb6in -> evalsipmabubblebb6in : A'=-1+A, B'=A, [ A>=0 && A>=1 && A>=A ], cost: 3+4*A Eliminating 2 self-loops for location evalsipmabubblebb6in Self-Loop 20 has the metering function: A, resulting in the new transition 22. Self-Loop 21 has the metering function: A, resulting in the new transition 23. Removing the self-loops: 20 21. Removed all Self-loops using metering functions (where possible): Start location: evalsipmabubblestart 0: evalsipmabubblestart -> evalsipmabubblebb6in : [], cost: 2 22: evalsipmabubblebb6in -> [11] : A'=0, B'=1, [ A>=1 ], cost: 3/2*A^2+9/2*A 23: evalsipmabubblebb6in -> [11] : A'=0, B'=1, [ A>=1 ], cost: 2*A^2+5*A Applied chaining over branches and pruning: Start location: evalsipmabubblestart 24: evalsipmabubblestart -> [11] : A'=0, B'=1, [ A>=1 ], cost: 2+3/2*A^2+9/2*A 25: evalsipmabubblestart -> [11] : A'=0, B'=1, [ A>=1 ], cost: 2+2*A^2+5*A Final control flow graph problem, now checking costs for infinitely many models: Start location: evalsipmabubblestart 24: evalsipmabubblestart -> [11] : A'=0, B'=1, [ A>=1 ], cost: 2+3/2*A^2+9/2*A 25: evalsipmabubblestart -> [11] : A'=0, B'=1, [ A>=1 ], cost: 2+2*A^2+5*A Computing complexity for remaining 2 transitions. Found configuration with infinitely models for cost: 2+3/2*A^2+9/2*A and guard: A>=1: A: Pos Found new complexity n^2, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: A>=1 Final Cost: 2+3/2*A^2+9/2*A 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),?)