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