Trying to load file: main.koat Initial Control flow graph problem: Start location: f999 3: f1 -> f1 : A'=1+A, B'=-1+B, [ B>=1 ], cost: 1 0: f1 -> f2 : A'=-1+A, [ A>=1 ], cost: 1 4: f2 -> f1 : A'=1+A, B'=-1+B, [ B>=1 ], cost: 1 1: f2 -> f2 : A'=-1+A, B'=1+B, [ A>=1 ], cost: 1 2: f999 -> f1 : A'=1, B'=-1+B, [ B>=1 && A==0 ], cost: 1 Eliminating 1 self-loops for location f1 Self-Loop 3 has the metering function: B, resulting in the new transition 5. Removing the self-loops: 3. Eliminating 1 self-loops for location f2 Self-Loop 1 has the metering function: A, resulting in the new transition 6. Removing the self-loops: 1. Removed all Self-loops using metering functions (where possible): Start location: f999 5: f1 -> [3] : A'=B+A, B'=0, [ B>=1 ], cost: B 6: f2 -> [4] : A'=0, B'=B+A, [ A>=1 ], cost: A 2: f999 -> f1 : A'=1, B'=-1+B, [ B>=1 && A==0 ], cost: 1 0: [3] -> f2 : A'=-1+A, [ A>=1 ], cost: 1 4: [4] -> f1 : A'=1+A, B'=-1+B, [ B>=1 ], cost: 1 Applied simple chaining: Start location: f999 5: f1 -> f1 : A'=1, B'=-2+B+A, [ B>=1 && B+A>=1 && -1+B+A>=1 && -1+B+A>=1 ], cost: 1+2*B+A 2: f999 -> f1 : A'=1, B'=-1+B, [ B>=1 && A==0 ], cost: 1 Eliminating 1 self-loops for location f1 Removing the self-loops: 5. Adding an epsilon transition (to model nonexecution of the loops): 8. Removed all Self-loops using metering functions (where possible): Start location: f999 7: f1 -> [5] : A'=1, B'=-2+B+A, [ B>=1 && -1+B+A>=1 ], cost: 1+2*B+A 8: f1 -> [5] : [], cost: 0 2: f999 -> f1 : A'=1, B'=-1+B, [ B>=1 && A==0 ], cost: 1 Applied chaining over branches and pruning: Start location: f999 9: f999 -> [5] : A'=1, B'=-2+B, [ B>=1 && A==0 && -1+B>=1 && -1+B>=1 ], cost: 1+2*B Final control flow graph problem, now checking costs for infinitely many models: Start location: f999 9: f999 -> [5] : A'=1, B'=-2+B, [ B>=1 && A==0 && -1+B>=1 && -1+B>=1 ], cost: 1+2*B Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 1+2*B and guard: B>=1 && A==0 && -1+B>=1 && -1+B>=1: B: Pos, A: Both Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=1 && A==0 && -1+B>=1 && -1+B>=1 Final Cost: 1+2*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),?)