Trying to load file: main.koat Initial Control flow graph problem: Start location: f0 0: f6 -> f7 : [ 0>=1+A ], cost: 1 1: f6 -> f7 : [ A>=1 ], cost: 1 7: f6 -> f14 : A'=0, [ A==0 ], cost: 1 5: f7 -> f4 : D'=1+D, [ C>=D ], cost: 1 6: f7 -> f4 : D'=0, [ D>=1+C ], cost: 1 2: f0 -> f4 : D'=1+B, [ B>=0 && C>=B ], cost: 1 3: f4 -> f6 : A'=free, [ B>=1+D ], cost: 1 4: f4 -> f6 : A'=free_1, [ D>=1+B ], cost: 1 8: f4 -> f14 : D'=B, [ B==D ], cost: 1 Simplified the transitions: Start location: f0 0: f6 -> f7 : [ 0>=1+A ], cost: 1 1: f6 -> f7 : [ A>=1 ], cost: 1 5: f7 -> f4 : D'=1+D, [ C>=D ], cost: 1 6: f7 -> f4 : D'=0, [ D>=1+C ], cost: 1 2: f0 -> f4 : D'=1+B, [ B>=0 && C>=B ], cost: 1 3: f4 -> f6 : A'=free, [ B>=1+D ], cost: 1 4: f4 -> f6 : A'=free_1, [ D>=1+B ], cost: 1 Applied chaining over branches and pruning: Start location: f0 5: f7 -> f4 : D'=1+D, [ C>=D ], cost: 1 6: f7 -> f4 : D'=0, [ D>=1+C ], cost: 1 2: f0 -> f4 : D'=1+B, [ B>=0 && C>=B ], cost: 1 9: f4 -> f7 : A'=free, [ B>=1+D && 0>=1+free ], cost: 2 10: f4 -> f7 : A'=free, [ B>=1+D && free>=1 ], cost: 2 11: f4 -> f7 : A'=free_1, [ D>=1+B && 0>=1+free_1 ], cost: 2 12: f4 -> f7 : A'=free_1, [ D>=1+B && free_1>=1 ], cost: 2 Applied chaining over branches and pruning: Start location: f0 2: f0 -> f4 : D'=1+B, [ B>=0 && C>=B ], cost: 1 13: f4 -> f4 : A'=free, D'=1+D, [ B>=1+D && 0>=1+free && C>=D ], cost: 3 14: f4 -> f4 : A'=free, D'=0, [ B>=1+D && 0>=1+free && D>=1+C ], cost: 3 16: f4 -> f4 : A'=free, D'=0, [ B>=1+D && free>=1 && D>=1+C ], cost: 3 17: f4 -> f4 : A'=free_1, D'=1+D, [ D>=1+B && 0>=1+free_1 && C>=D ], cost: 3 18: f4 -> f4 : A'=free_1, D'=0, [ D>=1+B && 0>=1+free_1 && D>=1+C ], cost: 3 Eliminating 5 self-loops for location f4 Self-Loop 17 has the metering function: 1+C-D, resulting in the new transition 24. Found unbounded runtime when nesting loops, and nested parallel self-loops 25 (outer loop) and 24 (inner loop), obtaining the new transitions: 26, 27. Found this metering function when nesting loops: 1+C-D, Found unbounded runtime when nesting loops, Found unbounded runtime when nesting loops, Removing the self-loops: 13 14 16 17 18 25. Adding an epsilon transition (to model nonexecution of the loops): 28. Removed all Self-loops using metering functions (where possible): Start location: f0 2: f0 -> f4 : D'=1+B, [ B>=0 && C>=B ], cost: 1 21: f4 -> [5] : A'=free, D'=1+D, [ B>=1+D && 0>=1+free && C>=D ], cost: 3 22: f4 -> [5] : A'=free, D'=0, [ B>=1+D && 0>=1+free && D>=1+C ], cost: 3 23: f4 -> [5] : A'=free, D'=0, [ B>=1+D && free>=1 && D>=1+C ], cost: 3 24: f4 -> [5] : A'=free_1, D'=1+C, [ D>=1+B && 0>=1+free_1 && C>=D ], cost: 3+3*C-3*D 26: f4 -> [5] : [ D>=1+B && 0>=1+free_1 && D>=1+C && 0>=1+B && 0>=1+free_1 && C>=0 ], cost: INF 27: f4 -> [5] : A'=free_1, D'=1+C, [ D>=1+B && 0>=1+free_1 && C>=D && 1+C>=1+B && 0>=1+free_1 && 1+C>=1+C && 0>=1+B && 0>=1+free_1 && C>=0 ], cost: INF 28: f4 -> [5] : [], cost: 0 Applied chaining over branches and pruning: Start location: f0 29: f0 -> [5] : A'=free_1, D'=1+C, [ B>=0 && C>=B && 1+B>=1+B && 0>=1+free_1 && C>=1+B ], cost: 1-3*B+3*C Final control flow graph problem, now checking costs for infinitely many models: Start location: f0 29: f0 -> [5] : A'=free_1, D'=1+C, [ B>=0 && C>=B && 1+B>=1+B && 0>=1+free_1 && C>=1+B ], cost: 1-3*B+3*C Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 1-3*B+3*C and guard: B>=0 && C>=B && 1+B>=1+B && 0>=1+free_1 && C>=1+B: B: Pos, C: Pos, free_1: Neg, where: C > B Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: B>=0 && C>=B && 1+B>=1+B && 0>=1+free_1 && C>=1+B Final Cost: 1-3*B+3*C 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),?)