Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f0 -> f4 : A'=0, [], cost: 1 1: f4 -> f8 : A'=1+A, C'=0, [ B>=1+A ], cost: 1 8: f4 -> f20 : [ A>=B ], cost: 1 4: f8 -> f8 : A'=1+A, C'=1+C, D'=free, [ B>=1+A && 0>=1+free ], cost: 1 5: f8 -> f8 : A'=1+A, C'=1+C, D'=free_1, [ B>=1+A && free_1>=1 ], cost: 1 2: f8 -> f16 : D'=0, [ B>=1+A ], cost: 1 3: f8 -> f16 : [ A>=B ], cost: 1 6: f16 -> f4 : [ 0>=C ], cost: 1 7: f16 -> f4 : A'=-1+A, [ C>=1 ], cost: 1 Simplified the transitions: Start location: f0 0: f0 -> f4 : A'=0, [], cost: 1 1: f4 -> f8 : A'=1+A, C'=0, [ B>=1+A ], cost: 1 4: f8 -> f8 : A'=1+A, C'=1+C, D'=free, [ B>=1+A && 0>=1+free ], cost: 1 5: f8 -> f8 : A'=1+A, C'=1+C, D'=free_1, [ B>=1+A && free_1>=1 ], cost: 1 2: f8 -> f16 : D'=0, [ B>=1+A ], cost: 1 3: f8 -> f16 : [ A>=B ], cost: 1 6: f16 -> f4 : [ 0>=C ], cost: 1 7: f16 -> f4 : A'=-1+A, [ C>=1 ], cost: 1 Eliminating 2 self-loops for location f8 Self-Loop 4 has the metering function: B-A, resulting in the new transition 9. Self-Loop 5 has the metering function: B-A, resulting in the new transition 10. Removing the self-loops: 4 5. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f4 : A'=0, [], cost: 1 1: f4 -> f8 : A'=1+A, C'=0, [ B>=1+A ], cost: 1 9: f8 -> [5] : A'=B, C'=B+C-A, D'=free, [ B>=1+A && 0>=1+free ], cost: B-A 10: f8 -> [5] : A'=B, C'=B+C-A, D'=free_1, [ B>=1+A && free_1>=1 ], cost: B-A 6: f16 -> f4 : [ 0>=C ], cost: 1 7: f16 -> f4 : A'=-1+A, [ C>=1 ], cost: 1 2: [5] -> f16 : D'=0, [ B>=1+A ], cost: 1 3: [5] -> f16 : [ A>=B ], cost: 1 Applied chaining over branches and pruning: Start location: f0 0: f0 -> f4 : A'=0, [], cost: 1 11: f4 -> [5] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 12: f4 -> [5] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 13: [5] -> f4 : D'=0, [ B>=1+A && 0>=C ], cost: 2 14: [5] -> f4 : A'=-1+A, D'=0, [ B>=1+A && C>=1 ], cost: 2 15: [5] -> f4 : [ A>=B && 0>=C ], cost: 2 16: [5] -> f4 : A'=-1+A, [ A>=B && C>=1 ], cost: 2 Applied chaining over branches and pruning: Start location: f0 0: f0 -> f4 : A'=0, [], cost: 1 20: f4 -> f4 : A'=-1+B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free && B>=B && -1+B-A>=1 ], cost: 2+B-A 24: f4 -> f4 : A'=-1+B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 && B>=B && -1+B-A>=1 ], cost: 2+B-A 17: f4 -> [6] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 18: f4 -> [7] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 19: f4 -> [8] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 21: f4 -> [9] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 22: f4 -> [10] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 23: f4 -> [11] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A Eliminating 2 self-loops for location f4 Removing the self-loops: 20 24. Adding an epsilon transition (to model nonexecution of the loops): 27. Removed all Self-loops using metering functions (where possible): Start location: f0 0: f0 -> f4 : A'=0, [], cost: 1 25: f4 -> [12] : A'=-1+B, C'=-1+B-A, D'=free, [ B>=2+A && 0>=1+free ], cost: 2+B-A 26: f4 -> [12] : A'=-1+B, C'=-1+B-A, D'=free_1, [ B>=2+A && free_1>=1 ], cost: 2+B-A 27: f4 -> [12] : [], cost: 0 17: [12] -> [6] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 18: [12] -> [7] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 19: [12] -> [8] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 21: [12] -> [9] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 22: [12] -> [10] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 23: [12] -> [11] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A Applied chaining over branches and pruning: Start location: f0 28: f0 -> [12] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 29: f0 -> [12] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 30: f0 -> [12] : A'=0, [], cost: 1 17: [12] -> [6] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 18: [12] -> [7] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 19: [12] -> [8] : A'=B, C'=-1+B-A, D'=free, [ B>=1+A && B>=2+A && 0>=1+free ], cost: B-A 21: [12] -> [9] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 22: [12] -> [10] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A 23: [12] -> [11] : A'=B, C'=-1+B-A, D'=free_1, [ B>=1+A && B>=2+A && free_1>=1 ], cost: B-A Applied chaining over branches and pruning: Start location: f0 43: f0 -> [6] : A'=B, C'=-1+B, D'=free, [ B>=1 && B>=2 && 0>=1+free ], cost: 1+B 44: f0 -> [7] : A'=B, C'=-1+B, D'=free, [ B>=1 && B>=2 && 0>=1+free ], cost: 1+B 45: f0 -> [8] : A'=B, C'=-1+B, D'=free, [ B>=1 && B>=2 && 0>=1+free ], cost: 1+B 46: f0 -> [9] : A'=B, C'=-1+B, D'=free_1, [ B>=1 && B>=2 && free_1>=1 ], cost: 1+B 47: f0 -> [10] : A'=B, C'=-1+B, D'=free_1, [ B>=1 && B>=2 && free_1>=1 ], cost: 1+B 48: f0 -> [11] : A'=B, C'=-1+B, D'=free_1, [ B>=1 && B>=2 && free_1>=1 ], cost: 1+B 31: f0 -> [13] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 32: f0 -> [14] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 33: f0 -> [15] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 34: f0 -> [16] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 35: f0 -> [17] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 36: f0 -> [18] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 37: f0 -> [19] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 38: f0 -> [20] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 39: f0 -> [21] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 40: f0 -> [22] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 41: f0 -> [23] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 42: f0 -> [24] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B Final control flow graph problem, now checking costs for infinitely many models: Start location: f0 43: f0 -> [6] : A'=B, C'=-1+B, D'=free, [ B>=1 && B>=2 && 0>=1+free ], cost: 1+B 44: f0 -> [7] : A'=B, C'=-1+B, D'=free, [ B>=1 && B>=2 && 0>=1+free ], cost: 1+B 45: f0 -> [8] : A'=B, C'=-1+B, D'=free, [ B>=1 && B>=2 && 0>=1+free ], cost: 1+B 46: f0 -> [9] : A'=B, C'=-1+B, D'=free_1, [ B>=1 && B>=2 && free_1>=1 ], cost: 1+B 47: f0 -> [10] : A'=B, C'=-1+B, D'=free_1, [ B>=1 && B>=2 && free_1>=1 ], cost: 1+B 48: f0 -> [11] : A'=B, C'=-1+B, D'=free_1, [ B>=1 && B>=2 && free_1>=1 ], cost: 1+B 31: f0 -> [13] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 32: f0 -> [14] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 33: f0 -> [15] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 34: f0 -> [16] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 35: f0 -> [17] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 36: f0 -> [18] : A'=-1+B, C'=-1+B, D'=free, [ B>=2 && 0>=1+free ], cost: 3+B 37: f0 -> [19] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 38: f0 -> [20] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 39: f0 -> [21] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 40: f0 -> [22] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 41: f0 -> [23] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B 42: f0 -> [24] : A'=-1+B, C'=-1+B, D'=free_1, [ B>=2 && free_1>=1 ], cost: 3+B Computing complexity for remaining 18 transitions. Found configuration with infinitely models for cost: 1+B and guard: B>=1 && B>=2 && 0>=1+free: B: Pos, free: Neg Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=1 && B>=2 && 0>=1+free Final Cost: 1+B 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),?)