MAYBE Initial complexity problem: 1: T: (Comp: ?, Cost: 1) f2(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f2(Ar_0 + 1, Fresh_11, Fresh_11, Ar_3, Ar_4, Ar_5)) [ Fresh_11 >= 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f2(Ar_0 + 1, Fresh_10, Fresh_10, Ar_3, Ar_4, Ar_5)) [ 0 >= Fresh_10 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f0(Ar_0, 0, 0, Fresh_9, Ar_4, Ar_5)) (Comp: ?, Cost: 1) f3(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f2(Ar_0 + 1, Fresh_8, Fresh_8, Ar_3, Ar_4, Ar_5)) [ Fresh_8 >= 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f3(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f2(Ar_0 + 1, Fresh_7, Fresh_7, Ar_3, Ar_4, Ar_5)) [ 0 >= Fresh_7 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f3(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f0(Ar_0, 0, 0, Fresh_6, Ar_4, Ar_5)) (Comp: ?, Cost: 1) f4(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f2(Fresh_4 + 1, Fresh_5, Fresh_5, Ar_3, Fresh_4, Fresh_4)) [ Fresh_5 >= 1 /\ Fresh_4 >= 1 ] (Comp: ?, Cost: 1) f4(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f2(Fresh_2 + 1, Fresh_3, Fresh_3, Ar_3, Fresh_2, Fresh_2)) [ 0 >= Fresh_3 + 1 /\ Fresh_2 >= 1 ] (Comp: ?, Cost: 1) f4(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f0(Fresh_0, 0, 0, Fresh_1, Fresh_0, Fresh_0)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5) -> Com_1(f4(Ar_0, Ar_1, Ar_2, Ar_3, Ar_4, Ar_5)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Slicing away variables that do not contribute to conditions from problem 1 leaves variables [Ar_0]. We thus obtain the following problem: 2: T: (Comp: 1, Cost: 0) koat_start(Ar_0) -> Com_1(f4(Ar_0)) [ 0 <= 0 ] (Comp: ?, Cost: 1) f4(Ar_0) -> Com_1(f0(Fresh_0)) (Comp: ?, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_2 + 1)) [ 0 >= Fresh_3 + 1 /\ Fresh_2 >= 1 ] (Comp: ?, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_4 + 1)) [ Fresh_5 >= 1 /\ Fresh_4 >= 1 ] (Comp: ?, Cost: 1) f3(Ar_0) -> Com_1(f0(Ar_0)) (Comp: ?, Cost: 1) f3(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ 0 >= Fresh_7 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f3(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Fresh_8 >= 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f0(Ar_0)) (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ 0 >= Fresh_10 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Fresh_11 >= 1 /\ Ar_0 >= 1 ] start location: koat_start leaf cost: 0 Testing for reachability in the complexity graph removes the following transitions from problem 2: f3(Ar_0) -> Com_1(f0(Ar_0)) f3(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ 0 >= Fresh_7 + 1 /\ Ar_0 >= 1 ] f3(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Fresh_8 >= 1 /\ Ar_0 >= 1 ] We thus obtain the following problem: 3: T: (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Fresh_11 >= 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ 0 >= Fresh_10 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f0(Ar_0)) (Comp: ?, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_4 + 1)) [ Fresh_5 >= 1 /\ Fresh_4 >= 1 ] (Comp: ?, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_2 + 1)) [ 0 >= Fresh_3 + 1 /\ Fresh_2 >= 1 ] (Comp: ?, Cost: 1) f4(Ar_0) -> Com_1(f0(Fresh_0)) (Comp: 1, Cost: 0) koat_start(Ar_0) -> Com_1(f4(Ar_0)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Repeatedly propagating knowledge in problem 3 produces the following problem: 4: T: (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Fresh_11 >= 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ 0 >= Fresh_10 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f0(Ar_0)) (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_4 + 1)) [ Fresh_5 >= 1 /\ Fresh_4 >= 1 ] (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_2 + 1)) [ 0 >= Fresh_3 + 1 /\ Fresh_2 >= 1 ] (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f0(Fresh_0)) (Comp: 1, Cost: 0) koat_start(Ar_0) -> Com_1(f4(Ar_0)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 A polynomial rank function with Pol(f2) = 1 Pol(f0) = 0 Pol(f4) = 1 Pol(koat_start) = 1 orients all transitions weakly and the transition f2(Ar_0) -> Com_1(f0(Ar_0)) strictly and produces the following problem: 5: T: (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Fresh_11 >= 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ 0 >= Fresh_10 + 1 /\ Ar_0 >= 1 ] (Comp: 1, Cost: 1) f2(Ar_0) -> Com_1(f0(Ar_0)) (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_4 + 1)) [ Fresh_5 >= 1 /\ Fresh_4 >= 1 ] (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_2 + 1)) [ 0 >= Fresh_3 + 1 /\ Fresh_2 >= 1 ] (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f0(Fresh_0)) (Comp: 1, Cost: 0) koat_start(Ar_0) -> Com_1(f4(Ar_0)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Applied AI with 'oct' on problem 5 to obtain the following invariants: For symbol f2: X_1 - 2 >= 0 This yielded the following problem: 6: T: (Comp: 1, Cost: 0) koat_start(Ar_0) -> Com_1(f4(Ar_0)) [ 0 <= 0 ] (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f0(Fresh_0)) (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_2 + 1)) [ 0 >= Fresh_3 + 1 /\ Fresh_2 >= 1 ] (Comp: 1, Cost: 1) f4(Ar_0) -> Com_1(f2(Fresh_4 + 1)) [ Fresh_5 >= 1 /\ Fresh_4 >= 1 ] (Comp: 1, Cost: 1) f2(Ar_0) -> Com_1(f0(Ar_0)) [ Ar_0 - 2 >= 0 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Ar_0 - 2 >= 0 /\ 0 >= Fresh_10 + 1 /\ Ar_0 >= 1 ] (Comp: ?, Cost: 1) f2(Ar_0) -> Com_1(f2(Ar_0 + 1)) [ Ar_0 - 2 >= 0 /\ Fresh_11 >= 1 /\ Ar_0 >= 1 ] start location: koat_start leaf cost: 0 Complexity upper bound ? Time: 0.993 sec (SMT: 0.958 sec)