Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f0 -> f17 : A'=0, B'=free, C'=free_1, D'=0, [], cost: 1 1: f17 -> f17 : D'=1+D, [ E>=1+D ], cost: 1 16: f17 -> f27 : F'=-1+E, [ D>=E ], cost: 1 2: f27 -> f27 : F'=-1+F, [ F>=0 ], cost: 1 15: f27 -> f37 : G'=0, [ 0>=1+F ], cost: 1 3: f37 -> f37 : G'=1+G, [ E>=1+G ], cost: 1 14: f37 -> f45 : A'=0, [ G>=E ], cost: 1 4: f45 -> f45 : A'=1+A, [ E>=1+A ], cost: 1 13: f45 -> f55 : H'=0, [ A>=E ], cost: 1 5: f55 -> f55 : H'=1+H, [ E>=1+H ], cost: 1 12: f55 -> f65 : Q'=-1+E, [ H>=E ], cost: 1 6: f65 -> f65 : Q'=-1+Q, [ Q>=0 ], cost: 1 11: f65 -> f75 : J'=0, [ 0>=1+Q ], cost: 1 7: f75 -> f75 : J'=1+J, [ E>=1+J ], cost: 1 10: f75 -> f83 : A'=-1+E, [ J>=E ], cost: 1 8: f83 -> f83 : A'=-1+A, [ A>=0 ], cost: 1 9: f83 -> f93 : [ 0>=1+A ], cost: 1 Simplified the transitions: Start location: f0 0: f0 -> f17 : A'=0, B'=free, C'=free_1, D'=0, [], cost: 1 1: f17 -> f17 : D'=1+D, [ E>=1+D ], cost: 1 16: f17 -> f27 : F'=-1+E, [ D>=E ], cost: 1 2: f27 -> f27 : F'=-1+F, [ F>=0 ], cost: 1 15: f27 -> f37 : G'=0, [ 0>=1+F ], cost: 1 3: f37 -> f37 : G'=1+G, [ E>=1+G ], cost: 1 14: f37 -> f45 : A'=0, [ G>=E ], cost: 1 4: f45 -> f45 : A'=1+A, [ E>=1+A ], cost: 1 13: f45 -> f55 : H'=0, [ A>=E ], cost: 1 5: f55 -> f55 : H'=1+H, [ E>=1+H ], cost: 1 12: f55 -> f65 : Q'=-1+E, [ H>=E ], cost: 1 6: f65 -> f65 : Q'=-1+Q, [ Q>=0 ], cost: 1 11: f65 -> f75 : J'=0, [ 0>=1+Q ], cost: 1 7: f75 -> f75 : J'=1+J, [ E>=1+J ], cost: 1 10: f75 -> f83 : A'=-1+E, [ J>=E ], cost: 1 8: f83 -> f83 : A'=-1+A, [ A>=0 ], cost: 1 Eliminating 1 self-loops for location f17 Self-Loop 1 has the metering function: E-D, resulting in the new transition 17. Removing the self-loops: 1. Eliminating 1 self-loops for location f27 Self-Loop 2 has the metering function: 1+F, resulting in the new transition 18. Removing the self-loops: 2. Eliminating 1 self-loops for location f37 Self-Loop 3 has the metering function: E-G, resulting in the new transition 19. Removing the self-loops: 3. Eliminating 1 self-loops for location f45 Self-Loop 4 has the metering function: E-A, resulting in the new transition 20. Removing the self-loops: 4. Eliminating 1 self-loops for location f55 Self-Loop 5 has the metering function: -H+E, resulting in the new transition 21. Removing the self-loops: 5. Eliminating 1 self-loops for location f65 Self-Loop 6 has the metering function: 1+Q, resulting in the new transition 22. Removing the self-loops: 6. Eliminating 1 self-loops for location f75 Self-Loop 7 has the metering function: E-J, resulting in the new transition 23. Removing the self-loops: 7. Eliminating 1 self-loops for location f83 Self-Loop 8 has the metering function: 1+A, resulting in the new transition 24. Removing the self-loops: 8. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f17 : A'=0, B'=free, C'=free_1, D'=0, [], cost: 1 17: f17 -> [10] : D'=E, [ E>=1+D ], cost: E-D 18: f27 -> [11] : F'=-1, [ F>=0 ], cost: 1+F 19: f37 -> [12] : G'=E, [ E>=1+G ], cost: E-G 20: f45 -> [13] : A'=E, [ E>=1+A ], cost: E-A 21: f55 -> [14] : H'=E, [ E>=1+H ], cost: -H+E 22: f65 -> [15] : Q'=-1, [ Q>=0 ], cost: 1+Q 23: f75 -> [16] : J'=E, [ E>=1+J ], cost: E-J 24: f83 -> [17] : A'=-1, [ A>=0 ], cost: 1+A 16: [10] -> f27 : F'=-1+E, [ D>=E ], cost: 1 15: [11] -> f37 : G'=0, [ 0>=1+F ], cost: 1 14: [12] -> f45 : A'=0, [ G>=E ], cost: 1 13: [13] -> f55 : H'=0, [ A>=E ], cost: 1 12: [14] -> f65 : Q'=-1+E, [ H>=E ], cost: 1 11: [15] -> f75 : J'=0, [ 0>=1+Q ], cost: 1 10: [16] -> f83 : A'=-1+E, [ J>=E ], cost: 1 Applied simple chaining: Start location: f0 0: f0 -> [17] : A'=-1, B'=free, C'=free_1, D'=E, F'=-1, G'=E, H'=E, Q'=-1, J'=E, [ E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && E>=1 && E>=E && E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && -1+E>=0 ], cost: 8+8*E Final control flow graph problem, now checking costs for infinitely many models: Start location: f0 0: f0 -> [17] : A'=-1, B'=free, C'=free_1, D'=E, F'=-1, G'=E, H'=E, Q'=-1, J'=E, [ E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && E>=1 && E>=E && E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && -1+E>=0 ], cost: 8+8*E Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 8+8*E and guard: E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && E>=1 && E>=E && E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && -1+E>=0: E: Pos Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && E>=1 && E>=E && E>=1 && E>=E && -1+E>=0 && 0>=0 && E>=1 && E>=E && -1+E>=0 Final Cost: 8+8*E 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),?)