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