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