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