3.89/1.87 WORST_CASE(Omega(n^1), O(n^1)) 3.89/1.88 proof of /export/starexec/sandbox/benchmark/theBenchmark.koat 3.89/1.88 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.89/1.88 3.89/1.88 3.89/1.88 The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(n^1, n^1). 3.89/1.88 3.89/1.88 (0) CpxIntTrs 3.89/1.88 (1) Koat Proof [FINISHED, 17 ms] 3.89/1.88 (2) BOUNDS(1, n^1) 3.89/1.88 (3) Loat Proof [FINISHED, 217 ms] 3.89/1.88 (4) BOUNDS(n^1, INF) 3.89/1.88 3.89/1.88 3.89/1.88 ---------------------------------------- 3.89/1.88 3.89/1.88 (0) 3.89/1.88 Obligation: 3.89/1.88 Complexity Int TRS consisting of the following rules: 3.89/1.88 evalSimpleSinglestart(A, B) -> Com_1(evalSimpleSingleentryin(A, B)) :|: TRUE 3.89/1.88 evalSimpleSingleentryin(A, B) -> Com_1(evalSimpleSinglebb3in(0, B)) :|: TRUE 3.89/1.88 evalSimpleSinglebb3in(A, B) -> Com_1(evalSimpleSinglebbin(A, B)) :|: B >= A + 1 3.89/1.88 evalSimpleSinglebb3in(A, B) -> Com_1(evalSimpleSinglereturnin(A, B)) :|: A >= B 3.89/1.88 evalSimpleSinglebbin(A, B) -> Com_1(evalSimpleSinglebb3in(A + 1, B)) :|: TRUE 3.89/1.88 evalSimpleSinglereturnin(A, B) -> Com_1(evalSimpleSinglestop(A, B)) :|: TRUE 3.89/1.88 3.89/1.88 The start-symbols are:[evalSimpleSinglestart_2] 3.89/1.88 3.89/1.88 3.89/1.88 ---------------------------------------- 3.89/1.89 3.89/1.89 (1) Koat Proof (FINISHED) 3.89/1.89 YES(?, 2*ar_1 + 6) 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Initial complexity problem: 3.89/1.89 3.89/1.89 1: T: 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglestart(ar_0, ar_1) -> Com_1(evalSimpleSingleentryin(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSingleentryin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglebbin(ar_0, ar_1)) [ ar_1 >= ar_0 + 1 ] 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglereturnin(ar_0, ar_1)) [ ar_0 >= ar_1 ] 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebbin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(ar_0 + 1, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglereturnin(ar_0, ar_1) -> Com_1(evalSimpleSinglestop(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(evalSimpleSinglestart(ar_0, ar_1)) [ 0 <= 0 ] 3.89/1.89 3.89/1.89 start location: koat_start 3.89/1.89 3.89/1.89 leaf cost: 0 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Repeatedly propagating knowledge in problem 1 produces the following problem: 3.89/1.89 3.89/1.89 2: T: 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSinglestart(ar_0, ar_1) -> Com_1(evalSimpleSingleentryin(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSingleentryin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglebbin(ar_0, ar_1)) [ ar_1 >= ar_0 + 1 ] 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglereturnin(ar_0, ar_1)) [ ar_0 >= ar_1 ] 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebbin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(ar_0 + 1, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglereturnin(ar_0, ar_1) -> Com_1(evalSimpleSinglestop(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(evalSimpleSinglestart(ar_0, ar_1)) [ 0 <= 0 ] 3.89/1.89 3.89/1.89 start location: koat_start 3.89/1.89 3.89/1.89 leaf cost: 0 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 A polynomial rank function with 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglestart) = 2 3.89/1.89 3.89/1.89 Pol(evalSimpleSingleentryin) = 2 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglebb3in) = 2 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglebbin) = 2 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglereturnin) = 1 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglestop) = 0 3.89/1.89 3.89/1.89 Pol(koat_start) = 2 3.89/1.89 3.89/1.89 orients all transitions weakly and the transitions 3.89/1.89 3.89/1.89 evalSimpleSinglereturnin(ar_0, ar_1) -> Com_1(evalSimpleSinglestop(ar_0, ar_1)) 3.89/1.89 3.89/1.89 evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglereturnin(ar_0, ar_1)) [ ar_0 >= ar_1 ] 3.89/1.89 3.89/1.89 strictly and produces the following problem: 3.89/1.89 3.89/1.89 3: T: 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSinglestart(ar_0, ar_1) -> Com_1(evalSimpleSingleentryin(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSingleentryin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglebbin(ar_0, ar_1)) [ ar_1 >= ar_0 + 1 ] 3.89/1.89 3.89/1.89 (Comp: 2, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglereturnin(ar_0, ar_1)) [ ar_0 >= ar_1 ] 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebbin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(ar_0 + 1, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 2, Cost: 1) evalSimpleSinglereturnin(ar_0, ar_1) -> Com_1(evalSimpleSinglestop(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(evalSimpleSinglestart(ar_0, ar_1)) [ 0 <= 0 ] 3.89/1.89 3.89/1.89 start location: koat_start 3.89/1.89 3.89/1.89 leaf cost: 0 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 A polynomial rank function with 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglestart) = V_2 3.89/1.89 3.89/1.89 Pol(evalSimpleSingleentryin) = V_2 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglebb3in) = -V_1 + V_2 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglebbin) = -V_1 + V_2 - 1 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglereturnin) = -V_1 + V_2 3.89/1.89 3.89/1.89 Pol(evalSimpleSinglestop) = -V_1 + V_2 3.89/1.89 3.89/1.89 Pol(koat_start) = V_2 3.89/1.89 3.89/1.89 orients all transitions weakly and the transition 3.89/1.89 3.89/1.89 evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglebbin(ar_0, ar_1)) [ ar_1 >= ar_0 + 1 ] 3.89/1.89 3.89/1.89 strictly and produces the following problem: 3.89/1.89 3.89/1.89 4: T: 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSinglestart(ar_0, ar_1) -> Com_1(evalSimpleSingleentryin(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSingleentryin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ar_1, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglebbin(ar_0, ar_1)) [ ar_1 >= ar_0 + 1 ] 3.89/1.89 3.89/1.89 (Comp: 2, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglereturnin(ar_0, ar_1)) [ ar_0 >= ar_1 ] 3.89/1.89 3.89/1.89 (Comp: ?, Cost: 1) evalSimpleSinglebbin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(ar_0 + 1, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 2, Cost: 1) evalSimpleSinglereturnin(ar_0, ar_1) -> Com_1(evalSimpleSinglestop(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(evalSimpleSinglestart(ar_0, ar_1)) [ 0 <= 0 ] 3.89/1.89 3.89/1.89 start location: koat_start 3.89/1.89 3.89/1.89 leaf cost: 0 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Repeatedly propagating knowledge in problem 4 produces the following problem: 3.89/1.89 3.89/1.89 5: T: 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSinglestart(ar_0, ar_1) -> Com_1(evalSimpleSingleentryin(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 1) evalSimpleSingleentryin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: ar_1, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglebbin(ar_0, ar_1)) [ ar_1 >= ar_0 + 1 ] 3.89/1.89 3.89/1.89 (Comp: 2, Cost: 1) evalSimpleSinglebb3in(ar_0, ar_1) -> Com_1(evalSimpleSinglereturnin(ar_0, ar_1)) [ ar_0 >= ar_1 ] 3.89/1.89 3.89/1.89 (Comp: ar_1, Cost: 1) evalSimpleSinglebbin(ar_0, ar_1) -> Com_1(evalSimpleSinglebb3in(ar_0 + 1, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 2, Cost: 1) evalSimpleSinglereturnin(ar_0, ar_1) -> Com_1(evalSimpleSinglestop(ar_0, ar_1)) 3.89/1.89 3.89/1.89 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(evalSimpleSinglestart(ar_0, ar_1)) [ 0 <= 0 ] 3.89/1.89 3.89/1.89 start location: koat_start 3.89/1.89 3.89/1.89 leaf cost: 0 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Complexity upper bound 2*ar_1 + 6 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Time: 0.040 sec (SMT: 0.036 sec) 3.89/1.89 3.89/1.89 3.89/1.89 ---------------------------------------- 3.89/1.89 3.89/1.89 (2) 3.89/1.89 BOUNDS(1, n^1) 3.89/1.89 3.89/1.89 ---------------------------------------- 3.89/1.89 3.89/1.89 (3) Loat Proof (FINISHED) 3.89/1.89 3.89/1.89 3.89/1.89 ### Pre-processing the ITS problem ### 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Initial linear ITS problem 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 0: evalSimpleSinglestart -> evalSimpleSingleentryin : [], cost: 1 3.89/1.89 3.89/1.89 1: evalSimpleSingleentryin -> evalSimpleSinglebb3in : A'=0, [], cost: 1 3.89/1.89 3.89/1.89 2: evalSimpleSinglebb3in -> evalSimpleSinglebbin : [ B>=1+A ], cost: 1 3.89/1.89 3.89/1.89 3: evalSimpleSinglebb3in -> evalSimpleSinglereturnin : [ A>=B ], cost: 1 3.89/1.89 3.89/1.89 4: evalSimpleSinglebbin -> evalSimpleSinglebb3in : A'=1+A, [], cost: 1 3.89/1.89 3.89/1.89 5: evalSimpleSinglereturnin -> evalSimpleSinglestop : [], cost: 1 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Removed unreachable and leaf rules: 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 0: evalSimpleSinglestart -> evalSimpleSingleentryin : [], cost: 1 3.89/1.89 3.89/1.89 1: evalSimpleSingleentryin -> evalSimpleSinglebb3in : A'=0, [], cost: 1 3.89/1.89 3.89/1.89 2: evalSimpleSinglebb3in -> evalSimpleSinglebbin : [ B>=1+A ], cost: 1 3.89/1.89 3.89/1.89 4: evalSimpleSinglebbin -> evalSimpleSinglebb3in : A'=1+A, [], cost: 1 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 ### Simplification by acceleration and chaining ### 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Eliminated locations (on linear paths): 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 6: evalSimpleSinglestart -> evalSimpleSinglebb3in : A'=0, [], cost: 2 3.89/1.89 3.89/1.89 7: evalSimpleSinglebb3in -> evalSimpleSinglebb3in : A'=1+A, [ B>=1+A ], cost: 2 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Accelerating simple loops of location 2. 3.89/1.89 3.89/1.89 Accelerating the following rules: 3.89/1.89 3.89/1.89 7: evalSimpleSinglebb3in -> evalSimpleSinglebb3in : A'=1+A, [ B>=1+A ], cost: 2 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Accelerated rule 7 with metering function -A+B, yielding the new rule 8. 3.89/1.89 3.89/1.89 Removing the simple loops: 7. 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Accelerated all simple loops using metering functions (where possible): 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 6: evalSimpleSinglestart -> evalSimpleSinglebb3in : A'=0, [], cost: 2 3.89/1.89 3.89/1.89 8: evalSimpleSinglebb3in -> evalSimpleSinglebb3in : A'=B, [ B>=1+A ], cost: -2*A+2*B 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Chained accelerated rules (with incoming rules): 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 6: evalSimpleSinglestart -> evalSimpleSinglebb3in : A'=0, [], cost: 2 3.89/1.89 3.89/1.89 9: evalSimpleSinglestart -> evalSimpleSinglebb3in : A'=B, [ B>=1 ], cost: 2+2*B 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Removed unreachable locations (and leaf rules with constant cost): 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 9: evalSimpleSinglestart -> evalSimpleSinglebb3in : A'=B, [ B>=1 ], cost: 2+2*B 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 ### Computing asymptotic complexity ### 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Fully simplified ITS problem 3.89/1.89 3.89/1.89 Start location: evalSimpleSinglestart 3.89/1.89 3.89/1.89 9: evalSimpleSinglestart -> evalSimpleSinglebb3in : A'=B, [ B>=1 ], cost: 2+2*B 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Computing asymptotic complexity for rule 9 3.89/1.89 3.89/1.89 Solved the limit problem by the following transformations: 3.89/1.89 3.89/1.89 Created initial limit problem: 3.89/1.89 3.89/1.89 2+2*B (+), B (+/+!) [not solved] 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 removing all constraints (solved by SMT) 3.89/1.89 3.89/1.89 resulting limit problem: [solved] 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 applying transformation rule (C) using substitution {B==n} 3.89/1.89 3.89/1.89 resulting limit problem: 3.89/1.89 3.89/1.89 [solved] 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Solution: 3.89/1.89 3.89/1.89 B / n 3.89/1.89 3.89/1.89 Resulting cost 2+2*n has complexity: Poly(n^1) 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Found new complexity Poly(n^1). 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 Obtained the following overall complexity (w.r.t. the length of the input n): 3.89/1.89 3.89/1.89 Complexity: Poly(n^1) 3.89/1.89 3.89/1.89 Cpx degree: 1 3.89/1.89 3.89/1.89 Solved cost: 2+2*n 3.89/1.89 3.89/1.89 Rule cost: 2+2*B 3.89/1.89 3.89/1.89 Rule guard: [ B>=1 ] 3.89/1.89 3.89/1.89 3.89/1.89 3.89/1.89 WORST_CASE(Omega(n^1),?) 3.89/1.89 3.89/1.89 3.89/1.89 ---------------------------------------- 3.89/1.89 3.89/1.89 (4) 3.89/1.89 BOUNDS(n^1, INF) 4.00/1.91 EOF