Trying to load file: main.koat Initial Control flow graph problem: Start location: start 0: f0 -> f12 : C'=0, D'=B, [ A>=1+B ], cost: 1 21: f0 -> f58 : [ B>=A ], cost: 1 1: f12 -> f12 : E'=1+E, F'=free_1, G'=free, [ A>=E && free>=free_1 ], cost: 1 2: f12 -> f12 : C'=free_4, D'=E, E'=1+E, F'=free_3, G'=free_2, [ A>=E && free_3>=1+free_2 ], cost: 1 19: f12 -> f22 : [ B>=1+D && E>=1+A ], cost: 1 20: f12 -> f22 : [ D>=1+B && E>=1+A ], cost: 1 18: f12 -> f35 : D'=B, [ E>=1+A && B==D ], cost: 1 3: f22 -> f22 : E'=1+E, H'=free_5, [ A>=E ], cost: 1 17: f22 -> f29 : [ E>=1+A ], cost: 1 4: f29 -> f29 : E'=1+E, H'=free_6, [ A>=E ], cost: 1 16: f29 -> f35 : [ E>=1+A ], cost: 1 12: f35 -> f0 : B'=1+B, C'=0, [ C==0 ], cost: 1 5: f35 -> f37 : [ 0>=1+C ], cost: 1 6: f35 -> f37 : [ C>=1 ], cost: 1 15: f37 -> f0 : B'=1+B, [ D>=1+A ], cost: 1 11: f37 -> f37 : D'=1+D, H'=0, [ A>=D ], cost: 1 7: f37 -> f43 : H'=free_7, [ A>=D && 0>=1+free_8 ], cost: 1 8: f37 -> f43 : H'=free_9, [ A>=D && free_10>=1 ], cost: 1 9: f43 -> f43 : E'=1+E, [ A>=E ], cost: 1 14: f43 -> f48 : [ E>=1+A ], cost: 1 13: f48 -> f37 : D'=1+D, [ E>=1+A ], cost: 1 10: f48 -> f48 : E'=1+E, [ A>=E ], cost: 1 22: start -> f0 : [], cost: 1 Simplified the transitions: Start location: start 0: f0 -> f12 : C'=0, D'=B, [ A>=1+B ], cost: 1 1: f12 -> f12 : E'=1+E, F'=free_1, G'=free, [ A>=E && free>=free_1 ], cost: 1 2: f12 -> f12 : C'=free_4, D'=E, E'=1+E, F'=free_3, G'=free_2, [ A>=E && free_3>=1+free_2 ], cost: 1 19: f12 -> f22 : [ B>=1+D && E>=1+A ], cost: 1 20: f12 -> f22 : [ D>=1+B && E>=1+A ], cost: 1 18: f12 -> f35 : D'=B, [ E>=1+A && B==D ], cost: 1 3: f22 -> f22 : E'=1+E, H'=free_5, [ A>=E ], cost: 1 17: f22 -> f29 : [ E>=1+A ], cost: 1 4: f29 -> f29 : E'=1+E, H'=free_6, [ A>=E ], cost: 1 16: f29 -> f35 : [ E>=1+A ], cost: 1 12: f35 -> f0 : B'=1+B, C'=0, [ C==0 ], cost: 1 5: f35 -> f37 : [ 0>=1+C ], cost: 1 6: f35 -> f37 : [ C>=1 ], cost: 1 15: f37 -> f0 : B'=1+B, [ D>=1+A ], cost: 1 11: f37 -> f37 : D'=1+D, H'=0, [ A>=D ], cost: 1 7: f37 -> f43 : H'=free_7, [ A>=D ], cost: 1 8: f37 -> f43 : H'=free_9, [ A>=D ], cost: 1 9: f43 -> f43 : E'=1+E, [ A>=E ], cost: 1 14: f43 -> f48 : [ E>=1+A ], cost: 1 13: f48 -> f37 : D'=1+D, [ E>=1+A ], cost: 1 10: f48 -> f48 : E'=1+E, [ A>=E ], cost: 1 22: start -> f0 : [], cost: 1 Eliminating 2 self-loops for location f12 Self-Loop 1 has the metering function: 1-E+A, resulting in the new transition 23. Self-Loop 2 has the metering function: 1-E+A, resulting in the new transition 24. Removing the self-loops: 1 2. Eliminating 1 self-loops for location f22 Self-Loop 3 has the metering function: 1-E+A, resulting in the new transition 25. Removing the self-loops: 3. Eliminating 1 self-loops for location f29 Self-Loop 4 has the metering function: 1-E+A, resulting in the new transition 26. Removing the self-loops: 4. Eliminating 1 self-loops for location f37 Self-Loop 11 has the metering function: 1-D+A, resulting in the new transition 27. Removing the self-loops: 11. Eliminating 1 self-loops for location f43 Self-Loop 9 has the metering function: 1-E+A, resulting in the new transition 28. Removing the self-loops: 9. Eliminating 1 self-loops for location f48 Self-Loop 10 has the metering function: 1-E+A, resulting in the new transition 29. Removing the self-loops: 10. Removed all Self-loops using metering functions (where possible): Start location: start 0: f0 -> f12 : C'=0, D'=B, [ A>=1+B ], cost: 1 23: f12 -> [10] : E'=1+A, F'=free_1, G'=free, [ A>=E && free>=free_1 ], cost: 1-E+A 24: f12 -> [10] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=E && free_3>=1+free_2 ], cost: 1-E+A 25: f22 -> [11] : E'=1+A, H'=free_5, [ A>=E ], cost: 1-E+A 26: f29 -> [12] : E'=1+A, H'=free_6, [ A>=E ], cost: 1-E+A 12: f35 -> f0 : B'=1+B, C'=0, [ C==0 ], cost: 1 5: f35 -> f37 : [ 0>=1+C ], cost: 1 6: f35 -> f37 : [ C>=1 ], cost: 1 27: f37 -> [13] : D'=1+A, H'=0, [ A>=D ], cost: 1-D+A 28: f43 -> [14] : E'=1+A, [ A>=E ], cost: 1-E+A 29: f48 -> [15] : E'=1+A, [ A>=E ], cost: 1-E+A 22: start -> f0 : [], cost: 1 19: [10] -> f22 : [ B>=1+D && E>=1+A ], cost: 1 20: [10] -> f22 : [ D>=1+B && E>=1+A ], cost: 1 18: [10] -> f35 : D'=B, [ E>=1+A && B==D ], cost: 1 17: [11] -> f29 : [ E>=1+A ], cost: 1 16: [12] -> f35 : [ E>=1+A ], cost: 1 15: [13] -> f0 : B'=1+B, [ D>=1+A ], cost: 1 7: [13] -> f43 : H'=free_7, [ A>=D ], cost: 1 8: [13] -> f43 : H'=free_9, [ A>=D ], cost: 1 14: [14] -> f48 : [ E>=1+A ], cost: 1 13: [15] -> f37 : D'=1+D, [ E>=1+A ], cost: 1 Applied simple chaining: Start location: start 0: f0 -> f12 : C'=0, D'=B, [ A>=1+B ], cost: 1 23: f12 -> [10] : E'=1+A, F'=free_1, G'=free, [ A>=E && free>=free_1 ], cost: 1-E+A 24: f12 -> [10] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=E && free_3>=1+free_2 ], cost: 1-E+A 25: f22 -> f29 : E'=1+A, H'=free_5, [ A>=E && 1+A>=1+A ], cost: 2-E+A 26: f29 -> f35 : E'=1+A, H'=free_6, [ A>=E && 1+A>=1+A ], cost: 2-E+A 12: f35 -> f0 : B'=1+B, C'=0, [ C==0 ], cost: 1 5: f35 -> f37 : [ 0>=1+C ], cost: 1 6: f35 -> f37 : [ C>=1 ], cost: 1 27: f37 -> [13] : D'=1+A, H'=0, [ A>=D ], cost: 1-D+A 28: f43 -> f48 : E'=1+A, [ A>=E && 1+A>=1+A ], cost: 2-E+A 29: f48 -> f37 : D'=1+D, E'=1+A, [ A>=E && 1+A>=1+A ], cost: 2-E+A 22: start -> f0 : [], cost: 1 19: [10] -> f22 : [ B>=1+D && E>=1+A ], cost: 1 20: [10] -> f22 : [ D>=1+B && E>=1+A ], cost: 1 18: [10] -> f35 : D'=B, [ E>=1+A && B==D ], cost: 1 15: [13] -> f0 : B'=1+B, [ D>=1+A ], cost: 1 7: [13] -> f43 : H'=free_7, [ A>=D ], cost: 1 8: [13] -> f43 : H'=free_9, [ A>=D ], cost: 1 Applied chaining over branches and pruning: Start location: start 30: f0 -> [10] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 2-E+A 31: f0 -> [10] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 2-E+A 12: f35 -> f0 : B'=1+B, C'=0, [ C==0 ], cost: 1 5: f35 -> f37 : [ 0>=1+C ], cost: 1 6: f35 -> f37 : [ C>=1 ], cost: 1 32: f37 -> f0 : B'=1+B, D'=1+A, H'=0, [ A>=D && 1+A>=1+A ], cost: 2-D+A 33: f37 -> [16] : D'=1+A, H'=0, [ A>=D ], cost: 1-D+A 34: f37 -> [17] : D'=1+A, H'=0, [ A>=D ], cost: 1-D+A 22: start -> f0 : [], cost: 1 18: [10] -> f35 : D'=B, [ E>=1+A && B==D ], cost: 1 Applied chaining over branches and pruning: Start location: start 35: f0 -> f35 : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 36: f0 -> [18] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 2-E+A 12: f35 -> f0 : B'=1+B, C'=0, [ C==0 ], cost: 1 37: f35 -> f0 : B'=1+B, D'=1+A, H'=0, [ 0>=1+C && A>=D && 1+A>=1+A ], cost: 3-D+A 40: f35 -> f0 : B'=1+B, D'=1+A, H'=0, [ C>=1 && A>=D && 1+A>=1+A ], cost: 3-D+A 38: f35 -> [16] : D'=1+A, H'=0, [ 0>=1+C && A>=D ], cost: 2-D+A 41: f35 -> [16] : D'=1+A, H'=0, [ C>=1 && A>=D ], cost: 2-D+A 39: f35 -> [17] : D'=1+A, H'=0, [ 0>=1+C && A>=D ], cost: 2-D+A 42: f35 -> [17] : D'=1+A, H'=0, [ C>=1 && A>=D ], cost: 2-D+A 22: start -> f0 : [], cost: 1 Applied chaining over branches and pruning: Start location: start 43: f0 -> f0 : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B && 0==0 ], cost: 4-E+A 36: f0 -> [18] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 2-E+A 44: f0 -> [19] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 45: f0 -> [20] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 46: f0 -> [21] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 47: f0 -> [22] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 48: f0 -> [23] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 49: f0 -> [24] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 22: start -> f0 : [], cost: 1 Eliminating 1 self-loops for location f0 Removing the self-loops: 43. Adding an epsilon transition (to model nonexecution of the loops): 51. Removed all Self-loops using metering functions (where possible): Start location: start 50: f0 -> [25] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 4-E+A 51: f0 -> [25] : [], cost: 0 22: start -> f0 : [], cost: 1 36: [25] -> [18] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 2-E+A 44: [25] -> [19] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 45: [25] -> [20] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 46: [25] -> [21] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 47: [25] -> [22] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 48: [25] -> [23] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 49: [25] -> [24] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A Applied chaining over branches and pruning: Start location: start 52: start -> [25] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 53: start -> [25] : [], cost: 1 36: [25] -> [18] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 2-E+A 44: [25] -> [19] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 45: [25] -> [20] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 46: [25] -> [21] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 47: [25] -> [22] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 48: [25] -> [23] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A 49: [25] -> [24] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 3-E+A Applied chaining over branches and pruning: Start location: start 61: start -> [18] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 3-E+A 62: start -> [19] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 63: start -> [20] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 64: start -> [21] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 65: start -> [22] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 66: start -> [23] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 67: start -> [24] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 54: start -> [26] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 55: start -> [27] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 56: start -> [28] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 57: start -> [29] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 58: start -> [30] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 59: start -> [31] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 60: start -> [32] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A Final control flow graph problem, now checking costs for infinitely many models: Start location: start 61: start -> [18] : C'=free_4, D'=A, E'=1+A, F'=free_3, G'=free_2, [ A>=1+B && A>=E && free_3>=1+free_2 ], cost: 3-E+A 62: start -> [19] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 63: start -> [20] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 64: start -> [21] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 65: start -> [22] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 66: start -> [23] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 67: start -> [24] : C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 && 1+A>=1+A && B==B ], cost: 4-E+A 54: start -> [26] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 55: start -> [27] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 56: start -> [28] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 57: start -> [29] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 58: start -> [30] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 59: start -> [31] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A 60: start -> [32] : B'=1+B, C'=0, D'=B, E'=1+A, F'=free_1, G'=free, [ A>=1+B && A>=E && free>=free_1 ], cost: 5-E+A Computing complexity for remaining 14 transitions. Found configuration with infinitely models for cost: 3-E+A and guard: A>=1+B && A>=E && free_3>=1+free_2: free_2: Pos, E: Pos, B: Pos, free_3: Pos, A: Pos, where: free_3 > free_2 A > E A > B Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: A>=1+B && A>=E && free_3>=1+free_2 Final Cost: 3-E+A 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),?)