Trying to load file: main.koat Initial Control flow graph problem: Start location: start0 0: start -> stop : [ 0>=1+A && B==C && D==A ], cost: 1 1: start -> stop : [ 0>=1+C && B==C && D==A ], cost: 1 2: start -> stop : [ A>=0 && 2+A>=C && C>=0 && 2+C>=A && B==C && D==A ], cost: 1 3: start -> lbl81 : D'=1+D, [ A>=0 && C>=3+A && B==C && D==A ], cost: 1 4: start -> lbl91 : B'=1+B, [ A>=3+C && C>=0 && B==C && D==A ], cost: 1 5: lbl81 -> stop : [ C>=3+A && A>=0 && 2+D==C && B==C ], cost: 1 6: lbl81 -> lbl81 : D'=1+D, [ C>=3+D && D>=1+A && A>=0 && C>=2+D && B==C ], cost: 1 7: lbl81 -> lbl91 : B'=1+B, [ D>=3+C && D>=1+A && A>=0 && C>=2+D && B==C ], cost: 1 8: lbl91 -> stop : [ A>=3+C && C>=0 && 2+B==A && D==A ], cost: 1 9: lbl91 -> lbl81 : D'=1+D, [ B>=3+A && A>=2+B && B>=1+C && C>=0 && D==A ], cost: 1 10: lbl91 -> lbl91 : B'=1+B, [ A>=3+B && A>=2+B && B>=1+C && C>=0 && D==A ], cost: 1 11: start0 -> start : B'=C, D'=A, [], cost: 1 Simplified the transitions: Start location: start0 3: start -> lbl81 : D'=1+D, [ A>=0 && C>=3+A && B==C && D==A ], cost: 1 4: start -> lbl91 : B'=1+B, [ A>=3+C && C>=0 && B==C && D==A ], cost: 1 6: lbl81 -> lbl81 : D'=1+D, [ C>=3+D && D>=1+A && A>=0 && B==C ], cost: 1 7: lbl81 -> lbl91 : B'=1+B, [ D>=3+C && D>=1+A && A>=0 && C>=2+D && B==C ], cost: 1 9: lbl91 -> lbl81 : D'=1+D, [ B>=3+A && A>=2+B && B>=1+C && C>=0 && D==A ], cost: 1 10: lbl91 -> lbl91 : B'=1+B, [ A>=3+B && B>=1+C && C>=0 && D==A ], cost: 1 11: start0 -> start : B'=C, D'=A, [], cost: 1 Eliminating 1 self-loops for location lbl81 Self-Loop 6 has the metering function: -2+C-D, resulting in the new transition 12. Removing the self-loops: 6. Eliminating 1 self-loops for location lbl91 Self-Loop 10 has the metering function: -2-B+A, resulting in the new transition 13. Removing the self-loops: 10. Removed all Self-loops using metering functions (where possible): Start location: start0 3: start -> lbl81 : D'=1+D, [ A>=0 && C>=3+A && B==C && D==A ], cost: 1 4: start -> lbl91 : B'=1+B, [ A>=3+C && C>=0 && B==C && D==A ], cost: 1 12: lbl81 -> [5] : D'=-2+C, [ C>=3+D && D>=1+A && A>=0 && B==C ], cost: -2+C-D 13: lbl91 -> [6] : B'=-2+A, [ A>=3+B && B>=1+C && C>=0 && D==A ], cost: -2-B+A 11: start0 -> start : B'=C, D'=A, [], cost: 1 7: [5] -> lbl91 : B'=1+B, [ D>=3+C && D>=1+A && A>=0 && C>=2+D && B==C ], cost: 1 9: [6] -> lbl81 : D'=1+D, [ B>=3+A && A>=2+B && B>=1+C && C>=0 && D==A ], cost: 1 Applied chaining over branches and pruning: Start location: start0 16: lbl81 -> [7] : D'=-2+C, [ C>=3+D && D>=1+A && A>=0 && B==C ], cost: -2+C-D 17: lbl91 -> [8] : B'=-2+A, [ A>=3+B && B>=1+C && C>=0 && D==A ], cost: -2-B+A 14: start0 -> lbl81 : B'=C, D'=1+A, [ A>=0 && C>=3+A && C==C && A==A ], cost: 2 15: start0 -> lbl91 : B'=1+C, D'=A, [ A>=3+C && C>=0 && C==C && A==A ], cost: 2 Applied simple chaining: Start location: start0 14: start0 -> [7] : B'=C, D'=-2+C, [ A>=0 && C>=3+A && C==C && A==A && C>=4+A && 1+A>=1+A && A>=0 && C==C ], cost: -1+C-A 15: start0 -> [8] : B'=-2+A, D'=A, [ A>=3+C && C>=0 && C==C && A==A && A>=4+C && 1+C>=1+C && C>=0 && A==A ], cost: -1-C+A Final control flow graph problem, now checking costs for infinitely many models: Start location: start0 14: start0 -> [7] : B'=C, D'=-2+C, [ A>=0 && C>=3+A && C==C && A==A && C>=4+A && 1+A>=1+A && A>=0 && C==C ], cost: -1+C-A 15: start0 -> [8] : B'=-2+A, D'=A, [ A>=3+C && C>=0 && C==C && A==A && A>=4+C && 1+C>=1+C && C>=0 && A==A ], cost: -1-C+A Computing complexity for remaining 2 transitions. Found configuration with infinitely models for cost: -1+C-A and guard: A>=0 && C>=3+A && C==C && A==A && C>=4+A && 1+A>=1+A && A>=0 && C==C: C: Pos, A: Pos, where: C > A Found new complexity n^1, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: A>=0 && C>=3+A && C==C && A==A && C>=4+A && 1+A>=1+A && A>=0 && C==C Final Cost: -1+C-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),?)