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