Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f0 -> f12 : A'=2, B'=free, C'=free_1, D'=0, [], cost: 1 1: f12 -> f15 : E'=0, [ A>=1+D ], cost: 1 15: f12 -> f23 : D'=0, [ D>=A ], cost: 1 14: f15 -> f12 : D'=1+D, [ E>=A ], cost: 1 2: f15 -> f15 : E'=1+E, [ A>=1+E ], cost: 1 3: f23 -> f26 : E'=0, [ A>=1+D ], cost: 1 8: f23 -> f52 : G'=0, [ D>=A ], cost: 1 9: f23 -> f52 : G'=1, [ D>=A && 49>=free_2 ], cost: 1 10: f23 -> f52 : G'=1, [ D>=A ], cost: 1 11: f23 -> f52 : G'=1, [ D>=A && 42>=free_3 ], cost: 1 12: f23 -> f52 : G'=1, [ D>=A && 21>=free_4 ], cost: 1 13: f23 -> f52 : G'=1, [ D>=A && 18>=free_5 ], cost: 1 7: f26 -> f23 : D'=1+D, [ E>=A ], cost: 1 4: f26 -> f30 : F'=0, [ A>=1+E ], cost: 1 6: f30 -> f26 : E'=1+E, [ F>=A ], cost: 1 5: f30 -> f30 : F'=1+F, [ A>=1+F ], cost: 1 Simplified the transitions: Start location: f0 0: f0 -> f12 : A'=2, B'=free, C'=free_1, D'=0, [], cost: 1 1: f12 -> f15 : E'=0, [ A>=1+D ], cost: 1 15: f12 -> f23 : D'=0, [ D>=A ], cost: 1 14: f15 -> f12 : D'=1+D, [ E>=A ], cost: 1 2: f15 -> f15 : E'=1+E, [ A>=1+E ], cost: 1 3: f23 -> f26 : E'=0, [ A>=1+D ], cost: 1 7: f26 -> f23 : D'=1+D, [ E>=A ], cost: 1 4: f26 -> f30 : F'=0, [ A>=1+E ], cost: 1 6: f30 -> f26 : E'=1+E, [ F>=A ], cost: 1 5: f30 -> f30 : F'=1+F, [ A>=1+F ], cost: 1 Eliminating 1 self-loops for location f15 Self-Loop 2 has the metering function: -E+A, resulting in the new transition 16. Removing the self-loops: 2. Eliminating 1 self-loops for location f30 Self-Loop 5 has the metering function: -F+A, resulting in the new transition 17. Removing the self-loops: 5. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f12 : A'=2, B'=free, C'=free_1, D'=0, [], cost: 1 1: f12 -> f15 : E'=0, [ A>=1+D ], cost: 1 15: f12 -> f23 : D'=0, [ D>=A ], cost: 1 16: f15 -> [7] : E'=A, [ A>=1+E ], cost: -E+A 3: f23 -> f26 : E'=0, [ A>=1+D ], cost: 1 7: f26 -> f23 : D'=1+D, [ E>=A ], cost: 1 4: f26 -> f30 : F'=0, [ A>=1+E ], cost: 1 17: f30 -> [8] : F'=A, [ A>=1+F ], cost: -F+A 14: [7] -> f12 : D'=1+D, [ E>=A ], cost: 1 6: [8] -> f26 : E'=1+E, [ F>=A ], cost: 1 Applied simple chaining: Start location: f0 0: f0 -> f12 : A'=2, B'=free, C'=free_1, D'=0, [], cost: 1 1: f12 -> f12 : D'=1+D, E'=A, [ A>=1+D && A>=1 && A>=A ], cost: 2+A 15: f12 -> f23 : D'=0, [ D>=A ], cost: 1 3: f23 -> f26 : E'=0, [ A>=1+D ], cost: 1 7: f26 -> f23 : D'=1+D, [ E>=A ], cost: 1 4: f26 -> f26 : E'=1+E, F'=A, [ A>=1+E && A>=1 && A>=A ], cost: 2+A Eliminating 1 self-loops for location f12 Self-Loop 1 has the metering function: -D+A, resulting in the new transition 18. Removing the self-loops: 1. Eliminating 1 self-loops for location f26 Self-Loop 4 has the metering function: -E+A, resulting in the new transition 19. Removing the self-loops: 4. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f12 : A'=2, B'=free, C'=free_1, D'=0, [], cost: 1 18: f12 -> [9] : D'=A, E'=A, [ A>=1+D && A>=1 ], cost: -(D-A)*A-2*D+2*A 3: f23 -> f26 : E'=0, [ A>=1+D ], cost: 1 19: f26 -> [10] : E'=A, F'=A, [ A>=1+E && A>=1 ], cost: -2*E+2*A-(E-A)*A 15: [9] -> f23 : D'=0, [ D>=A ], cost: 1 7: [10] -> f23 : D'=1+D, [ E>=A ], cost: 1 Applied simple chaining: Start location: f0 0: f0 -> f23 : A'=2, B'=free, C'=free_1, D'=0, E'=2, [ 2>=1 && 2>=1 && 2>=2 ], cost: 10 3: f23 -> f23 : D'=1+D, E'=A, F'=A, [ A>=1+D && A>=1 && A>=1 && A>=A ], cost: 2+A^2+2*A Eliminating 1 self-loops for location f23 Self-Loop 3 has the metering function: -D+A, resulting in the new transition 20. Removing the self-loops: 3. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f23 : A'=2, B'=free, C'=free_1, D'=0, E'=2, [ 2>=1 && 2>=1 && 2>=2 ], cost: 10 20: f23 -> [11] : D'=A, E'=A, F'=A, [ A>=1+D && A>=1 ], cost: -(D-A)*A^2-2*(D-A)*A-2*D+2*A Applied simple chaining: Start location: f0 0: f0 -> [11] : A'=2, B'=free, C'=free_1, D'=2, E'=2, F'=2, [ 2>=1 && 2>=1 && 2>=2 && 2>=1 && 2>=1 ], cost: 30 Final control flow graph problem, now checking costs for infinitely many models: Start location: f0 0: f0 -> [11] : A'=2, B'=free, C'=free_1, D'=2, E'=2, F'=2, [ 2>=1 && 2>=1 && 2>=2 && 2>=1 && 2>=1 ], cost: 30 Computing complexity for remaining 1 transitions. Found new complexity const, because: const cost. The final runtime is determined by this resulting transition: Final Guard: 2>=1 && 2>=1 && 2>=2 && 2>=1 && 2>=1 Final Cost: 30 Obtained the following complexity w.r.t. the length of the input n: Complexity class: const Complexity value: 0 WORST_CASE(Omega(1),?)