/export/starexec/sandbox2/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^2). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 41 ms] (4) CpxRelTRS (5) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxWeightedTrs (9) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxTypedWeightedTrs (11) CompletionProof [UPPER BOUND(ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) CompleteCoflocoProof [FINISHED, 340 ms] (16) BOUNDS(1, n^2) (17) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (18) TRS for Loop Detection (19) DecreasingLoopProof [LOWER BOUND(ID), 4 ms] (20) BEST (21) proven lower bound (22) LowerBoundPropagationProof [FINISHED, 0 ms] (23) BOUNDS(n^1, INF) (24) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (5) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS is a non-duplicating overlay system, we have rc = irc. ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) Rewrite Strategy: INNERMOST ---------------------------------------- (7) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: half(0) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] log(s(0)) -> 0 [1] log(s(s(x))) -> s(log(s(half(x)))) [1] encArg(0) -> 0 [0] encArg(s(x_1)) -> s(encArg(x_1)) [0] encArg(cons_half(x_1)) -> half(encArg(x_1)) [0] encArg(cons_log(x_1)) -> log(encArg(x_1)) [0] encode_half(x_1) -> half(encArg(x_1)) [0] encode_0 -> 0 [0] encode_s(x_1) -> s(encArg(x_1)) [0] encode_log(x_1) -> log(encArg(x_1)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (9) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (10) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(0) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] log(s(0)) -> 0 [1] log(s(s(x))) -> s(log(s(half(x)))) [1] encArg(0) -> 0 [0] encArg(s(x_1)) -> s(encArg(x_1)) [0] encArg(cons_half(x_1)) -> half(encArg(x_1)) [0] encArg(cons_log(x_1)) -> log(encArg(x_1)) [0] encode_half(x_1) -> half(encArg(x_1)) [0] encode_0 -> 0 [0] encode_s(x_1) -> s(encArg(x_1)) [0] encode_log(x_1) -> log(encArg(x_1)) [0] The TRS has the following type information: half :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log 0 :: 0:s:cons_half:cons_log s :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log log :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log encArg :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log cons_half :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log cons_log :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log encode_half :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log encode_0 :: 0:s:cons_half:cons_log encode_s :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log encode_log :: 0:s:cons_half:cons_log -> 0:s:cons_half:cons_log Rewrite Strategy: INNERMOST ---------------------------------------- (11) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: encArg(v0) -> null_encArg [0] encode_half(v0) -> null_encode_half [0] encode_0 -> null_encode_0 [0] encode_s(v0) -> null_encode_s [0] encode_log(v0) -> null_encode_log [0] half(v0) -> null_half [0] log(v0) -> null_log [0] And the following fresh constants: null_encArg, null_encode_half, null_encode_0, null_encode_s, null_encode_log, null_half, null_log ---------------------------------------- (12) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(0) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] log(s(0)) -> 0 [1] log(s(s(x))) -> s(log(s(half(x)))) [1] encArg(0) -> 0 [0] encArg(s(x_1)) -> s(encArg(x_1)) [0] encArg(cons_half(x_1)) -> half(encArg(x_1)) [0] encArg(cons_log(x_1)) -> log(encArg(x_1)) [0] encode_half(x_1) -> half(encArg(x_1)) [0] encode_0 -> 0 [0] encode_s(x_1) -> s(encArg(x_1)) [0] encode_log(x_1) -> log(encArg(x_1)) [0] encArg(v0) -> null_encArg [0] encode_half(v0) -> null_encode_half [0] encode_0 -> null_encode_0 [0] encode_s(v0) -> null_encode_s [0] encode_log(v0) -> null_encode_log [0] half(v0) -> null_half [0] log(v0) -> null_log [0] The TRS has the following type information: half :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log 0 :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log s :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log log :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log encArg :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log cons_half :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log cons_log :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log encode_half :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log encode_0 :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log encode_s :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log encode_log :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log -> 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_encArg :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_encode_half :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_encode_0 :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_encode_s :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_encode_log :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_half :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log null_log :: 0:s:cons_half:cons_log:null_encArg:null_encode_half:null_encode_0:null_encode_s:null_encode_log:null_half:null_log Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 null_encArg => 0 null_encode_half => 0 null_encode_0 => 0 null_encode_s => 0 null_encode_log => 0 null_half => 0 null_log => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: encArg(z) -{ 0 }-> log(encArg(x_1)) :|: z = 1 + x_1, x_1 >= 0 encArg(z) -{ 0 }-> half(encArg(x_1)) :|: z = 1 + x_1, x_1 >= 0 encArg(z) -{ 0 }-> 0 :|: z = 0 encArg(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encArg(z) -{ 0 }-> 1 + encArg(x_1) :|: z = 1 + x_1, x_1 >= 0 encode_0 -{ 0 }-> 0 :|: encode_half(z) -{ 0 }-> half(encArg(x_1)) :|: x_1 >= 0, z = x_1 encode_half(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_log(z) -{ 0 }-> log(encArg(x_1)) :|: x_1 >= 0, z = x_1 encode_log(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_s(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_s(z) -{ 0 }-> 1 + encArg(x_1) :|: x_1 >= 0, z = x_1 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 half(z) -{ 1 }-> 1 + half(x) :|: x >= 0, z = 1 + (1 + x) log(z) -{ 1 }-> 0 :|: z = 1 + 0 log(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 log(z) -{ 1 }-> 1 + log(1 + half(x)) :|: x >= 0, z = 1 + (1 + x) Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (15) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V),0,[half(V, Out)],[V >= 0]). eq(start(V),0,[log(V, Out)],[V >= 0]). eq(start(V),0,[encArg(V, Out)],[V >= 0]). eq(start(V),0,[fun(V, Out)],[V >= 0]). eq(start(V),0,[fun1(Out)],[]). eq(start(V),0,[fun2(V, Out)],[V >= 0]). eq(start(V),0,[fun3(V, Out)],[V >= 0]). eq(half(V, Out),1,[],[Out = 0,V = 0]). eq(half(V, Out),1,[half(V1, Ret1)],[Out = 1 + Ret1,V1 >= 0,V = 2 + V1]). eq(log(V, Out),1,[],[Out = 0,V = 1]). eq(log(V, Out),1,[half(V2, Ret101),log(1 + Ret101, Ret11)],[Out = 1 + Ret11,V2 >= 0,V = 2 + V2]). eq(encArg(V, Out),0,[],[Out = 0,V = 0]). eq(encArg(V, Out),0,[encArg(V3, Ret12)],[Out = 1 + Ret12,V = 1 + V3,V3 >= 0]). eq(encArg(V, Out),0,[encArg(V4, Ret0),half(Ret0, Ret)],[Out = Ret,V = 1 + V4,V4 >= 0]). eq(encArg(V, Out),0,[encArg(V5, Ret01),log(Ret01, Ret2)],[Out = Ret2,V = 1 + V5,V5 >= 0]). eq(fun(V, Out),0,[encArg(V6, Ret02),half(Ret02, Ret3)],[Out = Ret3,V6 >= 0,V = V6]). eq(fun1(Out),0,[],[Out = 0]). eq(fun2(V, Out),0,[encArg(V7, Ret13)],[Out = 1 + Ret13,V7 >= 0,V = V7]). eq(fun3(V, Out),0,[encArg(V8, Ret03),log(Ret03, Ret4)],[Out = Ret4,V8 >= 0,V = V8]). eq(encArg(V, Out),0,[],[Out = 0,V9 >= 0,V = V9]). eq(fun(V, Out),0,[],[Out = 0,V10 >= 0,V = V10]). eq(fun2(V, Out),0,[],[Out = 0,V11 >= 0,V = V11]). eq(fun3(V, Out),0,[],[Out = 0,V12 >= 0,V = V12]). eq(half(V, Out),0,[],[Out = 0,V13 >= 0,V = V13]). eq(log(V, Out),0,[],[Out = 0,V14 >= 0,V = V14]). input_output_vars(half(V,Out),[V],[Out]). input_output_vars(log(V,Out),[V],[Out]). input_output_vars(encArg(V,Out),[V],[Out]). input_output_vars(fun(V,Out),[V],[Out]). input_output_vars(fun1(Out),[],[Out]). input_output_vars(fun2(V,Out),[V],[Out]). input_output_vars(fun3(V,Out),[V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [half/2] 1. recursive : [log/2] 2. recursive [non_tail] : [encArg/2] 3. non_recursive : [fun/2] 4. non_recursive : [fun1/1] 5. non_recursive : [fun2/2] 6. non_recursive : [fun3/2] 7. non_recursive : [start/1] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into half/2 1. SCC is partially evaluated into log/2 2. SCC is partially evaluated into encArg/2 3. SCC is partially evaluated into fun/2 4. SCC is completely evaluated into other SCCs 5. SCC is partially evaluated into fun2/2 6. SCC is partially evaluated into fun3/2 7. SCC is partially evaluated into start/1 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations half/2 * CE 8 is refined into CE [24] * CE 10 is refined into CE [25] * CE 9 is refined into CE [26] ### Cost equations --> "Loop" of half/2 * CEs [26] --> Loop 11 * CEs [24,25] --> Loop 12 ### Ranking functions of CR half(V,Out) * RF of phase [11]: [V-1] #### Partial ranking functions of CR half(V,Out) * Partial RF of phase [11]: - RF of loop [11:1]: V-1 ### Specialization of cost equations log/2 * CE 11 is refined into CE [27] * CE 13 is refined into CE [28] * CE 12 is refined into CE [29,30] ### Cost equations --> "Loop" of log/2 * CEs [30] --> Loop 13 * CEs [29] --> Loop 14 * CEs [27,28] --> Loop 15 ### Ranking functions of CR log(V,Out) * RF of phase [13]: [V-3] #### Partial ranking functions of CR log(V,Out) * Partial RF of phase [13]: - RF of loop [13:1]: V-3 ### Specialization of cost equations encArg/2 * CE 14 is refined into CE [31] * CE 15 is refined into CE [32] * CE 16 is refined into CE [33,34] * CE 17 is refined into CE [35,36,37,38] ### Cost equations --> "Loop" of encArg/2 * CEs [37] --> Loop 16 * CEs [32] --> Loop 17 * CEs [34,36,38] --> Loop 18 * CEs [33,35] --> Loop 19 * CEs [31] --> Loop 20 ### Ranking functions of CR encArg(V,Out) * RF of phase [16,17,18,19]: [V] #### Partial ranking functions of CR encArg(V,Out) * Partial RF of phase [16,17,18,19]: - RF of loop [16:1,17:1,18:1,19:1]: V ### Specialization of cost equations fun/2 * CE 18 is refined into CE [39,40,41] * CE 19 is refined into CE [42] ### Cost equations --> "Loop" of fun/2 * CEs [41] --> Loop 21 * CEs [39,40,42] --> Loop 22 ### Ranking functions of CR fun(V,Out) #### Partial ranking functions of CR fun(V,Out) ### Specialization of cost equations fun2/2 * CE 20 is refined into CE [43,44] * CE 21 is refined into CE [45] ### Cost equations --> "Loop" of fun2/2 * CEs [44] --> Loop 23 * CEs [43] --> Loop 24 * CEs [45] --> Loop 25 ### Ranking functions of CR fun2(V,Out) #### Partial ranking functions of CR fun2(V,Out) ### Specialization of cost equations fun3/2 * CE 22 is refined into CE [46,47,48,49,50] * CE 23 is refined into CE [51] ### Cost equations --> "Loop" of fun3/2 * CEs [50] --> Loop 26 * CEs [49] --> Loop 27 * CEs [48] --> Loop 28 * CEs [46,47,51] --> Loop 29 ### Ranking functions of CR fun3(V,Out) #### Partial ranking functions of CR fun3(V,Out) ### Specialization of cost equations start/1 * CE 1 is refined into CE [52,53] * CE 2 is refined into CE [54,55,56,57] * CE 3 is refined into CE [58,59] * CE 4 is refined into CE [60,61] * CE 5 is refined into CE [62] * CE 6 is refined into CE [63,64,65] * CE 7 is refined into CE [66,67,68,69] ### Cost equations --> "Loop" of start/1 * CEs [52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69] --> Loop 30 ### Ranking functions of CR start(V) #### Partial ranking functions of CR start(V) Computing Bounds ===================================== #### Cost of chains of half(V,Out): * Chain [[11],12]: 1*it(11)+1 Such that:it(11) =< 2*Out with precondition: [Out>=1,V>=2*Out] * Chain [12]: 1 with precondition: [Out=0,V>=0] #### Cost of chains of log(V,Out): * Chain [[13],15]: 2*it(13)+1*s(3)+1 Such that:it(13) =< V s(3) =< 2*V with precondition: [Out>=1,V>=4*Out] * Chain [[13],14,15]: 2*it(13)+1*s(3)+3 Such that:it(13) =< V s(3) =< 2*V with precondition: [Out>=2,V+4>=4*Out] * Chain [15]: 1 with precondition: [Out=0,V>=0] * Chain [14,15]: 3 with precondition: [Out=1,V>=2] #### Cost of chains of encArg(V,Out): * Chain [[16,17,18,19],20]: 5*it(16)+2*s(14)+1*s(15)+3*s(16)+1*s(17)+0 Such that:aux(8) =< V it(16) =< aux(8) aux(4) =< aux(8) aux(3) =< it(16)*aux(8) s(14) =< it(16)*aux(8) aux(5) =< it(16)*aux(4) s(15) =< aux(3)*2 s(17) =< aux(5)*2 s(16) =< aux(5) with precondition: [V>=1,Out>=0,V>=Out] * Chain [20]: 0 with precondition: [Out=0,V>=0] #### Cost of chains of fun(V,Out): * Chain [22]: 5*s(20)+2*s(23)+1*s(25)+1*s(26)+3*s(27)+1 Such that:s(19) =< V s(20) =< s(19) s(21) =< s(19) s(22) =< s(20)*s(19) s(23) =< s(20)*s(19) s(24) =< s(20)*s(21) s(25) =< s(22)*2 s(26) =< s(24)*2 s(27) =< s(24) with precondition: [Out=0,V>=0] * Chain [21]: 6*s(29)+2*s(32)+1*s(34)+1*s(35)+3*s(36)+1 Such that:aux(9) =< V s(29) =< aux(9) s(30) =< aux(9) s(31) =< s(29)*aux(9) s(32) =< s(29)*aux(9) s(33) =< s(29)*s(30) s(34) =< s(31)*2 s(35) =< s(33)*2 s(36) =< s(33) with precondition: [Out>=1,V>=2*Out] #### Cost of chains of fun2(V,Out): * Chain [25]: 0 with precondition: [Out=0,V>=0] * Chain [24]: 0 with precondition: [Out=1,V>=0] * Chain [23]: 5*s(39)+2*s(42)+1*s(44)+1*s(45)+3*s(46)+0 Such that:s(38) =< V s(39) =< s(38) s(40) =< s(38) s(41) =< s(39)*s(38) s(42) =< s(39)*s(38) s(43) =< s(39)*s(40) s(44) =< s(41)*2 s(45) =< s(43)*2 s(46) =< s(43) with precondition: [V>=1,Out>=1,V+1>=Out] #### Cost of chains of fun3(V,Out): * Chain [29]: 5*s(48)+2*s(51)+1*s(53)+1*s(54)+3*s(55)+1 Such that:s(47) =< V s(48) =< s(47) s(49) =< s(47) s(50) =< s(48)*s(47) s(51) =< s(48)*s(47) s(52) =< s(48)*s(49) s(53) =< s(50)*2 s(54) =< s(52)*2 s(55) =< s(52) with precondition: [Out=0,V>=0] * Chain [28]: 5*s(57)+2*s(60)+1*s(62)+1*s(63)+3*s(64)+3 Such that:s(56) =< V s(57) =< s(56) s(58) =< s(56) s(59) =< s(57)*s(56) s(60) =< s(57)*s(56) s(61) =< s(57)*s(58) s(62) =< s(59)*2 s(63) =< s(61)*2 s(64) =< s(61) with precondition: [Out=1,V>=2] * Chain [27]: 7*s(66)+2*s(69)+1*s(71)+1*s(72)+3*s(73)+1*s(75)+1 Such that:s(75) =< 2*V aux(10) =< V s(66) =< aux(10) s(67) =< aux(10) s(68) =< s(66)*aux(10) s(69) =< s(66)*aux(10) s(70) =< s(66)*s(67) s(71) =< s(68)*2 s(72) =< s(70)*2 s(73) =< s(70) with precondition: [Out>=1,V>=4*Out] * Chain [26]: 7*s(77)+2*s(80)+1*s(82)+1*s(83)+3*s(84)+1*s(86)+3 Such that:s(86) =< 2*V aux(11) =< V s(77) =< aux(11) s(78) =< aux(11) s(79) =< s(77)*aux(11) s(80) =< s(77)*aux(11) s(81) =< s(77)*s(78) s(82) =< s(79)*2 s(83) =< s(81)*2 s(84) =< s(81) with precondition: [Out>=2,V+4>=4*Out] #### Cost of chains of start(V): * Chain [30]: 50*s(87)+4*s(89)+16*s(96)+8*s(98)+8*s(99)+24*s(100)+3 Such that:aux(12) =< V aux(13) =< 2*V s(87) =< aux(12) s(89) =< aux(13) s(94) =< aux(12) s(95) =< s(87)*aux(12) s(96) =< s(87)*aux(12) s(97) =< s(87)*s(94) s(98) =< s(95)*2 s(99) =< s(97)*2 s(100) =< s(97) with precondition: [] Closed-form bounds of start(V): ------------------------------------- * Chain [30] with precondition: [] - Upper bound: nat(V)*50+3+nat(V)*72*nat(V)+nat(2*V)*4 - Complexity: n^2 ### Maximum cost of start(V): nat(V)*50+3+nat(V)*72*nat(V)+nat(2*V)*4 Asymptotic class: n^2 * Total analysis performed in 259 ms. ---------------------------------------- (16) BOUNDS(1, n^2) ---------------------------------------- (17) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (18) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (19) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence half(s(s(x))) ->^+ s(half(x)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [x / s(s(x))]. The result substitution is [ ]. ---------------------------------------- (20) Complex Obligation (BEST) ---------------------------------------- (21) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (22) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (23) BOUNDS(n^1, INF) ---------------------------------------- (24) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(s(x))) -> s(half(x)) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(half(x)))) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_half(x_1)) -> half(encArg(x_1)) encArg(cons_log(x_1)) -> log(encArg(x_1)) encode_half(x_1) -> half(encArg(x_1)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_log(x_1) -> log(encArg(x_1)) Rewrite Strategy: FULL