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