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