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