Trying to load file: main.koat Initial Control flow graph problem: Start location: f3000 0: f11 -> f11 : B'=free_1, C'=B, D'=free, [ A>=0 && B>=1 ], cost: 1 1: f11 -> f11 : B'=free_3, C'=B, D'=free_2, [ A>=0 && 0>=1+B ], cost: 1 3: f11 -> f13 : B'=0, K'=free_5, [ A>=0 && B==0 ], cost: 1 4: f16 -> f11 : B'=free_7, C'=free_9, D'=free_6, K'=free_8, L'=J, M'=J, [ 1+G>=F && free_9>=1 && E>=0 ], cost: 1 5: f16 -> f11 : B'=free_11, C'=free_13, D'=free_10, K'=free_12, L'=J, M'=J, [ 1+G>=F && 0>=1+free_13 && E>=0 ], cost: 1 2: f16 -> f16 : G'=1+G, H'=free_4, Q'=free_4, J'=free_4, [ E>=0 && F>=2+G ], cost: 1 6: f3000 -> f16 : G'=1, H'=free_14, Q'=free_14, J'=free_14, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 ], cost: 1 7: f3000 -> f13 : B'=0, G'=0, J'=0, K'=free_16, L'=0, M'=0, N'=N-100*free_17, [ N>=100*free_17 && 99+100*free_17>=N && 1>=F ], cost: 1 Simplified the transitions: Start location: f3000 0: f11 -> f11 : B'=free_1, C'=B, D'=free, [ A>=0 && B>=1 ], cost: 1 1: f11 -> f11 : B'=free_3, C'=B, D'=free_2, [ A>=0 && 0>=1+B ], cost: 1 4: f16 -> f11 : B'=free_7, C'=free_9, D'=free_6, K'=free_8, L'=J, M'=J, [ 1+G>=F && free_9>=1 && E>=0 ], cost: 1 5: f16 -> f11 : B'=free_11, C'=free_13, D'=free_10, K'=free_12, L'=J, M'=J, [ 1+G>=F && 0>=1+free_13 && E>=0 ], cost: 1 2: f16 -> f16 : G'=1+G, H'=free_4, Q'=free_4, J'=free_4, [ E>=0 && F>=2+G ], cost: 1 6: f3000 -> f16 : G'=1, H'=free_14, Q'=free_14, J'=free_14, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 ], cost: 1 Eliminating 2 self-loops for location f11 Removing the self-loops: 0 1. Adding an epsilon transition (to model nonexecution of the loops): 10. Eliminating 1 self-loops for location f16 Self-Loop 2 has the metering function: -1+F-G, resulting in the new transition 11. Removing the self-loops: 2. Removed all Self-loops using metering functions (where possible): Start location: f3000 8: f11 -> [4] : B'=free_1, C'=B, D'=free, [ A>=0 && B>=1 ], cost: 1 9: f11 -> [4] : B'=free_3, C'=B, D'=free_2, [ A>=0 && 0>=1+B ], cost: 1 10: f11 -> [4] : [], cost: 0 11: f16 -> [5] : G'=-1+F, H'=free_4, Q'=free_4, J'=free_4, [ E>=0 && F>=2+G ], cost: -1+F-G 6: f3000 -> f16 : G'=1, H'=free_14, Q'=free_14, J'=free_14, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 ], cost: 1 4: [5] -> f11 : B'=free_7, C'=free_9, D'=free_6, K'=free_8, L'=J, M'=J, [ 1+G>=F && free_9>=1 && E>=0 ], cost: 1 5: [5] -> f11 : B'=free_11, C'=free_13, D'=free_10, K'=free_12, L'=J, M'=J, [ 1+G>=F && 0>=1+free_13 && E>=0 ], cost: 1 Applied simple chaining: Start location: f3000 8: f11 -> [4] : B'=free_1, C'=B, D'=free, [ A>=0 && B>=1 ], cost: 1 9: f11 -> [4] : B'=free_3, C'=B, D'=free_2, [ A>=0 && 0>=1+B ], cost: 1 10: f11 -> [4] : [], cost: 0 6: f3000 -> [5] : G'=-1+F, H'=free_4, Q'=free_4, J'=free_4, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 ], cost: -1+F 4: [5] -> f11 : B'=free_7, C'=free_9, D'=free_6, K'=free_8, L'=J, M'=J, [ 1+G>=F && free_9>=1 && E>=0 ], cost: 1 5: [5] -> f11 : B'=free_11, C'=free_13, D'=free_10, K'=free_12, L'=J, M'=J, [ 1+G>=F && 0>=1+free_13 && E>=0 ], cost: 1 Applied chaining over branches and pruning: Start location: f3000 12: f3000 -> f11 : B'=free_7, C'=free_9, D'=free_6, G'=-1+F, H'=free_4, Q'=free_4, J'=free_4, K'=free_8, L'=free_4, M'=free_4, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 && F>=F && free_9>=1 && E>=0 ], cost: F 13: f3000 -> f11 : B'=free_11, C'=free_13, D'=free_10, G'=-1+F, H'=free_4, Q'=free_4, J'=free_4, K'=free_12, L'=free_4, M'=free_4, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 && F>=F && 0>=1+free_13 && E>=0 ], cost: F Final control flow graph problem, now checking costs for infinitely many models: Start location: f3000 12: f3000 -> f11 : B'=free_7, C'=free_9, D'=free_6, G'=-1+F, H'=free_4, Q'=free_4, J'=free_4, K'=free_8, L'=free_4, M'=free_4, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 && F>=F && free_9>=1 && E>=0 ], cost: F 13: f3000 -> f11 : B'=free_11, C'=free_13, D'=free_10, G'=-1+F, H'=free_4, Q'=free_4, J'=free_4, K'=free_12, L'=free_4, M'=free_4, N'=N-100*free_15, [ N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 && F>=F && 0>=1+free_13 && E>=0 ], cost: F Computing complexity for remaining 2 transitions. Found configuration with infinitely models for cost: F and guard: N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 && F>=F && free_9>=1 && E>=0: N: Const, free_15: Const, E: Pos, free_9: Pos, F: Pos Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: N>=100*free_15 && 99+100*free_15>=N && F>=2 && E>=0 && F>=3 && F>=F && free_9>=1 && E>=0 Final Cost: F 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),?)