Trying to load file: main.koat Initial Control flow graph problem: Start location: start0 0: start -> a : [ A>=1 && B==A && C==D && E==F && G==H ], cost: 1 1: a -> d : C'=1, [ A>=1 && G==H && E==F && C==D && B==A ], cost: 1 2: d -> b : G'=1+C, [ A>=1+C && A>=C && A>=1 && C>=1 && B==A ], cost: 1 3: d -> halt : [ A>=1 && C==A && B==A ], cost: 1 4: b -> d : C'=1+C, [ A>=1+C && C>=1 && A>=C && G==1+A && B==A ], cost: 1 5: b -> c : E'=B, [ A>=G && 1+A>=G && A>=1+C && C>=1 && G>=1+C && B==A ], cost: 1 7: c -> b : G'=1+G, [ A>=E && A>=G && E>=1 && G>=1+E && C==E && B==A ], cost: 1 6: c -> c : E'=-1+E, [ E>=1+C && A>=E && A>=G && C>=1 && E>=C && G>=1+C && B==A ], cost: 1 8: start0 -> start : B'=A, C'=D, E'=F, G'=H, [], cost: 1 Simplified the transitions: Start location: start0 0: start -> a : [ A>=1 && B==A && C==D && E==F && G==H ], cost: 1 1: a -> d : C'=1, [ A>=1 && G==H && E==F && C==D && B==A ], cost: 1 2: d -> b : G'=1+C, [ A>=1+C && A>=1 && C>=1 && B==A ], cost: 1 4: b -> d : C'=1+C, [ A>=1+C && C>=1 && G==1+A && B==A ], cost: 1 5: b -> c : E'=B, [ A>=G && A>=1+C && C>=1 && G>=1+C && B==A ], cost: 1 7: c -> b : G'=1+G, [ A>=E && A>=G && E>=1 && G>=1+E && C==E && B==A ], cost: 1 6: c -> c : E'=-1+E, [ E>=1+C && A>=E && A>=G && C>=1 && G>=1+C && B==A ], cost: 1 8: start0 -> start : B'=A, C'=D, E'=F, G'=H, [], cost: 1 Eliminating 1 self-loops for location c Self-Loop 6 has the metering function: E-C, resulting in the new transition 9. Removing the self-loops: 6. Removed all Self-loops using metering functions (where possible): Start location: start0 0: start -> a : [ A>=1 && B==A && C==D && E==F && G==H ], cost: 1 1: a -> d : C'=1, [ A>=1 && G==H && E==F && C==D && B==A ], cost: 1 2: d -> b : G'=1+C, [ A>=1+C && A>=1 && C>=1 && B==A ], cost: 1 4: b -> d : C'=1+C, [ A>=1+C && C>=1 && G==1+A && B==A ], cost: 1 5: b -> c : E'=B, [ A>=G && A>=1+C && C>=1 && G>=1+C && B==A ], cost: 1 9: c -> [7] : E'=C, [ E>=1+C && A>=E && A>=G && C>=1 && G>=1+C && B==A ], cost: E-C 8: start0 -> start : B'=A, C'=D, E'=F, G'=H, [], cost: 1 7: [7] -> b : G'=1+G, [ A>=E && A>=G && E>=1 && G>=1+E && C==E && B==A ], cost: 1 Applied simple chaining: Start location: start0 2: d -> b : G'=1+C, [ A>=1+C && A>=1 && C>=1 && B==A ], cost: 1 4: b -> d : C'=1+C, [ A>=1+C && C>=1 && G==1+A && B==A ], cost: 1 5: b -> b : E'=C, G'=1+G, [ A>=G && A>=1+C && C>=1 && G>=1+C && B==A && B>=1+C && A>=B && A>=G && C>=1 && G>=1+C && B==A && A>=C && A>=G && C>=1 && G>=1+C && C==C && B==A ], cost: 2+B-C 8: start0 -> d : B'=A, C'=1, E'=F, G'=H, [ A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A ], cost: 3 Eliminating 1 self-loops for location b Self-Loop 5 has the metering function: 1-G+A, resulting in the new transition 10. Removing the self-loops: 5. Removed all Self-loops using metering functions (where possible): Start location: start0 2: d -> b : G'=1+C, [ A>=1+C && A>=1 && C>=1 && B==A ], cost: 1 10: b -> [8] : E'=C, G'=1+A, [ A>=G && A>=1+C && C>=1 && G>=1+C && B==A && B>=1+C ], cost: 2-B*(-1+G-A)+C*(-1+G-A)-2*G+2*A 8: start0 -> d : B'=A, C'=1, E'=F, G'=H, [ A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A ], cost: 3 4: [8] -> d : C'=1+C, [ A>=1+C && C>=1 && G==1+A && B==A ], cost: 1 Applied simple chaining: Start location: start0 2: d -> d : C'=1+C, E'=C, G'=1+A, [ A>=1+C && A>=1 && C>=1 && B==A && A>=1+C && A>=1+C && C>=1 && 1+C>=1+C && B==A && B>=1+C && A>=1+C && C>=1 && 1+A==1+A && B==A ], cost: 2+(C-A)*C-2*C-(C-A)*B+2*A 8: start0 -> d : B'=A, C'=1, E'=F, G'=H, [ A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A ], cost: 3 Eliminating 1 self-loops for location d Self-Loop 2 has the metering function: -B-C+2*A, resulting in the new transition 11. Removing the self-loops: 2. Removed all Self-loops using metering functions (where possible): Start location: start0 11: d -> [9] : C'=-B+2*A, E'=-1-B+2*A, G'=1+A, [ A>=1+C && A>=1 && C>=1 && B==A && B>=1+C ], cost: -1/2*(B+C-2*A)^2*A-B*(B+C-2*A)*A+3*(B+C-2*A)*C-19/6*B-1/3*(B+C-2*A)^3-(B+C-2*A)*C^2-3/2*(B+C-2*A)^2-1/2*B*(B+C-2*A)^2-19/6*C+(B+C-2*A)*C*A+(B+C-2*A)^2*C-5/2*(B+C-2*A)*A+B*(B+C-2*A)*C-1/2*B*(B+C-2*A)+19/3*A 8: start0 -> d : B'=A, C'=1, E'=F, G'=H, [ A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A ], cost: 3 Applied simple chaining: Start location: start0 8: start0 -> [9] : B'=A, C'=A, E'=-1+A, G'=1+A, [ A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A && A>=2 && A>=1 && 1>=1 && A==A && A>=2 ], cost: 11/6-(-1+A)^2*A+(-1+A)*A-1/2*(-1+A)^2+1/3*(-1+A)^3+(-1+A)*A^2+7/6*A Final control flow graph problem, now checking costs for infinitely many models: Start location: start0 8: start0 -> [9] : B'=A, C'=A, E'=-1+A, G'=1+A, [ A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A && A>=2 && A>=1 && 1>=1 && A==A && A>=2 ], cost: 11/6-(-1+A)^2*A+(-1+A)*A-1/2*(-1+A)^2+1/3*(-1+A)^3+(-1+A)*A^2+7/6*A Computing complexity for remaining 1 transitions. Found configuration with infinitely models for cost: 11/6-(-1+A)^2*A+(-1+A)*A-1/2*(-1+A)^2+1/3*(-1+A)^3+(-1+A)*A^2+7/6*A and guard: A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A && A>=2 && A>=1 && 1>=1 && A==A && A>=2: H: Both, F: Both, D: Both, A: Pos Found new complexity n^3, because: Found infinity configuration. The final runtime is determined by this resulting transition: Final Guard: A>=1 && A==A && D==D && F==F && H==H && A>=1 && H==H && F==F && D==D && A==A && A>=2 && A>=1 && 1>=1 && A==A && A>=2 Final Cost: 11/6-(-1+A)^2*A+(-1+A)*A-1/2*(-1+A)^2+1/3*(-1+A)^3+(-1+A)*A^2+7/6*A Obtained the following complexity w.r.t. the length of the input n: Complexity class: n^3 Complexity value: 3 WORST_CASE(Omega(n^3),?)