1090.44/291.55 WORST_CASE(Omega(n^1), O(n^2)) 1090.44/291.58 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 1090.44/291.58 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1090.44/291.58 1090.44/291.58 1090.44/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1090.44/291.58 1090.44/291.58 (0) CpxTRS 1090.44/291.58 (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] 1090.44/291.58 (2) CpxTRS 1090.44/291.58 (3) NonCtorToCtorProof [UPPER BOUND(ID), 0 ms] 1090.44/291.58 (4) CpxRelTRS 1090.44/291.58 (5) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 1090.44/291.58 (6) CpxRelTRS 1090.44/291.58 (7) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 1090.44/291.58 (8) CpxWeightedTrs 1090.44/291.58 (9) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 1090.44/291.58 (10) CpxWeightedTrs 1090.44/291.58 (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1090.44/291.58 (12) CpxTypedWeightedTrs 1090.44/291.58 (13) CompletionProof [UPPER BOUND(ID), 0 ms] 1090.44/291.58 (14) CpxTypedWeightedCompleteTrs 1090.44/291.58 (15) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 1090.44/291.58 (16) CpxRNTS 1090.44/291.58 (17) CompleteCoflocoProof [FINISHED, 305 ms] 1090.44/291.58 (18) BOUNDS(1, n^2) 1090.44/291.58 (19) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 1090.44/291.58 (20) CpxTRS 1090.44/291.58 (21) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1090.44/291.58 (22) typed CpxTrs 1090.44/291.58 (23) OrderProof [LOWER BOUND(ID), 0 ms] 1090.44/291.58 (24) typed CpxTrs 1090.44/291.58 (25) RewriteLemmaProof [LOWER BOUND(ID), 1048 ms] 1090.44/291.58 (26) BEST 1090.44/291.58 (27) proven lower bound 1090.44/291.58 (28) LowerBoundPropagationProof [FINISHED, 0 ms] 1090.44/291.58 (29) BOUNDS(n^1, INF) 1090.44/291.58 (30) typed CpxTrs 1090.44/291.58 (31) RewriteLemmaProof [LOWER BOUND(ID), 25 ms] 1090.44/291.58 (32) BOUNDS(1, INF) 1090.44/291.58 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (0) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 1090.44/291.58 +(0, x) -> x 1090.44/291.58 +(x, 0) -> x 1090.44/291.58 +(O(x), O(y)) -> O(+(x, y)) 1090.44/291.58 +(O(x), I(y)) -> I(+(x, y)) 1090.44/291.58 +(I(x), O(y)) -> I(+(x, y)) 1090.44/291.58 +(I(x), I(y)) -> O(+(+(x, y), I(0))) 1090.44/291.58 *(0, x) -> 0 1090.44/291.58 *(x, 0) -> 0 1090.44/291.58 *(O(x), y) -> O(*(x, y)) 1090.44/291.58 *(I(x), y) -> +(O(*(x, y)), y) 1090.44/291.58 1090.44/291.58 S is empty. 1090.44/291.58 Rewrite Strategy: FULL 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) 1090.44/291.58 The following defined symbols can occur below the 0th argument of +: O, +, * 1090.44/291.58 The following defined symbols can occur below the 0th argument of O: O, +, * 1090.44/291.58 1090.44/291.58 Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: 1090.44/291.58 +(O(x), O(y)) -> O(+(x, y)) 1090.44/291.58 +(I(x), O(y)) -> I(+(x, y)) 1090.44/291.58 *(O(x), y) -> O(*(x, y)) 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (2) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 1090.44/291.58 +(0, x) -> x 1090.44/291.58 +(x, 0) -> x 1090.44/291.58 +(O(x), I(y)) -> I(+(x, y)) 1090.44/291.58 +(I(x), I(y)) -> O(+(+(x, y), I(0))) 1090.44/291.58 *(0, x) -> 0 1090.44/291.58 *(x, 0) -> 0 1090.44/291.58 *(I(x), y) -> +(O(*(x, y)), y) 1090.44/291.58 1090.44/291.58 S is empty. 1090.44/291.58 Rewrite Strategy: FULL 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (3) NonCtorToCtorProof (UPPER BOUND(ID)) 1090.44/291.58 transformed non-ctor to ctor-system 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (4) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 1090.44/291.58 +(0, x) -> x 1090.44/291.58 +(x, 0) -> x 1090.44/291.58 +(I(x), I(y)) -> O(+(+(x, y), I(0))) 1090.44/291.58 *(0, x) -> 0 1090.44/291.58 *(x, 0) -> 0 1090.44/291.58 *(I(x), y) -> +(O(*(x, y)), y) 1090.44/291.58 +(c_O(x), I(y)) -> I(+(x, y)) 1090.44/291.58 1090.44/291.58 The (relative) TRS S consists of the following rules: 1090.44/291.58 1090.44/291.58 O(x0) -> c_O(x0) 1090.44/291.58 1090.44/291.58 Rewrite Strategy: FULL 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (5) RcToIrcProof (BOTH BOUNDS(ID, ID)) 1090.44/291.58 Converted rc-obligation to irc-obligation. 1090.44/291.58 1090.44/291.58 The duplicating contexts are: 1090.44/291.58 *(I(x), []) 1090.44/291.58 1090.44/291.58 1090.44/291.58 The defined contexts are: 1090.44/291.58 +([], x1) 1090.44/291.58 O([]) 1090.44/291.58 +([], I(0)) 1090.44/291.58 1090.44/291.58 1090.44/291.58 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (6) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 1090.44/291.58 +(0, x) -> x 1090.44/291.58 +(x, 0) -> x 1090.44/291.58 +(I(x), I(y)) -> O(+(+(x, y), I(0))) 1090.44/291.58 *(0, x) -> 0 1090.44/291.58 *(x, 0) -> 0 1090.44/291.58 *(I(x), y) -> +(O(*(x, y)), y) 1090.44/291.58 +(c_O(x), I(y)) -> I(+(x, y)) 1090.44/291.58 1090.44/291.58 The (relative) TRS S consists of the following rules: 1090.44/291.58 1090.44/291.58 O(x0) -> c_O(x0) 1090.44/291.58 1090.44/291.58 Rewrite Strategy: INNERMOST 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (7) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 1090.44/291.58 Transformed relative TRS to weighted TRS 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (8) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 [1] 1090.44/291.58 +(0, x) -> x [1] 1090.44/291.58 +(x, 0) -> x [1] 1090.44/291.58 +(I(x), I(y)) -> O(+(+(x, y), I(0))) [1] 1090.44/291.58 *(0, x) -> 0 [1] 1090.44/291.58 *(x, 0) -> 0 [1] 1090.44/291.58 *(I(x), y) -> +(O(*(x, y)), y) [1] 1090.44/291.58 +(c_O(x), I(y)) -> I(+(x, y)) [1] 1090.44/291.58 O(x0) -> c_O(x0) [0] 1090.44/291.58 1090.44/291.58 Rewrite Strategy: INNERMOST 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (9) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) 1090.44/291.58 Renamed defined symbols to avoid conflicts with arithmetic symbols: 1090.44/291.58 1090.44/291.58 + => plus 1090.44/291.58 * => times 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (10) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 [1] 1090.44/291.58 plus(0, x) -> x [1] 1090.44/291.58 plus(x, 0) -> x [1] 1090.44/291.58 plus(I(x), I(y)) -> O(plus(plus(x, y), I(0))) [1] 1090.44/291.58 times(0, x) -> 0 [1] 1090.44/291.58 times(x, 0) -> 0 [1] 1090.44/291.58 times(I(x), y) -> plus(O(times(x, y)), y) [1] 1090.44/291.58 plus(c_O(x), I(y)) -> I(plus(x, y)) [1] 1090.44/291.58 O(x0) -> c_O(x0) [0] 1090.44/291.58 1090.44/291.58 Rewrite Strategy: INNERMOST 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1090.44/291.58 Infered types. 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (12) 1090.44/291.58 Obligation: 1090.44/291.58 Runtime Complexity Weighted TRS with Types. 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 [1] 1090.44/291.58 plus(0, x) -> x [1] 1090.44/291.58 plus(x, 0) -> x [1] 1090.44/291.58 plus(I(x), I(y)) -> O(plus(plus(x, y), I(0))) [1] 1090.44/291.58 times(0, x) -> 0 [1] 1090.44/291.58 times(x, 0) -> 0 [1] 1090.44/291.58 times(I(x), y) -> plus(O(times(x, y)), y) [1] 1090.44/291.58 plus(c_O(x), I(y)) -> I(plus(x, y)) [1] 1090.44/291.58 O(x0) -> c_O(x0) [0] 1090.44/291.58 1090.44/291.58 The TRS has the following type information: 1090.44/291.58 O :: 0:I:c_O -> 0:I:c_O 1090.44/291.58 0 :: 0:I:c_O 1090.44/291.58 plus :: 0:I:c_O -> 0:I:c_O -> 0:I:c_O 1090.44/291.58 I :: 0:I:c_O -> 0:I:c_O 1090.44/291.58 times :: 0:I:c_O -> 0:I:c_O -> 0:I:c_O 1090.44/291.58 c_O :: 0:I:c_O -> 0:I:c_O 1090.44/291.58 1090.44/291.58 Rewrite Strategy: INNERMOST 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (13) CompletionProof (UPPER BOUND(ID)) 1090.44/291.58 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 1090.44/291.58 1090.44/291.58 O(v0) -> null_O [0] 1090.44/291.58 plus(v0, v1) -> null_plus [0] 1090.44/291.58 times(v0, v1) -> null_times [0] 1090.44/291.58 1090.44/291.58 And the following fresh constants: null_O, null_plus, null_times 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (14) 1090.44/291.58 Obligation: 1090.44/291.58 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 1090.44/291.58 1090.44/291.58 Runtime Complexity Weighted TRS with Types. 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0) -> 0 [1] 1090.44/291.58 plus(0, x) -> x [1] 1090.44/291.58 plus(x, 0) -> x [1] 1090.44/291.58 plus(I(x), I(y)) -> O(plus(plus(x, y), I(0))) [1] 1090.44/291.58 times(0, x) -> 0 [1] 1090.44/291.58 times(x, 0) -> 0 [1] 1090.44/291.58 times(I(x), y) -> plus(O(times(x, y)), y) [1] 1090.44/291.58 plus(c_O(x), I(y)) -> I(plus(x, y)) [1] 1090.44/291.58 O(x0) -> c_O(x0) [0] 1090.44/291.58 O(v0) -> null_O [0] 1090.44/291.58 plus(v0, v1) -> null_plus [0] 1090.44/291.58 times(v0, v1) -> null_times [0] 1090.44/291.58 1090.44/291.58 The TRS has the following type information: 1090.44/291.58 O :: 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 0 :: 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 plus :: 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 I :: 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 times :: 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 c_O :: 0:I:c_O:null_O:null_plus:null_times -> 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 null_O :: 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 null_plus :: 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 null_times :: 0:I:c_O:null_O:null_plus:null_times 1090.44/291.58 1090.44/291.58 Rewrite Strategy: INNERMOST 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (15) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 1090.44/291.58 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 1090.44/291.58 The constant constructors are abstracted as follows: 1090.44/291.58 1090.44/291.58 0 => 0 1090.44/291.58 null_O => 0 1090.44/291.58 null_plus => 0 1090.44/291.58 null_times => 0 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (16) 1090.44/291.58 Obligation: 1090.44/291.58 Complexity RNTS consisting of the following rules: 1090.44/291.58 1090.44/291.58 O(z) -{ 1 }-> 0 :|: z = 0 1090.44/291.58 O(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 1090.44/291.58 O(z) -{ 0 }-> 1 + x0 :|: z = x0, x0 >= 0 1090.44/291.58 plus(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = 0 1090.44/291.58 plus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 1090.44/291.58 plus(z, z') -{ 1 }-> O(plus(plus(x, y), 1 + 0)) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 1090.44/291.58 plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1090.44/291.58 plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 1090.44/291.58 times(z, z') -{ 1 }-> plus(O(times(x, y)), y) :|: x >= 0, y >= 0, z = 1 + x, z' = y 1090.44/291.58 times(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 1090.44/291.58 times(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 1090.44/291.58 times(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1090.44/291.58 1090.44/291.58 Only complete derivations are relevant for the runtime complexity. 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (17) CompleteCoflocoProof (FINISHED) 1090.44/291.58 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 1090.44/291.58 1090.44/291.58 eq(start(V, V1),0,[fun(V, Out)],[V >= 0]). 1090.44/291.58 eq(start(V, V1),0,[plus(V, V1, Out)],[V >= 0,V1 >= 0]). 1090.44/291.58 eq(start(V, V1),0,[times(V, V1, Out)],[V >= 0,V1 >= 0]). 1090.44/291.58 eq(fun(V, Out),1,[],[Out = 0,V = 0]). 1090.44/291.58 eq(plus(V, V1, Out),1,[],[Out = V2,V1 = V2,V2 >= 0,V = 0]). 1090.44/291.58 eq(plus(V, V1, Out),1,[],[Out = V3,V3 >= 0,V = V3,V1 = 0]). 1090.44/291.58 eq(plus(V, V1, Out),1,[plus(V4, V5, Ret00),plus(Ret00, 1 + 0, Ret0),fun(Ret0, Ret)],[Out = Ret,V1 = 1 + V5,V4 >= 0,V5 >= 0,V = 1 + V4]). 1090.44/291.58 eq(times(V, V1, Out),1,[],[Out = 0,V1 = V6,V6 >= 0,V = 0]). 1090.44/291.58 eq(times(V, V1, Out),1,[],[Out = 0,V7 >= 0,V = V7,V1 = 0]). 1090.44/291.58 eq(times(V, V1, Out),1,[times(V8, V9, Ret001),fun(Ret001, Ret01),plus(Ret01, V9, Ret1)],[Out = Ret1,V8 >= 0,V9 >= 0,V = 1 + V8,V1 = V9]). 1090.44/291.58 eq(plus(V, V1, Out),1,[plus(V11, V10, Ret11)],[Out = 1 + Ret11,V1 = 1 + V10,V11 >= 0,V10 >= 0,V = 1 + V11]). 1090.44/291.58 eq(fun(V, Out),0,[],[Out = 1 + V12,V = V12,V12 >= 0]). 1090.44/291.58 eq(fun(V, Out),0,[],[Out = 0,V13 >= 0,V = V13]). 1090.44/291.58 eq(plus(V, V1, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V = V15,V1 = V14]). 1090.44/291.58 eq(times(V, V1, Out),0,[],[Out = 0,V17 >= 0,V16 >= 0,V = V17,V1 = V16]). 1090.44/291.58 input_output_vars(fun(V,Out),[V],[Out]). 1090.44/291.58 input_output_vars(plus(V,V1,Out),[V,V1],[Out]). 1090.44/291.58 input_output_vars(times(V,V1,Out),[V,V1],[Out]). 1090.44/291.58 1090.44/291.58 1090.44/291.58 CoFloCo proof output: 1090.44/291.58 Preprocessing Cost Relations 1090.44/291.58 ===================================== 1090.44/291.58 1090.44/291.58 #### Computed strongly connected components 1090.44/291.58 0. non_recursive : [fun/2] 1090.44/291.58 1. recursive [non_tail,multiple] : [plus/3] 1090.44/291.58 2. recursive [non_tail] : [times/3] 1090.44/291.58 3. non_recursive : [start/2] 1090.44/291.58 1090.44/291.58 #### Obtained direct recursion through partial evaluation 1090.44/291.58 0. SCC is partially evaluated into fun/2 1090.44/291.58 1. SCC is partially evaluated into plus/3 1090.44/291.58 2. SCC is partially evaluated into times/3 1090.44/291.58 3. SCC is partially evaluated into start/2 1090.44/291.58 1090.44/291.58 Control-Flow Refinement of Cost Relations 1090.44/291.58 ===================================== 1090.44/291.58 1090.44/291.58 ### Specialization of cost equations fun/2 1090.44/291.58 * CE 5 is refined into CE [16] 1090.44/291.58 * CE 4 is refined into CE [17] 1090.44/291.58 * CE 6 is refined into CE [18] 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Cost equations --> "Loop" of fun/2 1090.44/291.58 * CEs [16] --> Loop 12 1090.44/291.58 * CEs [17,18] --> Loop 13 1090.44/291.58 1090.44/291.58 ### Ranking functions of CR fun(V,Out) 1090.44/291.58 1090.44/291.58 #### Partial ranking functions of CR fun(V,Out) 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Specialization of cost equations plus/3 1090.44/291.58 * CE 11 is refined into CE [19] 1090.44/291.58 * CE 8 is refined into CE [20] 1090.44/291.58 * CE 7 is refined into CE [21] 1090.44/291.58 * CE 10 is refined into CE [22] 1090.44/291.58 * CE 9 is refined into CE [23,24] 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Cost equations --> "Loop" of plus/3 1090.44/291.58 * CEs [24] --> Loop 14 1090.44/291.58 * CEs [23] --> Loop 15 1090.44/291.58 * CEs [22] --> Loop 16 1090.44/291.58 * CEs [19] --> Loop 17 1090.44/291.58 * CEs [20] --> Loop 18 1090.44/291.58 * CEs [21] --> Loop 19 1090.44/291.58 1090.44/291.58 ### Ranking functions of CR plus(V,V1,Out) 1090.44/291.58 1090.44/291.58 #### Partial ranking functions of CR plus(V,V1,Out) 1090.44/291.58 * Partial RF of phase [14,15,16]: 1090.44/291.58 - RF of loop [14:1,15:1,16:1]: 1090.44/291.58 V depends on loops [14:2,15:2] 1090.44/291.58 V1 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Specialization of cost equations times/3 1090.44/291.58 * CE 13 is refined into CE [25] 1090.44/291.58 * CE 12 is refined into CE [26] 1090.44/291.58 * CE 15 is refined into CE [27] 1090.44/291.58 * CE 14 is refined into CE [28,29,30,31,32,33] 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Cost equations --> "Loop" of times/3 1090.44/291.58 * CEs [33] --> Loop 20 1090.44/291.58 * CEs [28] --> Loop 21 1090.44/291.58 * CEs [31] --> Loop 22 1090.44/291.58 * CEs [29,30,32] --> Loop 23 1090.44/291.58 * CEs [25] --> Loop 24 1090.44/291.58 * CEs [26,27] --> Loop 25 1090.44/291.58 1090.44/291.58 ### Ranking functions of CR times(V,V1,Out) 1090.44/291.58 * RF of phase [20,21,22,23]: [V] 1090.44/291.58 1090.44/291.58 #### Partial ranking functions of CR times(V,V1,Out) 1090.44/291.58 * Partial RF of phase [20,21,22,23]: 1090.44/291.58 - RF of loop [20:1,21:1,22:1,23:1]: 1090.44/291.58 V 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Specialization of cost equations start/2 1090.44/291.58 * CE 1 is refined into CE [34,35] 1090.44/291.58 * CE 2 is refined into CE [36,37,38,39] 1090.44/291.58 * CE 3 is refined into CE [40,41] 1090.44/291.58 1090.44/291.58 1090.44/291.58 ### Cost equations --> "Loop" of start/2 1090.44/291.58 * CEs [37] --> Loop 26 1090.44/291.58 * CEs [34,35,36,38,40,41] --> Loop 27 1090.44/291.58 * CEs [39] --> Loop 28 1090.44/291.58 1090.44/291.58 ### Ranking functions of CR start(V,V1) 1090.44/291.58 1090.44/291.58 #### Partial ranking functions of CR start(V,V1) 1090.44/291.58 1090.44/291.58 1090.44/291.58 Computing Bounds 1090.44/291.58 ===================================== 1090.44/291.58 1090.44/291.58 #### Cost of chains of fun(V,Out): 1090.44/291.58 * Chain [13]: 1 1090.44/291.58 with precondition: [Out=0,V>=0] 1090.44/291.58 1090.44/291.58 * Chain [12]: 0 1090.44/291.58 with precondition: [V+1=Out,V>=0] 1090.44/291.58 1090.44/291.58 1090.44/291.58 #### Cost of chains of plus(V,V1,Out): 1090.44/291.58 * Chain [multiple([14,15,16],[[],[19],[18],[17]])]...: 4*it(14)+2*it([18])+0 1090.44/291.58 Such that:aux(1) =< 1 1090.44/291.58 aux(2) =< 2*V1 1090.44/291.58 it(14) =< aux(2) 1090.44/291.58 it([18]) =< it(14)+it(14)+aux(1) 1090.44/291.58 1090.44/291.58 with precondition: [V>=1,V1>=1] 1090.44/291.58 1090.44/291.58 * Chain [19]: 1 1090.44/291.58 with precondition: [V=0,V1=Out,V1>=0] 1090.44/291.58 1090.44/291.58 * Chain [18]: 1 1090.44/291.58 with precondition: [V1=0,V=Out,V>=0] 1090.44/291.58 1090.44/291.58 * Chain [17]: 0 1090.44/291.58 with precondition: [Out=0,V>=0,V1>=0] 1090.44/291.58 1090.44/291.58 1090.44/291.58 #### Cost of chains of times(V,V1,Out): 1090.44/291.58 * Chain [[20,21,22,23],25]: 9*it(20)+4*s(9)+2*s(10)+1 1090.44/291.58 Such that:aux(4) =< 2*V1 1090.44/291.58 aux(7) =< V 1090.44/291.58 it(20) =< aux(7) 1090.44/291.58 s(12) =< it(20)*aux(4) 1090.44/291.58 s(9) =< s(12) 1090.44/291.58 s(10) =< s(9)+s(9)+aux(7) 1090.44/291.58 1090.44/291.58 with precondition: [V>=1,V1>=0] 1090.44/291.58 1090.44/291.58 * Chain [[20,21,22,23],24]: 9*it(20)+2*s(10)+1 1090.44/291.58 Such that:aux(8) =< V 1090.44/291.58 it(20) =< aux(8) 1090.44/291.58 s(10) =< aux(8) 1090.44/291.58 1090.44/291.58 with precondition: [V1=0,V>=1,Out>=0,V>=Out] 1090.44/291.58 1090.44/291.58 * Chain [25]: 1 1090.44/291.58 with precondition: [Out=0,V>=0,V1>=0] 1090.44/291.58 1090.44/291.58 * Chain [24]: 1 1090.44/291.58 with precondition: [V1=0,Out=0,V>=0] 1090.44/291.58 1090.44/291.58 1090.44/291.58 #### Cost of chains of start(V,V1): 1090.44/291.58 * Chain [28]...: 4*s(24)+2*s(25)+0 1090.44/291.58 Such that:s(22) =< 1 1090.44/291.58 s(23) =< 2*V1 1090.44/291.58 s(24) =< s(23) 1090.44/291.58 s(25) =< s(24)+s(24)+s(22) 1090.44/291.58 1090.44/291.58 with precondition: [V>=1,V1>=1] 1090.44/291.58 1090.44/291.58 * Chain [27]: 20*s(28)+4*s(30)+2*s(31)+1 1090.44/291.58 Such that:s(27) =< V 1090.44/291.58 s(26) =< 2*V1 1090.44/291.58 s(28) =< s(27) 1090.44/291.58 s(29) =< s(28)*s(26) 1090.44/291.58 s(30) =< s(29) 1090.44/291.58 s(31) =< s(30)+s(30)+s(27) 1090.44/291.58 1090.44/291.58 with precondition: [V>=0] 1090.44/291.58 1090.44/291.58 * Chain [26]: 1 1090.44/291.58 with precondition: [V1=0,V>=0] 1090.44/291.58 1090.44/291.58 1090.44/291.58 Closed-form bounds of start(V,V1): 1090.44/291.58 ------------------------------------- 1090.44/291.58 * Chain [28]... with precondition: [V>=1,V1>=1] 1090.44/291.58 - Upper bound: 16*V1+2 1090.44/291.58 - Complexity: n 1090.44/291.58 * Chain [27] with precondition: [V>=0] 1090.44/291.58 - Upper bound: 22*V+1+8*V*nat(2*V1) 1090.44/291.58 - Complexity: n^2 1090.44/291.58 * Chain [26] with precondition: [V1=0,V>=0] 1090.44/291.58 - Upper bound: 1 1090.44/291.58 - Complexity: constant 1090.44/291.58 1090.44/291.58 ### Maximum cost of start(V,V1): max([nat(2*V1)*8+1,8*V*nat(2*V1)+22*V])+1 1090.44/291.58 Asymptotic class: n^2 1090.44/291.58 * Total analysis performed in 221 ms. 1090.44/291.58 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (18) 1090.44/291.58 BOUNDS(1, n^2) 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (19) RenamingProof (BOTH BOUNDS(ID, ID)) 1090.44/291.58 Renamed function symbols to avoid clashes with predefined symbol. 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (20) 1090.44/291.58 Obligation: 1090.44/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1090.44/291.58 1090.44/291.58 1090.44/291.58 The TRS R consists of the following rules: 1090.44/291.58 1090.44/291.58 O(0') -> 0' 1090.44/291.58 +'(0', x) -> x 1090.44/291.58 +'(x, 0') -> x 1090.44/291.58 +'(O(x), O(y)) -> O(+'(x, y)) 1090.44/291.58 +'(O(x), I(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), O(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) 1090.44/291.58 *'(0', x) -> 0' 1090.44/291.58 *'(x, 0') -> 0' 1090.44/291.58 *'(O(x), y) -> O(*'(x, y)) 1090.44/291.58 *'(I(x), y) -> +'(O(*'(x, y)), y) 1090.44/291.58 1090.44/291.58 S is empty. 1090.44/291.58 Rewrite Strategy: FULL 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (21) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1090.44/291.58 Infered types. 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (22) 1090.44/291.58 Obligation: 1090.44/291.58 TRS: 1090.44/291.58 Rules: 1090.44/291.58 O(0') -> 0' 1090.44/291.58 +'(0', x) -> x 1090.44/291.58 +'(x, 0') -> x 1090.44/291.58 +'(O(x), O(y)) -> O(+'(x, y)) 1090.44/291.58 +'(O(x), I(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), O(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) 1090.44/291.58 *'(0', x) -> 0' 1090.44/291.58 *'(x, 0') -> 0' 1090.44/291.58 *'(O(x), y) -> O(*'(x, y)) 1090.44/291.58 *'(I(x), y) -> +'(O(*'(x, y)), y) 1090.44/291.58 1090.44/291.58 Types: 1090.44/291.58 O :: 0':I -> 0':I 1090.44/291.58 0' :: 0':I 1090.44/291.58 +' :: 0':I -> 0':I -> 0':I 1090.44/291.58 I :: 0':I -> 0':I 1090.44/291.58 *' :: 0':I -> 0':I -> 0':I 1090.44/291.58 hole_0':I1_0 :: 0':I 1090.44/291.58 gen_0':I2_0 :: Nat -> 0':I 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (23) OrderProof (LOWER BOUND(ID)) 1090.44/291.58 Heuristically decided to analyse the following defined symbols: 1090.44/291.58 +', *' 1090.44/291.58 1090.44/291.58 They will be analysed ascendingly in the following order: 1090.44/291.58 +' < *' 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (24) 1090.44/291.58 Obligation: 1090.44/291.58 TRS: 1090.44/291.58 Rules: 1090.44/291.58 O(0') -> 0' 1090.44/291.58 +'(0', x) -> x 1090.44/291.58 +'(x, 0') -> x 1090.44/291.58 +'(O(x), O(y)) -> O(+'(x, y)) 1090.44/291.58 +'(O(x), I(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), O(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) 1090.44/291.58 *'(0', x) -> 0' 1090.44/291.58 *'(x, 0') -> 0' 1090.44/291.58 *'(O(x), y) -> O(*'(x, y)) 1090.44/291.58 *'(I(x), y) -> +'(O(*'(x, y)), y) 1090.44/291.58 1090.44/291.58 Types: 1090.44/291.58 O :: 0':I -> 0':I 1090.44/291.58 0' :: 0':I 1090.44/291.58 +' :: 0':I -> 0':I -> 0':I 1090.44/291.58 I :: 0':I -> 0':I 1090.44/291.58 *' :: 0':I -> 0':I -> 0':I 1090.44/291.58 hole_0':I1_0 :: 0':I 1090.44/291.58 gen_0':I2_0 :: Nat -> 0':I 1090.44/291.58 1090.44/291.58 1090.44/291.58 Generator Equations: 1090.44/291.58 gen_0':I2_0(0) <=> 0' 1090.44/291.58 gen_0':I2_0(+(x, 1)) <=> I(gen_0':I2_0(x)) 1090.44/291.58 1090.44/291.58 1090.44/291.58 The following defined symbols remain to be analysed: 1090.44/291.58 +', *' 1090.44/291.58 1090.44/291.58 They will be analysed ascendingly in the following order: 1090.44/291.58 +' < *' 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (25) RewriteLemmaProof (LOWER BOUND(ID)) 1090.44/291.58 Proved the following rewrite lemma: 1090.44/291.58 +'(gen_0':I2_0(n4_0), gen_0':I2_0(n4_0)) -> *3_0, rt in Omega(n4_0) 1090.44/291.58 1090.44/291.58 Induction Base: 1090.44/291.58 +'(gen_0':I2_0(0), gen_0':I2_0(0)) 1090.44/291.58 1090.44/291.58 Induction Step: 1090.44/291.58 +'(gen_0':I2_0(+(n4_0, 1)), gen_0':I2_0(+(n4_0, 1))) ->_R^Omega(1) 1090.44/291.58 O(+'(+'(gen_0':I2_0(n4_0), gen_0':I2_0(n4_0)), I(0'))) ->_IH 1090.44/291.58 O(+'(*3_0, I(0'))) 1090.44/291.58 1090.44/291.58 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (26) 1090.44/291.58 Complex Obligation (BEST) 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (27) 1090.44/291.58 Obligation: 1090.44/291.58 Proved the lower bound n^1 for the following obligation: 1090.44/291.58 1090.44/291.58 TRS: 1090.44/291.58 Rules: 1090.44/291.58 O(0') -> 0' 1090.44/291.58 +'(0', x) -> x 1090.44/291.58 +'(x, 0') -> x 1090.44/291.58 +'(O(x), O(y)) -> O(+'(x, y)) 1090.44/291.58 +'(O(x), I(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), O(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) 1090.44/291.58 *'(0', x) -> 0' 1090.44/291.58 *'(x, 0') -> 0' 1090.44/291.58 *'(O(x), y) -> O(*'(x, y)) 1090.44/291.58 *'(I(x), y) -> +'(O(*'(x, y)), y) 1090.44/291.58 1090.44/291.58 Types: 1090.44/291.58 O :: 0':I -> 0':I 1090.44/291.58 0' :: 0':I 1090.44/291.58 +' :: 0':I -> 0':I -> 0':I 1090.44/291.58 I :: 0':I -> 0':I 1090.44/291.58 *' :: 0':I -> 0':I -> 0':I 1090.44/291.58 hole_0':I1_0 :: 0':I 1090.44/291.58 gen_0':I2_0 :: Nat -> 0':I 1090.44/291.58 1090.44/291.58 1090.44/291.58 Generator Equations: 1090.44/291.58 gen_0':I2_0(0) <=> 0' 1090.44/291.58 gen_0':I2_0(+(x, 1)) <=> I(gen_0':I2_0(x)) 1090.44/291.58 1090.44/291.58 1090.44/291.58 The following defined symbols remain to be analysed: 1090.44/291.58 +', *' 1090.44/291.58 1090.44/291.58 They will be analysed ascendingly in the following order: 1090.44/291.58 +' < *' 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (28) LowerBoundPropagationProof (FINISHED) 1090.44/291.58 Propagated lower bound. 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (29) 1090.44/291.58 BOUNDS(n^1, INF) 1090.44/291.58 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (30) 1090.44/291.58 Obligation: 1090.44/291.58 TRS: 1090.44/291.58 Rules: 1090.44/291.58 O(0') -> 0' 1090.44/291.58 +'(0', x) -> x 1090.44/291.58 +'(x, 0') -> x 1090.44/291.58 +'(O(x), O(y)) -> O(+'(x, y)) 1090.44/291.58 +'(O(x), I(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), O(y)) -> I(+'(x, y)) 1090.44/291.58 +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) 1090.44/291.58 *'(0', x) -> 0' 1090.44/291.58 *'(x, 0') -> 0' 1090.44/291.58 *'(O(x), y) -> O(*'(x, y)) 1090.44/291.58 *'(I(x), y) -> +'(O(*'(x, y)), y) 1090.44/291.58 1090.44/291.58 Types: 1090.44/291.58 O :: 0':I -> 0':I 1090.44/291.58 0' :: 0':I 1090.44/291.58 +' :: 0':I -> 0':I -> 0':I 1090.44/291.58 I :: 0':I -> 0':I 1090.44/291.58 *' :: 0':I -> 0':I -> 0':I 1090.44/291.58 hole_0':I1_0 :: 0':I 1090.44/291.58 gen_0':I2_0 :: Nat -> 0':I 1090.44/291.58 1090.44/291.58 1090.44/291.58 Lemmas: 1090.44/291.58 +'(gen_0':I2_0(n4_0), gen_0':I2_0(n4_0)) -> *3_0, rt in Omega(n4_0) 1090.44/291.58 1090.44/291.58 1090.44/291.58 Generator Equations: 1090.44/291.58 gen_0':I2_0(0) <=> 0' 1090.44/291.58 gen_0':I2_0(+(x, 1)) <=> I(gen_0':I2_0(x)) 1090.44/291.58 1090.44/291.58 1090.44/291.58 The following defined symbols remain to be analysed: 1090.44/291.58 *' 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (31) RewriteLemmaProof (LOWER BOUND(ID)) 1090.44/291.58 Proved the following rewrite lemma: 1090.44/291.58 *'(gen_0':I2_0(n40075_0), gen_0':I2_0(0)) -> gen_0':I2_0(0), rt in Omega(1 + n40075_0) 1090.44/291.58 1090.44/291.58 Induction Base: 1090.44/291.58 *'(gen_0':I2_0(0), gen_0':I2_0(0)) ->_R^Omega(1) 1090.44/291.58 0' 1090.44/291.58 1090.44/291.58 Induction Step: 1090.44/291.58 *'(gen_0':I2_0(+(n40075_0, 1)), gen_0':I2_0(0)) ->_R^Omega(1) 1090.44/291.58 +'(O(*'(gen_0':I2_0(n40075_0), gen_0':I2_0(0))), gen_0':I2_0(0)) ->_IH 1090.44/291.58 +'(O(gen_0':I2_0(0)), gen_0':I2_0(0)) ->_R^Omega(1) 1090.44/291.58 +'(0', gen_0':I2_0(0)) ->_R^Omega(1) 1090.44/291.58 gen_0':I2_0(0) 1090.44/291.58 1090.44/291.58 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1090.44/291.58 ---------------------------------------- 1090.44/291.58 1090.44/291.58 (32) 1090.44/291.58 BOUNDS(1, INF) 1090.85/291.69 EOF