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