3.47/1.78 WORST_CASE(Omega(n^1), O(n^1)) 3.47/1.79 proof of /export/starexec/sandbox/benchmark/theBenchmark.koat 3.47/1.79 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.47/1.79 3.47/1.79 3.47/1.79 The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(n^1, max(2, 3 + Arg_0)). 3.47/1.79 3.47/1.79 (0) CpxIntTrs 3.47/1.79 (1) Koat2 Proof [FINISHED, 139 ms] 3.47/1.79 (2) BOUNDS(1, max(2, 3 + Arg_0)) 3.47/1.79 (3) Loat Proof [FINISHED, 121 ms] 3.47/1.79 (4) BOUNDS(n^1, INF) 3.47/1.79 3.47/1.79 3.47/1.79 ---------------------------------------- 3.47/1.79 3.47/1.79 (0) 3.47/1.79 Obligation: 3.47/1.79 Complexity Int TRS consisting of the following rules: 3.47/1.79 f300(A, B) -> Com_1(f1(A, C)) :|: 0 >= A + 1 3.47/1.79 f300(A, B) -> Com_1(f300(-(1) + A, B)) :|: A >= 0 3.47/1.79 f2(A, B) -> Com_1(f300(A, B)) :|: TRUE 3.47/1.79 3.47/1.79 The start-symbols are:[f2_2] 3.47/1.79 3.47/1.79 3.47/1.79 ---------------------------------------- 3.47/1.79 3.47/1.79 (1) Koat2 Proof (FINISHED) 3.47/1.79 YES( ?, max([2, 3+Arg_0]) {O(n)}) 3.47/1.79 3.47/1.79 3.47/1.79 3.47/1.79 Initial Complexity Problem: 3.47/1.79 3.47/1.79 Start: f2 3.47/1.79 3.47/1.79 Program_Vars: Arg_0, Arg_1 3.47/1.79 3.47/1.79 Temp_Vars: C 3.47/1.79 3.47/1.79 Locations: f1, f2, f300 3.47/1.79 3.47/1.79 Transitions: 3.47/1.79 3.47/1.79 f2(Arg_0,Arg_1) -> f300(Arg_0,Arg_1):|: 3.47/1.79 3.47/1.79 f300(Arg_0,Arg_1) -> f1(Arg_0,C):|:Arg_0+1 <= 0 3.47/1.79 3.47/1.79 f300(Arg_0,Arg_1) -> f300(-1+Arg_0,Arg_1):|:0 <= Arg_0 3.47/1.79 3.47/1.79 3.47/1.79 3.47/1.79 Timebounds: 3.47/1.79 3.47/1.79 Overall timebound: max([2, 3+Arg_0]) {O(n)} 3.47/1.79 3.47/1.79 2: f2->f300: 1 {O(1)} 3.47/1.79 3.47/1.79 0: f300->f1: 1 {O(1)} 3.47/1.79 3.47/1.79 1: f300->f300: max([0, 1+Arg_0]) {O(n)} 3.47/1.79 3.47/1.79 3.47/1.79 3.47/1.79 Costbounds: 3.47/1.79 3.47/1.79 Overall costbound: max([2, 3+Arg_0]) {O(n)} 3.47/1.79 3.47/1.79 2: f2->f300: 1 {O(1)} 3.47/1.79 3.47/1.79 0: f300->f1: 1 {O(1)} 3.47/1.79 3.47/1.79 1: f300->f300: max([0, 1+Arg_0]) {O(n)} 3.47/1.79 3.47/1.79 3.47/1.79 3.47/1.79 Sizebounds: 3.47/1.79 3.47/1.79 `Lower: 3.47/1.79 3.47/1.79 2: f2->f300, Arg_0: Arg_0 {O(n)} 3.47/1.79 3.47/1.79 2: f2->f300, Arg_1: Arg_1 {O(n)} 3.47/1.79 3.47/1.79 0: f300->f1, Arg_0: min([-1, Arg_0]) {O(n)} 3.47/1.79 3.47/1.79 1: f300->f300, Arg_0: -1 {O(1)} 3.47/1.79 3.47/1.79 1: f300->f300, Arg_1: Arg_1 {O(n)} 3.47/1.79 3.47/1.79 `Upper: 3.47/1.79 3.47/1.79 2: f2->f300, Arg_0: Arg_0 {O(n)} 3.47/1.79 3.47/1.79 2: f2->f300, Arg_1: Arg_1 {O(n)} 3.47/1.79 3.47/1.79 0: f300->f1, Arg_0: -1 {O(1)} 3.47/1.79 3.47/1.79 1: f300->f300, Arg_0: Arg_0 {O(n)} 3.47/1.79 3.47/1.79 1: f300->f300, Arg_1: Arg_1 {O(n)} 3.47/1.79 3.47/1.79 3.47/1.79 ---------------------------------------- 3.47/1.79 3.47/1.79 (2) 3.47/1.79 BOUNDS(1, max(2, 3 + Arg_0)) 3.47/1.79 3.47/1.79 ---------------------------------------- 3.47/1.79 3.47/1.79 (3) Loat Proof (FINISHED) 3.47/1.79 3.47/1.79 3.47/1.79 ### Pre-processing the ITS problem ### 3.47/1.79 3.47/1.79 3.47/1.79 3.47/1.79 Initial linear ITS problem 3.47/1.79 3.47/1.79 Start location: f2 3.47/1.79 3.47/1.79 0: f300 -> f1 : B'=free, [ 0>=1+A ], cost: 1 3.86/1.79 3.86/1.79 1: f300 -> f300 : A'=-1+A, [ A>=0 ], cost: 1 3.86/1.79 3.86/1.79 2: f2 -> f300 : [], cost: 1 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Removed unreachable and leaf rules: 3.86/1.79 3.86/1.79 Start location: f2 3.86/1.79 3.86/1.79 1: f300 -> f300 : A'=-1+A, [ A>=0 ], cost: 1 3.86/1.79 3.86/1.79 2: f2 -> f300 : [], cost: 1 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 ### Simplification by acceleration and chaining ### 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Accelerating simple loops of location 0. 3.86/1.79 3.86/1.79 Accelerating the following rules: 3.86/1.79 3.86/1.79 1: f300 -> f300 : A'=-1+A, [ A>=0 ], cost: 1 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Accelerated rule 1 with metering function 1+A, yielding the new rule 3. 3.86/1.79 3.86/1.79 Removing the simple loops: 1. 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Accelerated all simple loops using metering functions (where possible): 3.86/1.79 3.86/1.79 Start location: f2 3.86/1.79 3.86/1.79 3: f300 -> f300 : A'=-1, [ A>=0 ], cost: 1+A 3.86/1.79 3.86/1.79 2: f2 -> f300 : [], cost: 1 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Chained accelerated rules (with incoming rules): 3.86/1.79 3.86/1.79 Start location: f2 3.86/1.79 3.86/1.79 2: f2 -> f300 : [], cost: 1 3.86/1.79 3.86/1.79 4: f2 -> f300 : A'=-1, [ A>=0 ], cost: 2+A 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Removed unreachable locations (and leaf rules with constant cost): 3.86/1.79 3.86/1.79 Start location: f2 3.86/1.79 3.86/1.79 4: f2 -> f300 : A'=-1, [ A>=0 ], cost: 2+A 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 ### Computing asymptotic complexity ### 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Fully simplified ITS problem 3.86/1.79 3.86/1.79 Start location: f2 3.86/1.79 3.86/1.79 4: f2 -> f300 : A'=-1, [ A>=0 ], cost: 2+A 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Computing asymptotic complexity for rule 4 3.86/1.79 3.86/1.79 Solved the limit problem by the following transformations: 3.86/1.79 3.86/1.79 Created initial limit problem: 3.86/1.79 3.86/1.79 2+A (+), 1+A (+/+!) [not solved] 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 removing all constraints (solved by SMT) 3.86/1.79 3.86/1.79 resulting limit problem: [solved] 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 applying transformation rule (C) using substitution {A==n} 3.86/1.79 3.86/1.79 resulting limit problem: 3.86/1.79 3.86/1.79 [solved] 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Solution: 3.86/1.79 3.86/1.79 A / n 3.86/1.79 3.86/1.79 Resulting cost 2+n has complexity: Poly(n^1) 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Found new complexity Poly(n^1). 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 Obtained the following overall complexity (w.r.t. the length of the input n): 3.86/1.79 3.86/1.79 Complexity: Poly(n^1) 3.86/1.79 3.86/1.79 Cpx degree: 1 3.86/1.79 3.86/1.79 Solved cost: 2+n 3.86/1.79 3.86/1.79 Rule cost: 2+A 3.86/1.79 3.86/1.79 Rule guard: [ A>=0 ] 3.86/1.79 3.86/1.79 3.86/1.79 3.86/1.79 WORST_CASE(Omega(n^1),?) 3.86/1.79 3.86/1.79 3.86/1.79 ---------------------------------------- 3.86/1.79 3.86/1.79 (4) 3.86/1.79 BOUNDS(n^1, INF) 3.86/1.82 EOF