Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f0 -> f31 : A'=5, B'=7, C'=0, D'=0, [], cost: 1 1: f31 -> f31 : D'=1+C, [ A>=1+D && C==D ], cost: 1 2: f31 -> f31 : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 3: f31 -> f31 : D'=1+D, [ A>=1+D && D>=1+C ], cost: 1 13: f31 -> f39 : D'=0, [ D>=A ], cost: 1 4: f39 -> f42 : E'=0, [ A>=1+D ], cost: 1 12: f39 -> f53 : D'=0, [ D>=A ], cost: 1 11: f42 -> f39 : D'=1+D, [ E>=B ], cost: 1 5: f42 -> f42 : E'=1+E, F'=free, G'=free_1, [ B>=1+E ], cost: 1 7: f53 -> f53 : D'=1+D, F'=free_4, G'=free_5, [ B>=1+D ], cost: 1 6: f53 -> f59 : F'=free_2, G'=free_3, [ B>=1+D ], cost: 1 10: f53 -> f63 : D'=0, [ D>=B ], cost: 1 9: f63 -> f59 : [ D>=A ], cost: 1 8: f63 -> f63 : D'=1+D, [ A>=1+D ], cost: 1 Simplified the transitions: Start location: f0 0: f0 -> f31 : A'=5, B'=7, C'=0, D'=0, [], cost: 1 1: f31 -> f31 : D'=1+C, [ A>=1+D && C==D ], cost: 1 2: f31 -> f31 : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 3: f31 -> f31 : D'=1+D, [ A>=1+D && D>=1+C ], cost: 1 13: f31 -> f39 : D'=0, [ D>=A ], cost: 1 4: f39 -> f42 : E'=0, [ A>=1+D ], cost: 1 12: f39 -> f53 : D'=0, [ D>=A ], cost: 1 11: f42 -> f39 : D'=1+D, [ E>=B ], cost: 1 5: f42 -> f42 : E'=1+E, F'=free, G'=free_1, [ B>=1+E ], cost: 1 7: f53 -> f53 : D'=1+D, F'=free_4, G'=free_5, [ B>=1+D ], cost: 1 10: f53 -> f63 : D'=0, [ D>=B ], cost: 1 8: f63 -> f63 : D'=1+D, [ A>=1+D ], cost: 1 Eliminating 3 self-loops for location f31 Self-Loop 1 has the metering function: C-D, resulting in the new transition 14. Self-Loop 3 has the metering function: -D+A, resulting in the new transition 16. Found this metering function when nesting loops: meter, Found this metering function when nesting loops: meter_1, Removing the self-loops: 1 2 3. Adding an epsilon transition (to model nonexecution of the loops): 17. Eliminating 1 self-loops for location f42 Self-Loop 5 has the metering function: -E+B, resulting in the new transition 18. Removing the self-loops: 5. Eliminating 1 self-loops for location f53 Self-Loop 7 has the metering function: B-D, resulting in the new transition 19. Removing the self-loops: 7. Eliminating 1 self-loops for location f63 Self-Loop 8 has the metering function: -D+A, resulting in the new transition 20. Removing the self-loops: 8. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f31 : A'=5, B'=7, C'=0, D'=0, [], cost: 1 14: f31 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f31 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f31 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f31 -> [7] : [], cost: 0 4: f39 -> f42 : E'=0, [ A>=1+D ], cost: 1 12: f39 -> f53 : D'=0, [ D>=A ], cost: 1 18: f42 -> [8] : E'=B, F'=free, G'=free_1, [ B>=1+E ], cost: -E+B 19: f53 -> [9] : D'=B, F'=free_4, G'=free_5, [ B>=1+D ], cost: B-D 20: f63 -> [10] : D'=A, [ A>=1+D ], cost: -D+A 13: [7] -> f39 : D'=0, [ D>=A ], cost: 1 11: [8] -> f39 : D'=1+D, [ E>=B ], cost: 1 10: [9] -> f63 : D'=0, [ D>=B ], cost: 1 Applied simple chaining: Start location: f0 0: f0 -> f31 : A'=5, B'=7, C'=0, D'=0, [], cost: 1 14: f31 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f31 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f31 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f31 -> [7] : [], cost: 0 4: f39 -> f39 : D'=1+D, E'=B, F'=free, G'=free_1, [ A>=1+D && B>=1 && B>=B ], cost: 2+B 12: f39 -> [10] : D'=A, F'=free_4, G'=free_5, [ D>=A && B>=1 && B>=B && A>=1 ], cost: 2+B+A 13: [7] -> f39 : D'=0, [ D>=A ], cost: 1 Eliminating 1 self-loops for location f39 Self-Loop 4 has the metering function: -D+A, resulting in the new transition 21. Removing the self-loops: 4. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f31 : A'=5, B'=7, C'=0, D'=0, [], cost: 1 14: f31 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f31 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f31 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f31 -> [7] : [], cost: 0 21: f39 -> [11] : D'=A, E'=B, F'=free, G'=free_1, [ A>=1+D && B>=1 ], cost: -2*D-B*(D-A)+2*A 13: [7] -> f39 : D'=0, [ D>=A ], cost: 1 12: [11] -> [10] : D'=A, F'=free_4, G'=free_5, [ D>=A && B>=1 && B>=B && A>=1 ], cost: 2+B+A Applied simple chaining: Start location: f0 0: f0 -> f31 : A'=5, B'=7, C'=0, D'=0, [], cost: 1 14: f31 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f31 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f31 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f31 -> [7] : [], cost: 0 13: [7] -> [10] : D'=A, E'=B, F'=free_4, G'=free_5, [ D>=A && A>=1 && B>=1 && A>=A && B>=1 && B>=B && A>=1 ], cost: 3+B+B*A+3*A Applied chaining over branches and pruning: Start location: f0 22: f0 -> [7] : A'=5, B'=7, C'=0, D'=1, [ 5>=1 && 0==0 ], cost: 1 23: f0 -> [7] : A'=5, B'=7, C'=0, D'=0, [], cost: 1 13: [7] -> [10] : D'=A, E'=B, F'=free_4, G'=free_5, [ D>=A && A>=1 && B>=1 && A>=A && B>=1 && B>=B && A>=1 ], cost: 3+B+B*A+3*A Applied chaining over branches and pruning: Start location: f0 Final control flow graph problem, now checking costs for infinitely many models: Start location: f0 Computing complexity for remaining 0 transitions. The final runtime is determined by this resulting transition: Final Guard: Final Cost: 1 Obtained the following complexity w.r.t. the length of the input n: Complexity class: const Complexity value: 0 WORST_CASE(Omega(1),?)