888.76/291.49 WORST_CASE(Omega(n^1), O(n^1)) 888.92/291.51 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 888.92/291.51 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 888.92/291.51 888.92/291.51 888.92/291.51 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 888.92/291.51 888.92/291.51 (0) CpxTRS 888.92/291.51 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 888.92/291.51 (2) CpxTRS 888.92/291.51 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 888.92/291.51 (4) CpxWeightedTrs 888.92/291.51 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 888.92/291.51 (6) CpxTypedWeightedTrs 888.92/291.51 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 888.92/291.51 (8) CpxTypedWeightedCompleteTrs 888.92/291.51 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 7 ms] 888.92/291.51 (10) CpxRNTS 888.92/291.51 (11) CompleteCoflocoProof [FINISHED, 166 ms] 888.92/291.51 (12) BOUNDS(1, n^1) 888.92/291.51 (13) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 888.92/291.51 (14) TRS for Loop Detection 888.92/291.51 (15) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 888.92/291.51 (16) BEST 888.92/291.51 (17) proven lower bound 888.92/291.51 (18) LowerBoundPropagationProof [FINISHED, 0 ms] 888.92/291.51 (19) BOUNDS(n^1, INF) 888.92/291.51 (20) TRS for Loop Detection 888.92/291.51 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (0) 888.92/291.51 Obligation: 888.92/291.51 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 888.92/291.51 888.92/291.51 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) 888.92/291.51 round(0) -> 0 888.92/291.51 round(0) -> s(0) 888.92/291.51 round(s(0)) -> s(0) 888.92/291.51 round(s(s(x))) -> s(s(round(x))) 888.92/291.51 888.92/291.51 S is empty. 888.92/291.51 Rewrite Strategy: FULL 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 888.92/291.51 Converted rc-obligation to irc-obligation. 888.92/291.51 888.92/291.51 As the TRS is a non-duplicating overlay system, we have rc = irc. 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (2) 888.92/291.51 Obligation: 888.92/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 888.92/291.51 888.92/291.51 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) 888.92/291.51 round(0) -> 0 888.92/291.51 round(0) -> s(0) 888.92/291.51 round(s(0)) -> s(0) 888.92/291.51 round(s(s(x))) -> s(s(round(x))) 888.92/291.51 888.92/291.51 S is empty. 888.92/291.51 Rewrite Strategy: INNERMOST 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 888.92/291.51 Transformed relative TRS to weighted TRS 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (4) 888.92/291.51 Obligation: 888.92/291.51 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 888.92/291.51 888.92/291.51 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) [1] 888.92/291.51 round(0) -> 0 [1] 888.92/291.51 round(0) -> s(0) [1] 888.92/291.51 round(s(0)) -> s(0) [1] 888.92/291.51 round(s(s(x))) -> s(s(round(x))) [1] 888.92/291.51 888.92/291.51 Rewrite Strategy: INNERMOST 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 888.92/291.51 Infered types. 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (6) 888.92/291.51 Obligation: 888.92/291.51 Runtime Complexity Weighted TRS with Types. 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) [1] 888.92/291.51 round(0) -> 0 [1] 888.92/291.51 round(0) -> s(0) [1] 888.92/291.51 round(s(0)) -> s(0) [1] 888.92/291.51 round(s(s(x))) -> s(s(round(x))) [1] 888.92/291.51 888.92/291.51 The TRS has the following type information: 888.92/291.51 f :: s:0 -> s:0 -> f 888.92/291.51 s :: s:0 -> s:0 888.92/291.51 round :: s:0 -> s:0 888.92/291.51 0 :: s:0 888.92/291.51 888.92/291.51 Rewrite Strategy: INNERMOST 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (7) CompletionProof (UPPER BOUND(ID)) 888.92/291.51 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 888.92/291.51 888.92/291.51 f(v0, v1) -> null_f [0] 888.92/291.51 888.92/291.51 And the following fresh constants: null_f 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (8) 888.92/291.51 Obligation: 888.92/291.51 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 888.92/291.51 888.92/291.51 Runtime Complexity Weighted TRS with Types. 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) [1] 888.92/291.51 round(0) -> 0 [1] 888.92/291.51 round(0) -> s(0) [1] 888.92/291.51 round(s(0)) -> s(0) [1] 888.92/291.51 round(s(s(x))) -> s(s(round(x))) [1] 888.92/291.51 f(v0, v1) -> null_f [0] 888.92/291.51 888.92/291.51 The TRS has the following type information: 888.92/291.51 f :: s:0 -> s:0 -> null_f 888.92/291.51 s :: s:0 -> s:0 888.92/291.51 round :: s:0 -> s:0 888.92/291.51 0 :: s:0 888.92/291.51 null_f :: null_f 888.92/291.51 888.92/291.51 Rewrite Strategy: INNERMOST 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 888.92/291.51 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 888.92/291.51 The constant constructors are abstracted as follows: 888.92/291.51 888.92/291.51 0 => 0 888.92/291.51 null_f => 0 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (10) 888.92/291.51 Obligation: 888.92/291.51 Complexity RNTS consisting of the following rules: 888.92/291.51 888.92/291.51 f(z, z') -{ 1 }-> f(1 + x, round(1 + x)) :|: z' = x, x >= 0, z = 1 + x 888.92/291.51 f(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 888.92/291.51 round(z) -{ 1 }-> 0 :|: z = 0 888.92/291.51 round(z) -{ 1 }-> 1 + 0 :|: z = 0 888.92/291.51 round(z) -{ 1 }-> 1 + 0 :|: z = 1 + 0 888.92/291.51 round(z) -{ 1 }-> 1 + (1 + round(x)) :|: x >= 0, z = 1 + (1 + x) 888.92/291.51 888.92/291.51 Only complete derivations are relevant for the runtime complexity. 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (11) CompleteCoflocoProof (FINISHED) 888.92/291.51 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 888.92/291.51 888.92/291.51 eq(start(V1, V),0,[f(V1, V, Out)],[V1 >= 0,V >= 0]). 888.92/291.51 eq(start(V1, V),0,[round(V1, Out)],[V1 >= 0]). 888.92/291.51 eq(f(V1, V, Out),1,[round(1 + V2, Ret1),f(1 + V2, Ret1, Ret)],[Out = Ret,V = V2,V2 >= 0,V1 = 1 + V2]). 888.92/291.51 eq(round(V1, Out),1,[],[Out = 0,V1 = 0]). 888.92/291.51 eq(round(V1, Out),1,[],[Out = 1,V1 = 0]). 888.92/291.51 eq(round(V1, Out),1,[],[Out = 1,V1 = 1]). 888.92/291.51 eq(round(V1, Out),1,[round(V3, Ret11)],[Out = 2 + Ret11,V3 >= 0,V1 = 2 + V3]). 888.92/291.51 eq(f(V1, V, Out),0,[],[Out = 0,V5 >= 0,V4 >= 0,V1 = V5,V = V4]). 888.92/291.51 input_output_vars(f(V1,V,Out),[V1,V],[Out]). 888.92/291.51 input_output_vars(round(V1,Out),[V1],[Out]). 888.92/291.51 888.92/291.51 888.92/291.51 CoFloCo proof output: 888.92/291.51 Preprocessing Cost Relations 888.92/291.51 ===================================== 888.92/291.51 888.92/291.51 #### Computed strongly connected components 888.92/291.51 0. recursive : [round/2] 888.92/291.51 1. recursive : [f/3] 888.92/291.51 2. non_recursive : [start/2] 888.92/291.51 888.92/291.51 #### Obtained direct recursion through partial evaluation 888.92/291.51 0. SCC is partially evaluated into round/2 888.92/291.51 1. SCC is partially evaluated into f/3 888.92/291.51 2. SCC is partially evaluated into start/2 888.92/291.51 888.92/291.51 Control-Flow Refinement of Cost Relations 888.92/291.51 ===================================== 888.92/291.51 888.92/291.51 ### Specialization of cost equations round/2 888.92/291.51 * CE 8 is refined into CE [9] 888.92/291.51 * CE 7 is refined into CE [10] 888.92/291.51 * CE 6 is refined into CE [11] 888.92/291.51 * CE 5 is refined into CE [12] 888.92/291.51 888.92/291.51 888.92/291.51 ### Cost equations --> "Loop" of round/2 888.92/291.51 * CEs [10] --> Loop 8 888.92/291.51 * CEs [11] --> Loop 9 888.92/291.51 * CEs [12] --> Loop 10 888.92/291.51 * CEs [9] --> Loop 11 888.92/291.51 888.92/291.51 ### Ranking functions of CR round(V1,Out) 888.92/291.51 * RF of phase [11]: [V1-1] 888.92/291.51 888.92/291.51 #### Partial ranking functions of CR round(V1,Out) 888.92/291.51 * Partial RF of phase [11]: 888.92/291.51 - RF of loop [11:1]: 888.92/291.51 V1-1 888.92/291.51 888.92/291.51 888.92/291.51 ### Specialization of cost equations f/3 888.92/291.51 * CE 4 is refined into CE [13] 888.92/291.51 * CE 3 is refined into CE [14,15,16] 888.92/291.51 888.92/291.51 888.92/291.51 ### Cost equations --> "Loop" of f/3 888.92/291.51 * CEs [16] --> Loop 12 888.92/291.51 * CEs [15] --> Loop 13 888.92/291.51 * CEs [14] --> Loop 14 888.92/291.51 * CEs [13] --> Loop 15 888.92/291.51 888.92/291.51 ### Ranking functions of CR f(V1,V,Out) 888.92/291.51 888.92/291.51 #### Partial ranking functions of CR f(V1,V,Out) 888.92/291.51 888.92/291.51 888.92/291.51 ### Specialization of cost equations start/2 888.92/291.51 * CE 1 is refined into CE [17,18] 888.92/291.51 * CE 2 is refined into CE [19,20,21,22,23] 888.92/291.51 888.92/291.51 888.92/291.51 ### Cost equations --> "Loop" of start/2 888.92/291.51 * CEs [22,23] --> Loop 16 888.92/291.51 * CEs [17,18] --> Loop 17 888.92/291.51 * CEs [21] --> Loop 18 888.92/291.51 * CEs [19,20] --> Loop 19 888.92/291.51 888.92/291.51 ### Ranking functions of CR start(V1,V) 888.92/291.51 888.92/291.51 #### Partial ranking functions of CR start(V1,V) 888.92/291.51 888.92/291.51 888.92/291.51 Computing Bounds 888.92/291.51 ===================================== 888.92/291.51 888.92/291.51 #### Cost of chains of round(V1,Out): 888.92/291.51 * Chain [[11],10]: 1*it(11)+1 888.92/291.51 Such that:it(11) =< Out 888.92/291.51 888.92/291.51 with precondition: [V1=Out,V1>=2] 888.92/291.51 888.92/291.51 * Chain [[11],9]: 1*it(11)+1 888.92/291.51 Such that:it(11) =< Out 888.92/291.51 888.92/291.51 with precondition: [V1+1=Out,V1>=2] 888.92/291.51 888.92/291.51 * Chain [[11],8]: 1*it(11)+1 888.92/291.51 Such that:it(11) =< Out 888.92/291.51 888.92/291.51 with precondition: [V1=Out,V1>=3] 888.92/291.51 888.92/291.51 * Chain [10]: 1 888.92/291.51 with precondition: [V1=0,Out=0] 888.92/291.51 888.92/291.51 * Chain [9]: 1 888.92/291.51 with precondition: [V1=0,Out=1] 888.92/291.51 888.92/291.51 * Chain [8]: 1 888.92/291.51 with precondition: [V1=1,Out=1] 888.92/291.51 888.92/291.51 888.92/291.51 #### Cost of chains of f(V1,V,Out): 888.92/291.51 * Chain [15]: 0 888.92/291.51 with precondition: [Out=0,V1>=0,V>=0] 888.92/291.51 888.92/291.51 * Chain [14,15]: 2 888.92/291.51 with precondition: [V1=1,V=0,Out=0] 888.92/291.51 888.92/291.51 * Chain [13,15]: 1*s(3)+2 888.92/291.51 Such that:s(3) =< V1+1 888.92/291.51 888.92/291.51 with precondition: [Out=0,V1=V+1,V1>=2] 888.92/291.51 888.92/291.51 * Chain [12,15]: 2*s(5)+2 888.92/291.51 Such that:s(4) =< V1 888.92/291.51 s(5) =< s(4) 888.92/291.51 888.92/291.51 with precondition: [Out=0,V+1=V1,V>=1] 888.92/291.51 888.92/291.51 888.92/291.51 #### Cost of chains of start(V1,V): 888.92/291.51 * Chain [19]: 1 888.92/291.51 with precondition: [V1=0] 888.92/291.51 888.92/291.51 * Chain [18]: 1 888.92/291.51 with precondition: [V1=1] 888.92/291.51 888.92/291.51 * Chain [17]: 1*s(10)+2*s(11)+2 888.92/291.51 Such that:s(9) =< V+1 888.92/291.51 s(10) =< V+2 888.92/291.51 s(11) =< s(9) 888.92/291.51 888.92/291.51 with precondition: [V1>=0,V>=0] 888.92/291.51 888.92/291.51 * Chain [16]: 1*s(12)+2*s(14)+1 888.92/291.51 Such that:s(13) =< V1 888.92/291.51 s(12) =< V1+1 888.92/291.51 s(14) =< s(13) 888.92/291.51 888.92/291.51 with precondition: [V1>=2] 888.92/291.51 888.92/291.51 888.92/291.51 Closed-form bounds of start(V1,V): 888.92/291.51 ------------------------------------- 888.92/291.51 * Chain [19] with precondition: [V1=0] 888.92/291.51 - Upper bound: 1 888.92/291.51 - Complexity: constant 888.92/291.51 * Chain [18] with precondition: [V1=1] 888.92/291.51 - Upper bound: 1 888.92/291.51 - Complexity: constant 888.92/291.51 * Chain [17] with precondition: [V1>=0,V>=0] 888.92/291.51 - Upper bound: 3*V+6 888.92/291.51 - Complexity: n 888.92/291.51 * Chain [16] with precondition: [V1>=2] 888.92/291.51 - Upper bound: 3*V1+2 888.92/291.51 - Complexity: n 888.92/291.51 888.92/291.51 ### Maximum cost of start(V1,V): max([3*V1+1,nat(V+1)*2+1+nat(V+2)])+1 888.92/291.51 Asymptotic class: n 888.92/291.51 * Total analysis performed in 101 ms. 888.92/291.51 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (12) 888.92/291.51 BOUNDS(1, n^1) 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (13) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 888.92/291.51 Transformed a relative TRS into a decreasing-loop problem. 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (14) 888.92/291.51 Obligation: 888.92/291.51 Analyzing the following TRS for decreasing loops: 888.92/291.51 888.92/291.51 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 888.92/291.51 888.92/291.51 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) 888.92/291.51 round(0) -> 0 888.92/291.51 round(0) -> s(0) 888.92/291.51 round(s(0)) -> s(0) 888.92/291.51 round(s(s(x))) -> s(s(round(x))) 888.92/291.51 888.92/291.51 S is empty. 888.92/291.51 Rewrite Strategy: FULL 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (15) DecreasingLoopProof (LOWER BOUND(ID)) 888.92/291.51 The following loop(s) give(s) rise to the lower bound Omega(n^1): 888.92/291.51 888.92/291.51 The rewrite sequence 888.92/291.51 888.92/291.51 round(s(s(x))) ->^+ s(s(round(x))) 888.92/291.51 888.92/291.51 gives rise to a decreasing loop by considering the right hand sides subterm at position [0,0]. 888.92/291.51 888.92/291.51 The pumping substitution is [x / s(s(x))]. 888.92/291.51 888.92/291.51 The result substitution is [ ]. 888.92/291.51 888.92/291.51 888.92/291.51 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (16) 888.92/291.51 Complex Obligation (BEST) 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (17) 888.92/291.51 Obligation: 888.92/291.51 Proved the lower bound n^1 for the following obligation: 888.92/291.51 888.92/291.51 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 888.92/291.51 888.92/291.51 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) 888.92/291.51 round(0) -> 0 888.92/291.51 round(0) -> s(0) 888.92/291.51 round(s(0)) -> s(0) 888.92/291.51 round(s(s(x))) -> s(s(round(x))) 888.92/291.51 888.92/291.51 S is empty. 888.92/291.51 Rewrite Strategy: FULL 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (18) LowerBoundPropagationProof (FINISHED) 888.92/291.51 Propagated lower bound. 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (19) 888.92/291.51 BOUNDS(n^1, INF) 888.92/291.51 888.92/291.51 ---------------------------------------- 888.92/291.51 888.92/291.51 (20) 888.92/291.51 Obligation: 888.92/291.51 Analyzing the following TRS for decreasing loops: 888.92/291.51 888.92/291.51 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 888.92/291.51 888.92/291.51 888.92/291.51 The TRS R consists of the following rules: 888.92/291.51 888.92/291.51 f(s(x), x) -> f(s(x), round(s(x))) 888.92/291.51 round(0) -> 0 888.92/291.51 round(0) -> s(0) 888.92/291.51 round(s(0)) -> s(0) 888.92/291.51 round(s(s(x))) -> s(s(round(x))) 888.92/291.51 888.92/291.51 S is empty. 888.92/291.51 Rewrite Strategy: FULL 889.00/291.55 EOF