891.97/291.45 WORST_CASE(Omega(n^1), O(n^2)) 892.27/291.47 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 892.27/291.47 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 892.27/291.47 892.27/291.47 892.27/291.47 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 892.27/291.47 892.27/291.47 (0) CpxTRS 892.27/291.47 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 892.27/291.47 (2) CpxTRS 892.27/291.47 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 892.27/291.47 (4) CpxWeightedTrs 892.27/291.47 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 892.27/291.47 (6) CpxTypedWeightedTrs 892.27/291.47 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 892.27/291.47 (8) CpxTypedWeightedCompleteTrs 892.27/291.47 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 892.27/291.47 (10) CpxRNTS 892.27/291.47 (11) CompleteCoflocoProof [FINISHED, 317 ms] 892.27/291.47 (12) BOUNDS(1, n^2) 892.27/291.47 (13) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 892.27/291.47 (14) TRS for Loop Detection 892.27/291.47 (15) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 892.27/291.47 (16) BEST 892.27/291.47 (17) proven lower bound 892.27/291.47 (18) LowerBoundPropagationProof [FINISHED, 0 ms] 892.27/291.47 (19) BOUNDS(n^1, INF) 892.27/291.47 (20) TRS for Loop Detection 892.27/291.47 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (0) 892.27/291.47 Obligation: 892.27/291.47 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 892.27/291.47 892.27/291.47 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true 892.27/291.47 lt(x, 0) -> false 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) 892.27/291.47 fac(x) -> help(x, 0) 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) 892.27/291.47 if(false, x, c) -> s(0) 892.27/291.47 892.27/291.47 S is empty. 892.27/291.47 Rewrite Strategy: FULL 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 892.27/291.47 Converted rc-obligation to irc-obligation. 892.27/291.47 892.27/291.47 The duplicating contexts are: 892.27/291.47 help(x, []) 892.27/291.47 help([], c) 892.27/291.47 if(true, x, []) 892.27/291.47 892.27/291.47 892.27/291.47 The defined contexts are: 892.27/291.47 if([], x1, x2) 892.27/291.47 892.27/291.47 892.27/291.47 [] just represents basic- or constructor-terms in the following defined contexts: 892.27/291.47 if([], x1, x2) 892.27/291.47 892.27/291.47 892.27/291.47 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (2) 892.27/291.47 Obligation: 892.27/291.47 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2). 892.27/291.47 892.27/291.47 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true 892.27/291.47 lt(x, 0) -> false 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) 892.27/291.47 fac(x) -> help(x, 0) 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) 892.27/291.47 if(false, x, c) -> s(0) 892.27/291.47 892.27/291.47 S is empty. 892.27/291.47 Rewrite Strategy: INNERMOST 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 892.27/291.47 Transformed relative TRS to weighted TRS 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (4) 892.27/291.47 Obligation: 892.27/291.47 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 892.27/291.47 892.27/291.47 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true [1] 892.27/291.47 lt(x, 0) -> false [1] 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) [1] 892.27/291.47 fac(x) -> help(x, 0) [1] 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) [1] 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) [1] 892.27/291.47 if(false, x, c) -> s(0) [1] 892.27/291.47 892.27/291.47 Rewrite Strategy: INNERMOST 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 892.27/291.47 Infered types. 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (6) 892.27/291.47 Obligation: 892.27/291.47 Runtime Complexity Weighted TRS with Types. 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true [1] 892.27/291.47 lt(x, 0) -> false [1] 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) [1] 892.27/291.47 fac(x) -> help(x, 0) [1] 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) [1] 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) [1] 892.27/291.47 if(false, x, c) -> s(0) [1] 892.27/291.47 892.27/291.47 The TRS has the following type information: 892.27/291.47 lt :: 0:s:times -> 0:s:times -> true:false 892.27/291.47 0 :: 0:s:times 892.27/291.47 s :: 0:s:times -> 0:s:times 892.27/291.47 true :: true:false 892.27/291.47 false :: true:false 892.27/291.47 fac :: 0:s:times -> 0:s:times 892.27/291.47 help :: 0:s:times -> 0:s:times -> 0:s:times 892.27/291.47 if :: true:false -> 0:s:times -> 0:s:times -> 0:s:times 892.27/291.47 times :: 0:s:times -> 0:s:times -> 0:s:times 892.27/291.47 892.27/291.47 Rewrite Strategy: INNERMOST 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (7) CompletionProof (UPPER BOUND(ID)) 892.27/291.47 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 892.27/291.47 892.27/291.47 lt(v0, v1) -> null_lt [0] 892.27/291.47 if(v0, v1, v2) -> null_if [0] 892.27/291.47 892.27/291.47 And the following fresh constants: null_lt, null_if 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (8) 892.27/291.47 Obligation: 892.27/291.47 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 892.27/291.47 892.27/291.47 Runtime Complexity Weighted TRS with Types. 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true [1] 892.27/291.47 lt(x, 0) -> false [1] 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) [1] 892.27/291.47 fac(x) -> help(x, 0) [1] 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) [1] 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) [1] 892.27/291.47 if(false, x, c) -> s(0) [1] 892.27/291.47 lt(v0, v1) -> null_lt [0] 892.27/291.47 if(v0, v1, v2) -> null_if [0] 892.27/291.47 892.27/291.47 The TRS has the following type information: 892.27/291.47 lt :: 0:s:times:null_if -> 0:s:times:null_if -> true:false:null_lt 892.27/291.47 0 :: 0:s:times:null_if 892.27/291.47 s :: 0:s:times:null_if -> 0:s:times:null_if 892.27/291.47 true :: true:false:null_lt 892.27/291.47 false :: true:false:null_lt 892.27/291.47 fac :: 0:s:times:null_if -> 0:s:times:null_if 892.27/291.47 help :: 0:s:times:null_if -> 0:s:times:null_if -> 0:s:times:null_if 892.27/291.47 if :: true:false:null_lt -> 0:s:times:null_if -> 0:s:times:null_if -> 0:s:times:null_if 892.27/291.47 times :: 0:s:times:null_if -> 0:s:times:null_if -> 0:s:times:null_if 892.27/291.47 null_lt :: true:false:null_lt 892.27/291.47 null_if :: 0:s:times:null_if 892.27/291.47 892.27/291.47 Rewrite Strategy: INNERMOST 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 892.27/291.47 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 892.27/291.47 The constant constructors are abstracted as follows: 892.27/291.47 892.27/291.47 0 => 0 892.27/291.47 true => 2 892.27/291.47 false => 1 892.27/291.47 null_lt => 0 892.27/291.47 null_if => 0 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (10) 892.27/291.47 Obligation: 892.27/291.47 Complexity RNTS consisting of the following rules: 892.27/291.47 892.27/291.47 fac(z) -{ 1 }-> help(x, 0) :|: x >= 0, z = x 892.27/291.47 help(z, z') -{ 1 }-> if(lt(c, x), x, c) :|: c >= 0, x >= 0, z' = c, z = x 892.27/291.47 if(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 892.27/291.47 if(z, z', z'') -{ 1 }-> 1 + 0 :|: z' = x, c >= 0, z = 1, x >= 0, z'' = c 892.27/291.47 if(z, z', z'') -{ 1 }-> 1 + (1 + c) + help(x, 1 + c) :|: z = 2, z' = x, c >= 0, x >= 0, z'' = c 892.27/291.47 lt(z, z') -{ 1 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 892.27/291.47 lt(z, z') -{ 1 }-> 2 :|: z' = 1 + x, x >= 0, z = 0 892.27/291.47 lt(z, z') -{ 1 }-> 1 :|: x >= 0, z = x, z' = 0 892.27/291.47 lt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 892.27/291.47 892.27/291.47 Only complete derivations are relevant for the runtime complexity. 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (11) CompleteCoflocoProof (FINISHED) 892.27/291.47 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 892.27/291.47 892.27/291.47 eq(start(V1, V, V9),0,[lt(V1, V, Out)],[V1 >= 0,V >= 0]). 892.27/291.47 eq(start(V1, V, V9),0,[fac(V1, Out)],[V1 >= 0]). 892.27/291.47 eq(start(V1, V, V9),0,[help(V1, V, Out)],[V1 >= 0,V >= 0]). 892.27/291.47 eq(start(V1, V, V9),0,[if(V1, V, V9, Out)],[V1 >= 0,V >= 0,V9 >= 0]). 892.27/291.47 eq(lt(V1, V, Out),1,[],[Out = 2,V = 1 + V2,V2 >= 0,V1 = 0]). 892.27/291.47 eq(lt(V1, V, Out),1,[],[Out = 1,V3 >= 0,V1 = V3,V = 0]). 892.27/291.47 eq(lt(V1, V, Out),1,[lt(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). 892.27/291.47 eq(fac(V1, Out),1,[help(V6, 0, Ret1)],[Out = Ret1,V6 >= 0,V1 = V6]). 892.27/291.47 eq(help(V1, V, Out),1,[lt(V8, V7, Ret0),if(Ret0, V7, V8, Ret2)],[Out = Ret2,V8 >= 0,V7 >= 0,V = V8,V1 = V7]). 892.27/291.47 eq(if(V1, V, V9, Out),1,[help(V10, 1 + V11, Ret11)],[Out = 2 + Ret11 + V11,V1 = 2,V = V10,V11 >= 0,V10 >= 0,V9 = V11]). 892.27/291.47 eq(if(V1, V, V9, Out),1,[],[Out = 1,V = V13,V12 >= 0,V1 = 1,V13 >= 0,V9 = V12]). 892.27/291.47 eq(lt(V1, V, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V1 = V15,V = V14]). 892.27/291.47 eq(if(V1, V, V9, Out),0,[],[Out = 0,V17 >= 0,V9 = V18,V16 >= 0,V1 = V17,V = V16,V18 >= 0]). 892.27/291.47 input_output_vars(lt(V1,V,Out),[V1,V],[Out]). 892.27/291.47 input_output_vars(fac(V1,Out),[V1],[Out]). 892.27/291.47 input_output_vars(help(V1,V,Out),[V1,V],[Out]). 892.27/291.47 input_output_vars(if(V1,V,V9,Out),[V1,V,V9],[Out]). 892.27/291.47 892.27/291.47 892.27/291.47 CoFloCo proof output: 892.27/291.47 Preprocessing Cost Relations 892.27/291.47 ===================================== 892.27/291.47 892.27/291.47 #### Computed strongly connected components 892.27/291.47 0. recursive : [lt/3] 892.27/291.47 1. recursive : [help/3,if/4] 892.27/291.47 2. non_recursive : [fac/2] 892.27/291.47 3. non_recursive : [start/3] 892.27/291.47 892.27/291.47 #### Obtained direct recursion through partial evaluation 892.27/291.47 0. SCC is partially evaluated into lt/3 892.27/291.47 1. SCC is partially evaluated into help/3 892.27/291.47 2. SCC is completely evaluated into other SCCs 892.27/291.47 3. SCC is partially evaluated into start/3 892.27/291.47 892.27/291.47 Control-Flow Refinement of Cost Relations 892.27/291.47 ===================================== 892.27/291.47 892.27/291.47 ### Specialization of cost equations lt/3 892.27/291.47 * CE 13 is refined into CE [14] 892.27/291.47 * CE 11 is refined into CE [15] 892.27/291.47 * CE 10 is refined into CE [16] 892.27/291.47 * CE 12 is refined into CE [17] 892.27/291.47 892.27/291.47 892.27/291.47 ### Cost equations --> "Loop" of lt/3 892.27/291.47 * CEs [17] --> Loop 10 892.27/291.47 * CEs [14] --> Loop 11 892.27/291.47 * CEs [15] --> Loop 12 892.27/291.47 * CEs [16] --> Loop 13 892.27/291.47 892.27/291.47 ### Ranking functions of CR lt(V1,V,Out) 892.27/291.47 * RF of phase [10]: [V,V1] 892.27/291.47 892.27/291.47 #### Partial ranking functions of CR lt(V1,V,Out) 892.27/291.47 * Partial RF of phase [10]: 892.27/291.47 - RF of loop [10:1]: 892.27/291.47 V 892.27/291.47 V1 892.27/291.47 892.27/291.47 892.27/291.47 ### Specialization of cost equations help/3 892.27/291.47 * CE 9 is refined into CE [18,19] 892.27/291.47 * CE 8 is refined into CE [20,21] 892.27/291.47 * CE 7 is refined into CE [22,23,24,25,26] 892.27/291.47 892.27/291.47 892.27/291.47 ### Cost equations --> "Loop" of help/3 892.27/291.47 * CEs [21] --> Loop 14 892.27/291.47 * CEs [22] --> Loop 15 892.27/291.47 * CEs [20] --> Loop 16 892.27/291.47 * CEs [23,24,25,26] --> Loop 17 892.27/291.47 * CEs [19] --> Loop 18 892.27/291.47 * CEs [18] --> Loop 19 892.27/291.47 892.27/291.47 ### Ranking functions of CR help(V1,V,Out) 892.27/291.47 * RF of phase [18]: [V1-V] 892.27/291.47 892.27/291.47 #### Partial ranking functions of CR help(V1,V,Out) 892.27/291.47 * Partial RF of phase [18]: 892.27/291.47 - RF of loop [18:1]: 892.27/291.47 V1-V 892.27/291.47 892.27/291.47 892.27/291.47 ### Specialization of cost equations start/3 892.27/291.47 * CE 3 is refined into CE [27,28,29,30] 892.27/291.47 * CE 1 is refined into CE [31] 892.27/291.47 * CE 2 is refined into CE [32] 892.27/291.47 * CE 4 is refined into CE [33,34,35,36,37] 892.27/291.47 * CE 5 is refined into CE [38,39,40,41,42] 892.27/291.47 * CE 6 is refined into CE [43,44,45,46,47,48,49] 892.27/291.47 892.27/291.47 892.27/291.47 ### Cost equations --> "Loop" of start/3 892.27/291.47 * CEs [34,46,47] --> Loop 20 892.27/291.47 * CEs [27,28,29,30] --> Loop 21 892.27/291.47 * CEs [32,39,44] --> Loop 22 892.27/291.47 * CEs [31,33,35,36,37,38,40,41,42,43,45,48,49] --> Loop 23 892.27/291.47 892.27/291.47 ### Ranking functions of CR start(V1,V,V9) 892.27/291.47 892.27/291.47 #### Partial ranking functions of CR start(V1,V,V9) 892.27/291.47 892.27/291.47 892.27/291.47 Computing Bounds 892.27/291.47 ===================================== 892.27/291.47 892.27/291.47 #### Cost of chains of lt(V1,V,Out): 892.27/291.47 * Chain [[10],13]: 1*it(10)+1 892.27/291.47 Such that:it(10) =< V1 892.27/291.47 892.27/291.47 with precondition: [Out=2,V1>=1,V>=V1+1] 892.27/291.47 892.27/291.47 * Chain [[10],12]: 1*it(10)+1 892.27/291.47 Such that:it(10) =< V 892.27/291.47 892.27/291.47 with precondition: [Out=1,V>=1,V1>=V] 892.27/291.47 892.27/291.47 * Chain [[10],11]: 1*it(10)+0 892.27/291.47 Such that:it(10) =< V 892.27/291.47 892.27/291.47 with precondition: [Out=0,V1>=1,V>=1] 892.27/291.47 892.27/291.47 * Chain [13]: 1 892.27/291.47 with precondition: [V1=0,Out=2,V>=1] 892.27/291.47 892.27/291.47 * Chain [12]: 1 892.27/291.47 with precondition: [V=0,Out=1,V1>=0] 892.27/291.47 892.27/291.47 * Chain [11]: 0 892.27/291.47 with precondition: [Out=0,V1>=0,V>=0] 892.27/291.47 892.27/291.47 892.27/291.47 #### Cost of chains of help(V1,V,Out): 892.27/291.47 * Chain [[18],17]: 3*it(18)+3*s(2)+1*s(7)+2 892.27/291.47 Such that:it(18) =< V1-V 892.27/291.47 aux(3) =< V1 892.27/291.47 s(2) =< aux(3) 892.27/291.47 s(7) =< it(18)*aux(3) 892.27/291.47 892.27/291.47 with precondition: [V>=1,V1>=V+1,Out>=V+2] 892.27/291.47 892.27/291.47 * Chain [[18],14]: 3*it(18)+1*s(7)+1*s(8)+3 892.27/291.47 Such that:it(18) =< V1-V 892.27/291.47 aux(4) =< V1 892.27/291.47 s(8) =< aux(4) 892.27/291.47 s(7) =< it(18)*aux(4) 892.27/291.47 892.27/291.47 with precondition: [V>=1,V1>=V+1,Out+3*V+1>=4*V1] 892.27/291.47 892.27/291.47 * Chain [19,[18],17]: 6*it(18)+1*s(7)+5 892.27/291.47 Such that:aux(5) =< V1 892.27/291.47 it(18) =< aux(5) 892.27/291.47 s(7) =< it(18)*aux(5) 892.27/291.47 892.27/291.47 with precondition: [V=0,V1>=2,Out>=5] 892.27/291.47 892.27/291.47 * Chain [19,[18],14]: 4*it(18)+1*s(7)+6 892.27/291.47 Such that:aux(6) =< V1 892.27/291.47 it(18) =< aux(6) 892.27/291.47 s(7) =< it(18)*aux(6) 892.27/291.47 892.27/291.47 with precondition: [V=0,V1>=2,Out+2>=4*V1] 892.27/291.47 892.27/291.47 * Chain [19,17]: 2*s(2)+1*s(4)+5 892.27/291.47 Such that:s(4) =< 1 892.27/291.47 aux(1) =< V1 892.27/291.47 s(2) =< aux(1) 892.27/291.47 892.27/291.47 with precondition: [V=0,Out=2,V1>=1] 892.27/291.47 892.27/291.47 * Chain [19,14]: 1*s(8)+6 892.27/291.47 Such that:s(8) =< 1 892.27/291.47 892.27/291.47 with precondition: [V1=1,V=0,Out=3] 892.27/291.47 892.27/291.47 * Chain [17]: 2*s(2)+1*s(4)+2 892.27/291.47 Such that:s(4) =< V 892.27/291.47 aux(1) =< V1 892.27/291.47 s(2) =< aux(1) 892.27/291.47 892.27/291.47 with precondition: [Out=0,V1>=0,V>=0] 892.27/291.47 892.27/291.47 * Chain [16]: 3 892.27/291.47 with precondition: [V1=0,Out=1,V>=0] 892.27/291.47 892.27/291.47 * Chain [15]: 2 892.27/291.47 with precondition: [V=0,Out=0,V1>=1] 892.27/291.47 892.27/291.47 * Chain [14]: 1*s(8)+3 892.27/291.47 Such that:s(8) =< V1 892.27/291.47 892.27/291.47 with precondition: [Out=1,V1>=1,V>=V1] 892.27/291.47 892.27/291.47 892.27/291.47 #### Cost of chains of start(V1,V,V9): 892.27/291.47 * Chain [23]: 3*s(26)+22*s(28)+1*s(32)+2*s(37)+6*s(44)+2*s(46)+7 892.27/291.47 Such that:s(32) =< 1 892.27/291.47 s(43) =< V1-V 892.27/291.47 aux(10) =< V1 892.27/291.47 aux(11) =< V 892.27/291.47 s(28) =< aux(10) 892.27/291.47 s(26) =< aux(11) 892.27/291.47 s(37) =< s(28)*aux(10) 892.27/291.47 s(44) =< s(43) 892.27/291.47 s(46) =< s(44)*aux(10) 892.27/291.47 892.27/291.47 with precondition: [V1>=0] 892.27/291.47 892.27/291.47 * Chain [22]: 9 892.27/291.47 with precondition: [V1=1] 892.27/291.47 892.27/291.47 * Chain [21]: 1*s(50)+7*s(51)+6*s(55)+2*s(57)+4 892.27/291.47 Such that:s(54) =< V-V9 892.27/291.47 s(50) =< V9+1 892.27/291.47 aux(13) =< V 892.27/291.47 s(51) =< aux(13) 892.27/291.47 s(55) =< s(54) 892.27/291.47 s(57) =< s(55)*aux(13) 892.27/291.47 892.27/291.47 with precondition: [V1=2,V>=0,V9>=0] 892.27/291.47 892.27/291.47 * Chain [20]: 1*s(58)+12*s(60)+2*s(63)+6 892.27/291.47 Such that:s(58) =< 1 892.27/291.47 aux(14) =< V1 892.27/291.47 s(60) =< aux(14) 892.27/291.47 s(63) =< s(60)*aux(14) 892.27/291.47 892.27/291.47 with precondition: [V=0,V1>=0] 892.27/291.47 892.27/291.47 892.27/291.47 Closed-form bounds of start(V1,V,V9): 892.27/291.47 ------------------------------------- 892.27/291.47 * Chain [23] with precondition: [V1>=0] 892.27/291.47 - Upper bound: 22*V1+8+2*V1*V1+2*V1*nat(V1-V)+nat(V)*3+nat(V1-V)*6 892.27/291.47 - Complexity: n^2 892.27/291.47 * Chain [22] with precondition: [V1=1] 892.27/291.47 - Upper bound: 9 892.27/291.47 - Complexity: constant 892.27/291.47 * Chain [21] with precondition: [V1=2,V>=0,V9>=0] 892.27/291.47 - Upper bound: 7*V+4+2*V*nat(V-V9)+(V9+1)+nat(V-V9)*6 892.27/291.47 - Complexity: n^2 892.27/291.47 * Chain [20] with precondition: [V=0,V1>=0] 892.27/291.47 - Upper bound: 12*V1+7+2*V1*V1 892.27/291.47 - Complexity: n^2 892.27/291.47 892.27/291.47 ### Maximum cost of start(V1,V,V9): max([max([5,nat(V)*2*nat(V-V9)+nat(V)*7+nat(V9+1)+nat(V-V9)*6]),10*V1+1+2*V1*nat(V1-V)+nat(V)*3+nat(V1-V)*6+(12*V1+3+2*V1*V1)])+4 892.27/291.47 Asymptotic class: n^2 892.27/291.47 * Total analysis performed in 248 ms. 892.27/291.47 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (12) 892.27/291.47 BOUNDS(1, n^2) 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (13) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 892.27/291.47 Transformed a relative TRS into a decreasing-loop problem. 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (14) 892.27/291.47 Obligation: 892.27/291.47 Analyzing the following TRS for decreasing loops: 892.27/291.47 892.27/291.47 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 892.27/291.47 892.27/291.47 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true 892.27/291.47 lt(x, 0) -> false 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) 892.27/291.47 fac(x) -> help(x, 0) 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) 892.27/291.47 if(false, x, c) -> s(0) 892.27/291.47 892.27/291.47 S is empty. 892.27/291.47 Rewrite Strategy: FULL 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (15) DecreasingLoopProof (LOWER BOUND(ID)) 892.27/291.47 The following loop(s) give(s) rise to the lower bound Omega(n^1): 892.27/291.47 892.27/291.47 The rewrite sequence 892.27/291.47 892.27/291.47 lt(s(x), s(y)) ->^+ lt(x, y) 892.27/291.47 892.27/291.47 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 892.27/291.47 892.27/291.47 The pumping substitution is [x / s(x), y / s(y)]. 892.27/291.47 892.27/291.47 The result substitution is [ ]. 892.27/291.47 892.27/291.47 892.27/291.47 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (16) 892.27/291.47 Complex Obligation (BEST) 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (17) 892.27/291.47 Obligation: 892.27/291.47 Proved the lower bound n^1 for the following obligation: 892.27/291.47 892.27/291.47 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 892.27/291.47 892.27/291.47 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true 892.27/291.47 lt(x, 0) -> false 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) 892.27/291.47 fac(x) -> help(x, 0) 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) 892.27/291.47 if(false, x, c) -> s(0) 892.27/291.47 892.27/291.47 S is empty. 892.27/291.47 Rewrite Strategy: FULL 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (18) LowerBoundPropagationProof (FINISHED) 892.27/291.47 Propagated lower bound. 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (19) 892.27/291.47 BOUNDS(n^1, INF) 892.27/291.47 892.27/291.47 ---------------------------------------- 892.27/291.47 892.27/291.47 (20) 892.27/291.47 Obligation: 892.27/291.47 Analyzing the following TRS for decreasing loops: 892.27/291.47 892.27/291.47 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 892.27/291.47 892.27/291.47 892.27/291.47 The TRS R consists of the following rules: 892.27/291.47 892.27/291.47 lt(0, s(x)) -> true 892.27/291.47 lt(x, 0) -> false 892.27/291.47 lt(s(x), s(y)) -> lt(x, y) 892.27/291.47 fac(x) -> help(x, 0) 892.27/291.47 help(x, c) -> if(lt(c, x), x, c) 892.27/291.47 if(true, x, c) -> times(s(c), help(x, s(c))) 892.27/291.47 if(false, x, c) -> s(0) 892.27/291.47 892.27/291.47 S is empty. 892.27/291.47 Rewrite Strategy: FULL 892.36/291.51 EOF