MAYBE Initial complexity problem: 1: T: (?, 1) f21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f29(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) [ 0 >= a ] (?, 1) f41(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f41(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) (?, 1) f43(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f46(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) (?, 1) f29(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f41(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) [ a >= 1 ] (?, 1) f29(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f41(a, b, p, 0, p, p, g, h, i, j, k, l, m, n, o) [ 0 >= a /\ b + 999 >= p ] (?, 1) f29(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f41(1, b, p, 0, p, p, g, h, i, j, k, l, m, n, o) [ 0 >= a /\ p >= b + 1000 ] (?, 1) f21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f29(0, p, p, d, e, f, 0, p, i, j, k, l, m, n, o) [ a >= 1 ] (1, 1) f0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f21(1, b, c, d, e, f, g, h, p, p, k, l, m, n, o) [ 0 >= p ] (1, 1) f0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f21(1, b, c, d, e, f, g, h, p, 0, 1, q, q, q, q) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> f41(1, b, c, d, e, f, g, h, p, 0, 1, q, q, q, q) [ p >= 1 /\ 0 >= q ] start location: f0 leaf cost: 0 Slicing away variables that do not contribute to conditions from problem 1 leaves variables [a, b]. We thus obtain the following problem: 2: T: (1, 1) f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q ] (1, 1) f0(a, b) -> f21(1, b) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b) -> f21(1, b) [ 0 >= p ] (?, 1) f21(a, b) -> f29(0, p) [ a >= 1 ] (?, 1) f29(a, b) -> f41(1, b) [ 0 >= a /\ p >= b + 1000 ] (?, 1) f29(a, b) -> f41(a, b) [ 0 >= a /\ b + 999 >= p ] (?, 1) f29(a, b) -> f41(a, b) [ a >= 1 ] (?, 1) f43(a, b) -> f46(a, b) (?, 1) f41(a, b) -> f41(a, b) (?, 1) f21(a, b) -> f29(a, b) [ 0 >= a ] start location: f0 leaf cost: 0 Repeatedly removing leaves of the complexity graph in problem 2 produces the following problem: 3: T: (1, 1) f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q ] (1, 1) f0(a, b) -> f21(1, b) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b) -> f21(1, b) [ 0 >= p ] (?, 1) f21(a, b) -> f29(0, p) [ a >= 1 ] (?, 1) f29(a, b) -> f41(1, b) [ 0 >= a /\ p >= b + 1000 ] (?, 1) f29(a, b) -> f41(a, b) [ 0 >= a /\ b + 999 >= p ] (?, 1) f29(a, b) -> f41(a, b) [ a >= 1 ] (?, 1) f41(a, b) -> f41(a, b) (?, 1) f21(a, b) -> f29(a, b) [ 0 >= a ] start location: f0 leaf cost: 1 Testing for reachability in the complexity graph removes the following transitions from problem 3: f29(a, b) -> f41(a, b) [ a >= 1 ] f21(a, b) -> f29(a, b) [ 0 >= a ] We thus obtain the following problem: 4: T: (?, 1) f29(a, b) -> f41(a, b) [ 0 >= a /\ b + 999 >= p ] (?, 1) f29(a, b) -> f41(1, b) [ 0 >= a /\ p >= b + 1000 ] (?, 1) f21(a, b) -> f29(0, p) [ a >= 1 ] (?, 1) f41(a, b) -> f41(a, b) (1, 1) f0(a, b) -> f21(1, b) [ 0 >= p ] (1, 1) f0(a, b) -> f21(1, b) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q ] start location: f0 leaf cost: 1 Repeatedly propagating knowledge in problem 4 produces the following problem: 5: T: (2, 1) f29(a, b) -> f41(a, b) [ 0 >= a /\ b + 999 >= p ] (2, 1) f29(a, b) -> f41(1, b) [ 0 >= a /\ p >= b + 1000 ] (2, 1) f21(a, b) -> f29(0, p) [ a >= 1 ] (?, 1) f41(a, b) -> f41(a, b) (1, 1) f0(a, b) -> f21(1, b) [ 0 >= p ] (1, 1) f0(a, b) -> f21(1, b) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q ] start location: f0 leaf cost: 1 Applied AI with 'oct' on problem 5 to obtain the following invariants: For symbol f21: -X_1 + 1 >= 0 /\ X_1 - 1 >= 0 For symbol f29: -X_1 >= 0 /\ X_1 >= 0 For symbol f41: -X_1 + 1 >= 0 /\ X_1 >= 0 This yielded the following problem: 6: T: (1, 1) f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q ] (1, 1) f0(a, b) -> f21(1, b) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b) -> f21(1, b) [ 0 >= p ] (?, 1) f41(a, b) -> f41(a, b) [ -a + 1 >= 0 /\ a >= 0 ] (2, 1) f21(a, b) -> f29(0, p) [ -a + 1 >= 0 /\ a - 1 >= 0 /\ a >= 1 ] (2, 1) f29(a, b) -> f41(1, b) [ -a >= 0 /\ a >= 0 /\ 0 >= a /\ p >= b + 1000 ] (2, 1) f29(a, b) -> f41(a, b) [ -a >= 0 /\ a >= 0 /\ 0 >= a /\ b + 999 >= p ] start location: f0 leaf cost: 1 By chaining the transition f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q ] with all transitions in problem 6, the following new transition is obtained: f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q /\ 0 >= 0 /\ 1 >= 0 ] We thus obtain the following problem: 7: T: (1, 2) f0(a, b) -> f41(1, b) [ p >= 1 /\ 0 >= q /\ 0 >= 0 /\ 1 >= 0 ] (1, 1) f0(a, b) -> f21(1, b) [ p >= 1 /\ q >= 1 ] (1, 1) f0(a, b) -> f21(1, b) [ 0 >= p ] (?, 1) f41(a, b) -> f41(a, b) [ -a + 1 >= 0 /\ a >= 0 ] (2, 1) f21(a, b) -> f29(0, p) [ -a + 1 >= 0 /\ a - 1 >= 0 /\ a >= 1 ] (2, 1) f29(a, b) -> f41(1, b) [ -a >= 0 /\ a >= 0 /\ 0 >= a /\ p >= b + 1000 ] (2, 1) f29(a, b) -> f41(a, b) [ -a >= 0 /\ a >= 0 /\ 0 >= a /\ b + 999 >= p ] start location: f0 leaf cost: 1 Complexity upper bound ? Time: 0.347 sec (SMT: 0.327 sec)