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