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