Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f0 -> f46 : A'=5, B'=12, C'=0, D'=0, [], cost: 1 1: f46 -> f46 : D'=1+C, [ A>=1+D && C==D ], cost: 1 2: f46 -> f46 : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 3: f46 -> f46 : D'=1+D, [ A>=1+D && D>=1+C ], cost: 1 13: f46 -> f54 : D'=0, [ D>=A ], cost: 1 4: f54 -> f57 : E'=0, [ A>=1+D ], cost: 1 12: f54 -> f68 : D'=0, [ D>=A ], cost: 1 11: f57 -> f54 : D'=1+D, [ E>=B ], cost: 1 5: f57 -> f57 : E'=1+E, F'=free, G'=free_1, [ B>=1+E ], cost: 1 7: f68 -> f68 : D'=1+D, F'=free_4, G'=free_5, [ B>=1+D ], cost: 1 6: f68 -> f74 : F'=free_2, G'=free_3, [ B>=1+D ], cost: 1 10: f68 -> f78 : D'=0, [ D>=B ], cost: 1 9: f78 -> f74 : [ D>=A ], cost: 1 8: f78 -> f78 : D'=1+D, [ A>=1+D ], cost: 1 Simplified the transitions: Start location: f0 0: f0 -> f46 : A'=5, B'=12, C'=0, D'=0, [], cost: 1 1: f46 -> f46 : D'=1+C, [ A>=1+D && C==D ], cost: 1 2: f46 -> f46 : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 3: f46 -> f46 : D'=1+D, [ A>=1+D && D>=1+C ], cost: 1 13: f46 -> f54 : D'=0, [ D>=A ], cost: 1 4: f54 -> f57 : E'=0, [ A>=1+D ], cost: 1 12: f54 -> f68 : D'=0, [ D>=A ], cost: 1 11: f57 -> f54 : D'=1+D, [ E>=B ], cost: 1 5: f57 -> f57 : E'=1+E, F'=free, G'=free_1, [ B>=1+E ], cost: 1 7: f68 -> f68 : D'=1+D, F'=free_4, G'=free_5, [ B>=1+D ], cost: 1 10: f68 -> f78 : D'=0, [ D>=B ], cost: 1 8: f78 -> f78 : D'=1+D, [ A>=1+D ], cost: 1 Eliminating 3 self-loops for location f46 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 f57 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 f68 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 f78 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 -> f46 : A'=5, B'=12, C'=0, D'=0, [], cost: 1 14: f46 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f46 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f46 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f46 -> [7] : [], cost: 0 4: f54 -> f57 : E'=0, [ A>=1+D ], cost: 1 12: f54 -> f68 : D'=0, [ D>=A ], cost: 1 18: f57 -> [8] : E'=B, F'=free, G'=free_1, [ B>=1+E ], cost: -E+B 19: f68 -> [9] : D'=B, F'=free_4, G'=free_5, [ B>=1+D ], cost: B-D 20: f78 -> [10] : D'=A, [ A>=1+D ], cost: -D+A 13: [7] -> f54 : D'=0, [ D>=A ], cost: 1 11: [8] -> f54 : D'=1+D, [ E>=B ], cost: 1 10: [9] -> f78 : D'=0, [ D>=B ], cost: 1 Applied simple chaining: Start location: f0 0: f0 -> f46 : A'=5, B'=12, C'=0, D'=0, [], cost: 1 14: f46 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f46 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f46 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f46 -> [7] : [], cost: 0 4: f54 -> f54 : D'=1+D, E'=B, F'=free, G'=free_1, [ A>=1+D && B>=1 && B>=B ], cost: 2+B 12: f54 -> [10] : D'=A, F'=free_4, G'=free_5, [ D>=A && B>=1 && B>=B && A>=1 ], cost: 2+B+A 13: [7] -> f54 : D'=0, [ D>=A ], cost: 1 Eliminating 1 self-loops for location f54 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 -> f46 : A'=5, B'=12, C'=0, D'=0, [], cost: 1 14: f46 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f46 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f46 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f46 -> [7] : [], cost: 0 21: f54 -> [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] -> f54 : 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 -> f46 : A'=5, B'=12, C'=0, D'=0, [], cost: 1 14: f46 -> [7] : D'=1+C, [ A>=1+D && C==D ], cost: C-D 15: f46 -> [7] : D'=1+D, [ A>=1+D && C>=1+D ], cost: 1 16: f46 -> [7] : D'=A, [ A>=1+D && D>=1+C ], cost: -D+A 17: f46 -> [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'=12, C'=0, D'=1, [ 5>=1 && 0==0 ], cost: 1 23: f0 -> [7] : A'=5, B'=12, 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),?)