Trying to load file: main.koat Initial Control flow graph problem: Start location: f1 1: f2 -> f2 : A'=1, B'=2, [ 1>=free_1 && B==1 && A==1 ], cost: 1 2: f2 -> f2 : A'=1+A, B'=2, [ A>=2 && 1>=free_2 && B==1 ], cost: 1 3: f2 -> f2 : A'=1+A, B'=2, [ 0>=A && 1>=free_3 && B==1 ], cost: 1 4: f2 -> f2 : A'=1, B'=1+B, [ B>=2 && 1>=B && A==1 ], cost: 1 5: f2 -> f2 : A'=1, B'=1+B, [ 0>=B && 1>=B && A==1 ], cost: 1 6: f2 -> f2 : A'=1+A, B'=1+B, [ 1>=B && A>=2 && B>=2 ], cost: 1 7: f2 -> f2 : A'=1+A, B'=1+B, [ 1>=B && A>=2 && 0>=B ], cost: 1 8: f2 -> f2 : A'=1+A, B'=1+B, [ 1>=B && 0>=A && B>=2 ], cost: 1 9: f2 -> f2 : A'=1+A, B'=1+B, [ 1>=B && 0>=A && 0>=B ], cost: 1 10: f2 -> f2 : A'=1, B'=1+B, [ B>=2 && 2>=free_4 && A==1 ], cost: 1 11: f2 -> f2 : A'=1, B'=1+B, [ B>=2 && 0>=B && 2>=free_5 && A==1 ], cost: 1 12: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && A==2 ], cost: 1 13: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && 0>=B && A==2 ], cost: 1 14: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && 2>=A && 0>=A ], cost: 1 15: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && 2>=A && 0>=A && 0>=B ], cost: 1 0: f2 -> f300 : C'=free, [ A>=3 && B>=2 ], cost: 1 16: f1 -> f2 : [], cost: 1 Simplified the transitions: Start location: f1 1: f2 -> f2 : A'=1, B'=2, [ B==1 && A==1 ], cost: 1 2: f2 -> f2 : A'=1+A, B'=2, [ A>=2 && B==1 ], cost: 1 3: f2 -> f2 : A'=1+A, B'=2, [ 0>=A && B==1 ], cost: 1 4: f2 -> f2 : A'=1, B'=1+B, [ B>=2 && 1>=B && A==1 ], cost: 1 5: f2 -> f2 : A'=1, B'=1+B, [ 0>=B && A==1 ], cost: 1 6: f2 -> f2 : A'=1+A, B'=1+B, [ 1>=B && A>=2 && B>=2 ], cost: 1 7: f2 -> f2 : A'=1+A, B'=1+B, [ A>=2 && 0>=B ], cost: 1 8: f2 -> f2 : A'=1+A, B'=1+B, [ 1>=B && 0>=A && B>=2 ], cost: 1 9: f2 -> f2 : A'=1+A, B'=1+B, [ 0>=A && 0>=B ], cost: 1 10: f2 -> f2 : A'=1, B'=1+B, [ B>=2 && A==1 ], cost: 1 11: f2 -> f2 : A'=1, B'=1+B, [ B>=2 && 0>=B && A==1 ], cost: 1 12: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && A==2 ], cost: 1 13: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && 0>=B && A==2 ], cost: 1 14: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && 0>=A ], cost: 1 15: f2 -> f2 : A'=1+A, B'=1+B, [ B>=2 && 0>=A && 0>=B ], cost: 1 16: f1 -> f2 : [], cost: 1 Eliminating 15 self-loops for location f2 Self-Loop 1 has the metering function: 2-B, resulting in the new transition 17. Self-Loop 2 has the metering function: 2-B, resulting in the new transition 18. Self-Loop 3 has the metering function: 1-B, resulting in the new transition 19. Self-Loop 4 has unbounded runtime, resulting in the new transition 20. Self-Loop 5 has the metering function: 1-B, resulting in the new transition 21. Self-Loop 6 has unbounded runtime, resulting in the new transition 22. Self-Loop 7 has the metering function: 1-B, resulting in the new transition 23. Self-Loop 8 has unbounded runtime, resulting in the new transition 24. Self-Loop 10 has unbounded runtime, resulting in the new transition 28. Self-Loop 11 has unbounded runtime, resulting in the new transition 29. Self-Loop 12 has the metering function: 3-A, resulting in the new transition 30. Self-Loop 13 has unbounded runtime, resulting in the new transition 31. Self-Loop 14 has the metering function: 1-A, resulting in the new transition 32. Self-Loop 15 has unbounded runtime, resulting in the new transition 33. Self-Loop 25 has the metering function: 1-A, resulting in the new transition 34. Self-Loop 26 has the metering function: 1-B, resulting in the new transition 35. Found this metering function when nesting loops: meter, Found this metering function when nesting loops: meter_1, Found this metering function when nesting loops: meter_2, Found this metering function when nesting loops: meter_3, Found this metering function when nesting loops: meter_4, Found this metering function when nesting loops: meter_5, Found this metering function when nesting loops: -A, Found this metering function when nesting loops: -A, Removing the self-loops: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 25 26. Adding an epsilon transition (to model nonexecution of the loops): 36. Removed all Self-loops using metering functions (where possible): Start location: f1 17: f2 -> [3] : A'=1, B'=2, [ B==1 && A==1 ], cost: 2-B 18: f2 -> [3] : A'=2-B+A, B'=2, [ A>=2 && B==1 ], cost: 2-B 19: f2 -> [3] : A'=1-B+A, B'=2, [ 0>=A && B==1 ], cost: 1-B 20: f2 -> [3] : [ B>=2 && 1>=B && A==1 ], cost: INF 21: f2 -> [3] : A'=1, B'=1, [ 0>=B && A==1 ], cost: 1-B 22: f2 -> [3] : [ 1>=B && A>=2 && B>=2 ], cost: INF 23: f2 -> [3] : A'=1-B+A, B'=1, [ A>=2 && 0>=B ], cost: 1-B 24: f2 -> [3] : [ 1>=B && 0>=A && B>=2 ], cost: INF 27: f2 -> [3] : A'=1+A, B'=1+B, [ 0>=A && 0>=B ], cost: 1 28: f2 -> [3] : [ B>=2 && A==1 ], cost: INF 29: f2 -> [3] : [ B>=2 && 0>=B && A==1 ], cost: INF 30: f2 -> [3] : A'=3, B'=3+B-A, [ B>=2 && A==2 ], cost: 3-A 31: f2 -> [3] : [ B>=2 && 0>=B && A==2 ], cost: INF 32: f2 -> [3] : A'=1, B'=1+B-A, [ B>=2 && 0>=A ], cost: 1-A 33: f2 -> [3] : [ B>=2 && 0>=A && 0>=B ], cost: INF 34: f2 -> [3] : A'=1, B'=1+B-A, [ 0>=A && 0>=B && A>B ], cost: 1-A 35: f2 -> [3] : A'=1-B+A, B'=1, [ 0>=A && 0>=B && B>A ], cost: 1-B 36: f2 -> [3] : [], cost: 0 16: f1 -> f2 : [], cost: 1 Applied chaining over branches and pruning: Start location: f1 40: f1 -> [3] : A'=1, B'=1, [ 0>=B && A==1 ], cost: 2-B 43: f1 -> [3] : [ B>=2 && A==1 ], cost: INF 45: f1 -> [3] : A'=1, B'=1+B-A, [ B>=2 && 0>=A ], cost: 2-A 46: f1 -> [3] : A'=1, B'=1+B-A, [ 0>=A && 0>=B && A>B ], cost: 2-A 47: f1 -> [3] : A'=1-B+A, B'=1, [ 0>=A && 0>=B && B>A ], cost: 2-B Final control flow graph problem, now checking costs for infinitely many models: Start location: f1 40: f1 -> [3] : A'=1, B'=1, [ 0>=B && A==1 ], cost: 2-B 43: f1 -> [3] : [ B>=2 && A==1 ], cost: INF 45: f1 -> [3] : A'=1, B'=1+B-A, [ B>=2 && 0>=A ], cost: 2-A 46: f1 -> [3] : A'=1, B'=1+B-A, [ 0>=A && 0>=B && A>B ], cost: 2-A 47: f1 -> [3] : A'=1-B+A, B'=1, [ 0>=A && 0>=B && B>A ], cost: 2-B Computing complexity for remaining 5 transitions. Found configuration with infinitely models for cost: 2-B and guard: 0>=B && A==1: B: Neg, A: Both Found new complexity n^1, because: Found infinity configuration. Found new complexity INF, because: INF sat. The final runtime is determined by this resulting transition: Final Guard: B>=2 && A==1 Final Cost: INF Obtained the following complexity w.r.t. the length of the input n: Complexity class: INF Complexity value: INF WORST_CASE(INF,?)