22.65/7.90 WORST_CASE(Omega(n^1), O(n^1)) 22.65/7.92 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 22.65/7.92 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 22.65/7.92 22.65/7.92 22.65/7.92 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). 22.65/7.92 22.65/7.92 (0) CpxRelTRS 22.65/7.92 (1) STerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 138 ms] 22.65/7.92 (2) CpxRelTRS 22.65/7.92 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 22.65/7.92 (4) CpxWeightedTrs 22.65/7.92 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 22.65/7.92 (6) CpxTypedWeightedTrs 22.65/7.92 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 22.65/7.92 (8) CpxTypedWeightedCompleteTrs 22.65/7.92 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 22.65/7.92 (10) CpxRNTS 22.65/7.92 (11) CompleteCoflocoProof [FINISHED, 338 ms] 22.65/7.92 (12) BOUNDS(1, n^1) 22.65/7.92 (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 22.65/7.92 (14) CpxRelTRS 22.65/7.92 (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 22.65/7.92 (16) typed CpxTrs 22.65/7.92 (17) OrderProof [LOWER BOUND(ID), 0 ms] 22.65/7.92 (18) typed CpxTrs 22.65/7.92 (19) RewriteLemmaProof [LOWER BOUND(ID), 238 ms] 22.65/7.92 (20) typed CpxTrs 22.65/7.92 (21) RewriteLemmaProof [LOWER BOUND(ID), 3 ms] 22.65/7.92 (22) proven lower bound 22.65/7.92 (23) LowerBoundPropagationProof [FINISHED, 0 ms] 22.65/7.92 (24) BOUNDS(n^1, INF) 22.65/7.92 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (0) 22.65/7.92 Obligation: 22.65/7.92 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). 22.65/7.92 22.65/7.92 22.65/7.92 The TRS R consists of the following rules: 22.65/7.92 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 22.65/7.92 The (relative) TRS S consists of the following rules: 22.65/7.92 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0, S(y)) -> False 22.65/7.92 !EQ(S(x), 0) -> False 22.65/7.92 !EQ(0, 0) -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Rewrite Strategy: INNERMOST 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (1) STerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) 22.65/7.92 proved termination of relative rules 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (2) 22.65/7.92 Obligation: 22.65/7.92 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). 22.65/7.92 22.65/7.92 22.65/7.92 The TRS R consists of the following rules: 22.65/7.92 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 22.65/7.92 The (relative) TRS S consists of the following rules: 22.65/7.92 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0, S(y)) -> False 22.65/7.92 !EQ(S(x), 0) -> False 22.65/7.92 !EQ(0, 0) -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Rewrite Strategy: INNERMOST 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 22.65/7.92 Transformed relative TRS to weighted TRS 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (4) 22.65/7.92 Obligation: 22.65/7.92 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 22.65/7.92 22.65/7.92 22.65/7.92 The TRS R consists of the following rules: 22.65/7.92 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) [1] 22.65/7.92 member(x, Nil) -> False [1] 22.65/7.92 notEmpty(Cons(x, xs)) -> True [1] 22.65/7.92 notEmpty(Nil) -> False [1] 22.65/7.92 goal(x, xs) -> member(x, xs) [1] 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) [0] 22.65/7.92 !EQ(0, S(y)) -> False [0] 22.65/7.92 !EQ(S(x), 0) -> False [0] 22.65/7.92 !EQ(0, 0) -> True [0] 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) [0] 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True [0] 22.65/7.92 22.65/7.92 Rewrite Strategy: INNERMOST 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 22.65/7.92 Infered types. 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (6) 22.65/7.92 Obligation: 22.65/7.92 Runtime Complexity Weighted TRS with Types. 22.65/7.92 The TRS R consists of the following rules: 22.65/7.92 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) [1] 22.65/7.92 member(x, Nil) -> False [1] 22.65/7.92 notEmpty(Cons(x, xs)) -> True [1] 22.65/7.92 notEmpty(Nil) -> False [1] 22.65/7.92 goal(x, xs) -> member(x, xs) [1] 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) [0] 22.65/7.92 !EQ(0, S(y)) -> False [0] 22.65/7.92 !EQ(S(x), 0) -> False [0] 22.65/7.92 !EQ(0, 0) -> True [0] 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) [0] 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True [0] 22.65/7.92 22.65/7.92 The TRS has the following type information: 22.65/7.92 member :: S:0 -> Cons:Nil -> False:True 22.65/7.92 Cons :: S:0 -> Cons:Nil -> Cons:Nil 22.65/7.92 member[Ite][True][Ite] :: False:True -> S:0 -> Cons:Nil -> False:True 22.65/7.92 !EQ :: S:0 -> S:0 -> False:True 22.65/7.92 Nil :: Cons:Nil 22.65/7.92 False :: False:True 22.65/7.92 notEmpty :: Cons:Nil -> False:True 22.65/7.92 True :: False:True 22.65/7.92 goal :: S:0 -> Cons:Nil -> False:True 22.65/7.92 S :: S:0 -> S:0 22.65/7.92 0 :: S:0 22.65/7.92 22.65/7.92 Rewrite Strategy: INNERMOST 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (7) CompletionProof (UPPER BOUND(ID)) 22.65/7.92 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 22.65/7.92 22.65/7.92 !EQ(v0, v1) -> null_!EQ [0] 22.65/7.92 member[Ite][True][Ite](v0, v1, v2) -> null_member[Ite][True][Ite] [0] 22.65/7.92 22.65/7.92 And the following fresh constants: null_!EQ, null_member[Ite][True][Ite] 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (8) 22.65/7.92 Obligation: 22.65/7.92 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 22.65/7.92 22.65/7.92 Runtime Complexity Weighted TRS with Types. 22.65/7.92 The TRS R consists of the following rules: 22.65/7.92 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) [1] 22.65/7.92 member(x, Nil) -> False [1] 22.65/7.92 notEmpty(Cons(x, xs)) -> True [1] 22.65/7.92 notEmpty(Nil) -> False [1] 22.65/7.92 goal(x, xs) -> member(x, xs) [1] 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) [0] 22.65/7.92 !EQ(0, S(y)) -> False [0] 22.65/7.92 !EQ(S(x), 0) -> False [0] 22.65/7.92 !EQ(0, 0) -> True [0] 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) [0] 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True [0] 22.65/7.92 !EQ(v0, v1) -> null_!EQ [0] 22.65/7.92 member[Ite][True][Ite](v0, v1, v2) -> null_member[Ite][True][Ite] [0] 22.65/7.92 22.65/7.92 The TRS has the following type information: 22.65/7.92 member :: S:0 -> Cons:Nil -> False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 Cons :: S:0 -> Cons:Nil -> Cons:Nil 22.65/7.92 member[Ite][True][Ite] :: False:True:null_!EQ:null_member[Ite][True][Ite] -> S:0 -> Cons:Nil -> False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 !EQ :: S:0 -> S:0 -> False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 Nil :: Cons:Nil 22.65/7.92 False :: False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 notEmpty :: Cons:Nil -> False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 True :: False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 goal :: S:0 -> Cons:Nil -> False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 S :: S:0 -> S:0 22.65/7.92 0 :: S:0 22.65/7.92 null_!EQ :: False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 null_member[Ite][True][Ite] :: False:True:null_!EQ:null_member[Ite][True][Ite] 22.65/7.92 22.65/7.92 Rewrite Strategy: INNERMOST 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 22.65/7.92 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 22.65/7.92 The constant constructors are abstracted as follows: 22.65/7.92 22.65/7.92 Nil => 0 22.65/7.92 False => 1 22.65/7.92 True => 2 22.65/7.92 0 => 0 22.65/7.92 null_!EQ => 0 22.65/7.92 null_member[Ite][True][Ite] => 0 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (10) 22.65/7.92 Obligation: 22.65/7.92 Complexity RNTS consisting of the following rules: 22.65/7.92 22.65/7.92 !EQ(z, z') -{ 0 }-> 2 :|: z = 0, z' = 0 22.65/7.92 !EQ(z, z') -{ 0 }-> 1 :|: z' = 1 + y, y >= 0, z = 0 22.65/7.92 !EQ(z, z') -{ 0 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 22.65/7.92 !EQ(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 22.65/7.92 !EQ(z, z') -{ 0 }-> !EQ(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 22.65/7.92 goal(z, z') -{ 1 }-> member(x, xs) :|: xs >= 0, x >= 0, z' = xs, z = x 22.65/7.92 member(z, z') -{ 1 }-> member[Ite][True][Ite](!EQ(x', x), x', 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, x >= 0, z = x' 22.65/7.92 member(z, z') -{ 1 }-> 1 :|: x >= 0, z = x, z' = 0 22.65/7.92 member[Ite][True][Ite](z, z', z'') -{ 0 }-> member(x', xs) :|: z' = x', xs >= 0, z = 1, x' >= 0, x >= 0, z'' = 1 + x + xs 22.65/7.92 member[Ite][True][Ite](z, z', z'') -{ 0 }-> 2 :|: z = 2, xs >= 0, z' = x, x >= 0, z'' = xs 22.65/7.92 member[Ite][True][Ite](z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 22.65/7.92 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 22.65/7.92 notEmpty(z) -{ 1 }-> 1 :|: z = 0 22.65/7.92 22.65/7.92 Only complete derivations are relevant for the runtime complexity. 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (11) CompleteCoflocoProof (FINISHED) 22.65/7.92 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 22.65/7.92 22.65/7.92 eq(start(V1, V, V14),0,[member(V1, V, Out)],[V1 >= 0,V >= 0]). 22.65/7.92 eq(start(V1, V, V14),0,[notEmpty(V1, Out)],[V1 >= 0]). 22.65/7.92 eq(start(V1, V, V14),0,[goal(V1, V, Out)],[V1 >= 0,V >= 0]). 22.65/7.92 eq(start(V1, V, V14),0,[fun1(V1, V, Out)],[V1 >= 0,V >= 0]). 22.65/7.92 eq(start(V1, V, V14),0,[fun(V1, V, V14, Out)],[V1 >= 0,V >= 0,V14 >= 0]). 22.65/7.92 eq(member(V1, V, Out),1,[fun1(V3, V4, Ret0),fun(Ret0, V3, 1 + V4 + V2, Ret)],[Out = Ret,V2 >= 0,V = 1 + V2 + V4,V3 >= 0,V4 >= 0,V1 = V3]). 22.65/7.92 eq(member(V1, V, Out),1,[],[Out = 1,V5 >= 0,V1 = V5,V = 0]). 22.65/7.92 eq(notEmpty(V1, Out),1,[],[Out = 2,V1 = 1 + V6 + V7,V7 >= 0,V6 >= 0]). 22.65/7.92 eq(notEmpty(V1, Out),1,[],[Out = 1,V1 = 0]). 22.65/7.92 eq(goal(V1, V, Out),1,[member(V8, V9, Ret1)],[Out = Ret1,V9 >= 0,V8 >= 0,V = V9,V1 = V8]). 22.65/7.92 eq(fun1(V1, V, Out),0,[fun1(V10, V11, Ret2)],[Out = Ret2,V = 1 + V11,V10 >= 0,V11 >= 0,V1 = 1 + V10]). 22.65/7.92 eq(fun1(V1, V, Out),0,[],[Out = 1,V = 1 + V12,V12 >= 0,V1 = 0]). 22.65/7.92 eq(fun1(V1, V, Out),0,[],[Out = 1,V13 >= 0,V1 = 1 + V13,V = 0]). 22.65/7.92 eq(fun1(V1, V, Out),0,[],[Out = 2,V1 = 0,V = 0]). 22.65/7.92 eq(fun(V1, V, V14, Out),0,[member(V17, V16, Ret3)],[Out = Ret3,V = V17,V16 >= 0,V1 = 1,V17 >= 0,V15 >= 0,V14 = 1 + V15 + V16]). 22.65/7.92 eq(fun(V1, V, V14, Out),0,[],[Out = 2,V1 = 2,V18 >= 0,V = V19,V19 >= 0,V14 = V18]). 22.65/7.92 eq(fun1(V1, V, Out),0,[],[Out = 0,V21 >= 0,V20 >= 0,V1 = V21,V = V20]). 22.65/7.92 eq(fun(V1, V, V14, Out),0,[],[Out = 0,V23 >= 0,V14 = V24,V22 >= 0,V1 = V23,V = V22,V24 >= 0]). 22.65/7.92 input_output_vars(member(V1,V,Out),[V1,V],[Out]). 22.65/7.92 input_output_vars(notEmpty(V1,Out),[V1],[Out]). 22.65/7.92 input_output_vars(goal(V1,V,Out),[V1,V],[Out]). 22.65/7.92 input_output_vars(fun1(V1,V,Out),[V1,V],[Out]). 22.65/7.92 input_output_vars(fun(V1,V,V14,Out),[V1,V,V14],[Out]). 22.65/7.92 22.65/7.92 22.65/7.92 CoFloCo proof output: 22.65/7.92 Preprocessing Cost Relations 22.65/7.92 ===================================== 22.65/7.92 22.65/7.92 #### Computed strongly connected components 22.65/7.92 0. recursive : [fun1/3] 22.65/7.92 1. recursive : [fun/4,member/3] 22.65/7.92 2. non_recursive : [goal/3] 22.65/7.92 3. non_recursive : [notEmpty/2] 22.65/7.92 4. non_recursive : [start/3] 22.65/7.92 22.65/7.92 #### Obtained direct recursion through partial evaluation 22.65/7.92 0. SCC is partially evaluated into fun1/3 22.65/7.92 1. SCC is partially evaluated into member/3 22.65/7.92 2. SCC is completely evaluated into other SCCs 22.65/7.92 3. SCC is partially evaluated into notEmpty/2 22.65/7.92 4. SCC is partially evaluated into start/3 22.65/7.92 22.65/7.92 Control-Flow Refinement of Cost Relations 22.65/7.92 ===================================== 22.65/7.92 22.65/7.92 ### Specialization of cost equations fun1/3 22.65/7.92 * CE 17 is refined into CE [18] 22.65/7.92 * CE 15 is refined into CE [19] 22.65/7.92 * CE 14 is refined into CE [20] 22.65/7.92 * CE 16 is refined into CE [21] 22.65/7.92 * CE 13 is refined into CE [22] 22.65/7.92 22.65/7.92 22.65/7.92 ### Cost equations --> "Loop" of fun1/3 22.65/7.92 * CEs [22] --> Loop 13 22.65/7.92 * CEs [18] --> Loop 14 22.65/7.92 * CEs [19] --> Loop 15 22.65/7.92 * CEs [20] --> Loop 16 22.65/7.92 * CEs [21] --> Loop 17 22.65/7.92 22.65/7.92 ### Ranking functions of CR fun1(V1,V,Out) 22.65/7.92 * RF of phase [13]: [V,V1] 22.65/7.92 22.65/7.92 #### Partial ranking functions of CR fun1(V1,V,Out) 22.65/7.92 * Partial RF of phase [13]: 22.65/7.92 - RF of loop [13:1]: 22.65/7.92 V 22.65/7.92 V1 22.65/7.92 22.65/7.92 22.65/7.92 ### Specialization of cost equations member/3 22.65/7.92 * CE 8 is refined into CE [23,24] 22.65/7.92 * CE 7 is refined into CE [25,26,27,28,29,30,31] 22.65/7.92 * CE 10 is refined into CE [32] 22.65/7.92 * CE 9 is refined into CE [33,34,35,36] 22.65/7.92 22.65/7.92 22.65/7.92 ### Cost equations --> "Loop" of member/3 22.65/7.92 * CEs [34,35,36] --> Loop 18 22.65/7.92 * CEs [33] --> Loop 19 22.65/7.92 * CEs [24] --> Loop 20 22.65/7.92 * CEs [32] --> Loop 21 22.65/7.92 * CEs [23] --> Loop 22 22.65/7.92 * CEs [25,26,27,28,29,30,31] --> Loop 23 22.65/7.92 22.65/7.92 ### Ranking functions of CR member(V1,V,Out) 22.65/7.92 * RF of phase [18]: [V] 22.65/7.92 * RF of phase [19]: [V-1] 22.65/7.92 22.65/7.92 #### Partial ranking functions of CR member(V1,V,Out) 22.65/7.92 * Partial RF of phase [18]: 22.65/7.92 - RF of loop [18:1]: 22.65/7.92 V 22.65/7.92 * Partial RF of phase [19]: 22.65/7.92 - RF of loop [19:1]: 22.65/7.92 V-1 22.65/7.92 22.65/7.92 22.65/7.92 ### Specialization of cost equations notEmpty/2 22.65/7.92 * CE 11 is refined into CE [37] 22.65/7.92 * CE 12 is refined into CE [38] 22.65/7.92 22.65/7.92 22.65/7.92 ### Cost equations --> "Loop" of notEmpty/2 22.65/7.92 * CEs [37] --> Loop 24 22.65/7.92 * CEs [38] --> Loop 25 22.65/7.92 22.65/7.92 ### Ranking functions of CR notEmpty(V1,Out) 22.65/7.92 22.65/7.92 #### Partial ranking functions of CR notEmpty(V1,Out) 22.65/7.92 22.65/7.92 22.65/7.92 ### Specialization of cost equations start/3 22.65/7.92 * CE 1 is refined into CE [39] 22.65/7.92 * CE 2 is refined into CE [40,41,42,43,44,45] 22.65/7.92 * CE 3 is refined into CE [46,47,48,49,50,51] 22.65/7.92 * CE 4 is refined into CE [52,53] 22.65/7.92 * CE 5 is refined into CE [54,55,56,57,58,59] 22.65/7.92 * CE 6 is refined into CE [60,61,62,63,64,65,66] 22.65/7.92 22.65/7.92 22.65/7.92 ### Cost equations --> "Loop" of start/3 22.65/7.92 * CEs [53,66] --> Loop 26 22.65/7.92 * CEs [49,57,62] --> Loop 27 22.65/7.92 * CEs [39,40,41,42,43,44,45,46,50,51,54,58,59,63,64,65] --> Loop 28 22.65/7.92 * CEs [47,48,52,55,56,60,61] --> Loop 29 22.65/7.92 22.65/7.92 ### Ranking functions of CR start(V1,V,V14) 22.65/7.92 22.65/7.92 #### Partial ranking functions of CR start(V1,V,V14) 22.65/7.92 22.65/7.92 22.65/7.92 Computing Bounds 22.65/7.92 ===================================== 22.65/7.92 22.65/7.92 #### Cost of chains of fun1(V1,V,Out): 22.65/7.92 * Chain [[13],17]: 0 22.65/7.92 with precondition: [Out=2,V1=V,V1>=1] 22.65/7.92 22.65/7.92 * Chain [[13],16]: 0 22.65/7.92 with precondition: [Out=1,V1>=1,V>=V1+1] 22.65/7.92 22.65/7.92 * Chain [[13],15]: 0 22.65/7.92 with precondition: [Out=1,V>=1,V1>=V+1] 22.65/7.92 22.65/7.92 * Chain [[13],14]: 0 22.65/7.92 with precondition: [Out=0,V1>=1,V>=1] 22.65/7.92 22.65/7.92 * Chain [17]: 0 22.65/7.92 with precondition: [V1=0,V=0,Out=2] 22.65/7.92 22.65/7.92 * Chain [16]: 0 22.65/7.92 with precondition: [V1=0,Out=1,V>=1] 22.65/7.92 22.65/7.92 * Chain [15]: 0 22.65/7.92 with precondition: [V=0,Out=1,V1>=1] 22.65/7.92 22.65/7.92 * Chain [14]: 0 22.65/7.92 with precondition: [Out=0,V1>=0,V>=0] 22.65/7.92 22.65/7.92 22.65/7.92 #### Cost of chains of member(V1,V,Out): 22.65/7.92 * Chain [[19],23]: 1*it(19)+1 22.65/7.92 Such that:it(19) =< V 22.65/7.92 22.65/7.92 with precondition: [V1=0,Out=0,V>=2] 22.65/7.92 22.65/7.92 * Chain [[19],22]: 1*it(19)+1 22.65/7.92 Such that:it(19) =< V 22.65/7.92 22.65/7.92 with precondition: [V1=0,Out=2,V>=2] 22.65/7.92 22.65/7.92 * Chain [[19],21]: 1*it(19)+1 22.65/7.92 Such that:it(19) =< V 22.65/7.92 22.65/7.92 with precondition: [V1=0,Out=1,V>=2] 22.65/7.92 22.65/7.92 * Chain [[18],23]: 1*it(18)+1 22.65/7.92 Such that:it(18) =< V 22.65/7.92 22.65/7.92 with precondition: [Out=0,V1>=1,V>=2] 22.65/7.92 22.65/7.92 * Chain [[18],21]: 1*it(18)+1 22.65/7.92 Such that:it(18) =< V 22.65/7.92 22.65/7.92 with precondition: [Out=1,V1>=1,V>=1] 22.65/7.92 22.65/7.92 * Chain [[18],20]: 1*it(18)+1 22.65/7.92 Such that:it(18) =< -V1+V 22.65/7.92 22.65/7.92 with precondition: [Out=2,V1>=1,V>=V1+2] 22.65/7.92 22.65/7.92 * Chain [23]: 1 22.65/7.92 with precondition: [Out=0,V1>=0,V>=1] 22.65/7.92 22.65/7.92 * Chain [22]: 1 22.65/7.92 with precondition: [V1=0,Out=2,V>=1] 22.65/7.92 22.65/7.92 * Chain [21]: 1 22.65/7.92 with precondition: [V=0,Out=1,V1>=0] 22.65/7.92 22.65/7.92 * Chain [20]: 1 22.65/7.92 with precondition: [Out=2,V1>=1,V>=V1+1] 22.65/7.92 22.65/7.92 22.65/7.92 #### Cost of chains of notEmpty(V1,Out): 22.65/7.92 * Chain [25]: 1 22.65/7.92 with precondition: [V1=0,Out=1] 22.65/7.92 22.65/7.92 * Chain [24]: 1 22.65/7.92 with precondition: [Out=2,V1>=1] 22.65/7.92 22.65/7.92 22.65/7.92 #### Cost of chains of start(V1,V,V14): 22.65/7.92 * Chain [29]: 4*s(5)+2 22.65/7.92 Such that:aux(2) =< V 22.65/7.92 s(5) =< aux(2) 22.65/7.92 22.65/7.92 with precondition: [V1=0] 22.65/7.92 22.65/7.92 * Chain [28]: 5*s(10)+1*s(14)+6*s(16)+2*s(18)+2 22.65/7.92 Such that:s(14) =< -V+V14 22.65/7.92 aux(3) =< -V1+V 22.65/7.92 aux(4) =< V 22.65/7.92 aux(5) =< V14 22.65/7.92 s(18) =< aux(3) 22.65/7.92 s(16) =< aux(4) 22.65/7.92 s(10) =< aux(5) 22.65/7.92 22.65/7.92 with precondition: [V1>=0,V>=0] 22.65/7.92 22.65/7.92 * Chain [27]: 2 22.65/7.92 with precondition: [V=0,V1>=0] 22.65/7.92 22.65/7.92 * Chain [26]: 1 22.65/7.92 with precondition: [V1>=1] 22.65/7.92 22.65/7.92 22.65/7.92 Closed-form bounds of start(V1,V,V14): 22.65/7.92 ------------------------------------- 22.65/7.92 * Chain [29] with precondition: [V1=0] 22.65/7.92 - Upper bound: nat(V)*4+2 22.65/7.92 - Complexity: n 22.65/7.92 * Chain [28] with precondition: [V1>=0,V>=0] 22.65/7.92 - Upper bound: 6*V+2+nat(V14)*5+nat(-V1+V)*2+nat(-V+V14) 22.65/7.92 - Complexity: n 22.65/7.92 * Chain [27] with precondition: [V=0,V1>=0] 22.65/7.92 - Upper bound: 2 22.65/7.92 - Complexity: constant 22.65/7.92 * Chain [26] with precondition: [V1>=1] 22.65/7.92 - Upper bound: 1 22.65/7.92 - Complexity: constant 22.65/7.92 22.65/7.92 ### Maximum cost of start(V1,V,V14): nat(V14)*5+nat(V)*2+nat(-V1+V)*2+nat(-V+V14)+nat(V)*4+2 22.65/7.92 Asymptotic class: n 22.65/7.92 * Total analysis performed in 270 ms. 22.65/7.92 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (12) 22.65/7.92 BOUNDS(1, n^1) 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (13) RenamingProof (BOTH BOUNDS(ID, ID)) 22.65/7.92 Renamed function symbols to avoid clashes with predefined symbol. 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (14) 22.65/7.92 Obligation: 22.65/7.92 The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). 22.65/7.92 22.65/7.92 22.65/7.92 The TRS R consists of the following rules: 22.65/7.92 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 22.65/7.92 The (relative) TRS S consists of the following rules: 22.65/7.92 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0', S(y)) -> False 22.65/7.92 !EQ(S(x), 0') -> False 22.65/7.92 !EQ(0', 0') -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Rewrite Strategy: INNERMOST 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 22.65/7.92 Infered types. 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (16) 22.65/7.92 Obligation: 22.65/7.92 Innermost TRS: 22.65/7.92 Rules: 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0', S(y)) -> False 22.65/7.92 !EQ(S(x), 0') -> False 22.65/7.92 !EQ(0', 0') -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Types: 22.65/7.92 member :: S:0' -> Cons:Nil -> False:True 22.65/7.92 Cons :: S:0' -> Cons:Nil -> Cons:Nil 22.65/7.92 member[Ite][True][Ite] :: False:True -> S:0' -> Cons:Nil -> False:True 22.65/7.92 !EQ :: S:0' -> S:0' -> False:True 22.65/7.92 Nil :: Cons:Nil 22.65/7.92 False :: False:True 22.65/7.92 notEmpty :: Cons:Nil -> False:True 22.65/7.92 True :: False:True 22.65/7.92 goal :: S:0' -> Cons:Nil -> False:True 22.65/7.92 S :: S:0' -> S:0' 22.65/7.92 0' :: S:0' 22.65/7.92 hole_False:True1_0 :: False:True 22.65/7.92 hole_S:0'2_0 :: S:0' 22.65/7.92 hole_Cons:Nil3_0 :: Cons:Nil 22.65/7.92 gen_S:0'4_0 :: Nat -> S:0' 22.65/7.92 gen_Cons:Nil5_0 :: Nat -> Cons:Nil 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (17) OrderProof (LOWER BOUND(ID)) 22.65/7.92 Heuristically decided to analyse the following defined symbols: 22.65/7.92 member, !EQ 22.65/7.92 22.65/7.92 They will be analysed ascendingly in the following order: 22.65/7.92 !EQ < member 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (18) 22.65/7.92 Obligation: 22.65/7.92 Innermost TRS: 22.65/7.92 Rules: 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0', S(y)) -> False 22.65/7.92 !EQ(S(x), 0') -> False 22.65/7.92 !EQ(0', 0') -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Types: 22.65/7.92 member :: S:0' -> Cons:Nil -> False:True 22.65/7.92 Cons :: S:0' -> Cons:Nil -> Cons:Nil 22.65/7.92 member[Ite][True][Ite] :: False:True -> S:0' -> Cons:Nil -> False:True 22.65/7.92 !EQ :: S:0' -> S:0' -> False:True 22.65/7.92 Nil :: Cons:Nil 22.65/7.92 False :: False:True 22.65/7.92 notEmpty :: Cons:Nil -> False:True 22.65/7.92 True :: False:True 22.65/7.92 goal :: S:0' -> Cons:Nil -> False:True 22.65/7.92 S :: S:0' -> S:0' 22.65/7.92 0' :: S:0' 22.65/7.92 hole_False:True1_0 :: False:True 22.65/7.92 hole_S:0'2_0 :: S:0' 22.65/7.92 hole_Cons:Nil3_0 :: Cons:Nil 22.65/7.92 gen_S:0'4_0 :: Nat -> S:0' 22.65/7.92 gen_Cons:Nil5_0 :: Nat -> Cons:Nil 22.65/7.92 22.65/7.92 22.65/7.92 Generator Equations: 22.65/7.92 gen_S:0'4_0(0) <=> 0' 22.65/7.92 gen_S:0'4_0(+(x, 1)) <=> S(gen_S:0'4_0(x)) 22.65/7.92 gen_Cons:Nil5_0(0) <=> Nil 22.65/7.92 gen_Cons:Nil5_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil5_0(x)) 22.65/7.92 22.65/7.92 22.65/7.92 The following defined symbols remain to be analysed: 22.65/7.92 !EQ, member 22.65/7.92 22.65/7.92 They will be analysed ascendingly in the following order: 22.65/7.92 !EQ < member 22.65/7.92 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (19) RewriteLemmaProof (LOWER BOUND(ID)) 22.65/7.92 Proved the following rewrite lemma: 22.65/7.92 !EQ(gen_S:0'4_0(n7_0), gen_S:0'4_0(+(1, n7_0))) -> False, rt in Omega(0) 22.65/7.92 22.65/7.92 Induction Base: 22.65/7.92 !EQ(gen_S:0'4_0(0), gen_S:0'4_0(+(1, 0))) ->_R^Omega(0) 22.65/7.92 False 22.65/7.92 22.65/7.92 Induction Step: 22.65/7.92 !EQ(gen_S:0'4_0(+(n7_0, 1)), gen_S:0'4_0(+(1, +(n7_0, 1)))) ->_R^Omega(0) 22.65/7.92 !EQ(gen_S:0'4_0(n7_0), gen_S:0'4_0(+(1, n7_0))) ->_IH 22.65/7.92 False 22.65/7.92 22.65/7.92 We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (20) 22.65/7.92 Obligation: 22.65/7.92 Innermost TRS: 22.65/7.92 Rules: 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0', S(y)) -> False 22.65/7.92 !EQ(S(x), 0') -> False 22.65/7.92 !EQ(0', 0') -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Types: 22.65/7.92 member :: S:0' -> Cons:Nil -> False:True 22.65/7.92 Cons :: S:0' -> Cons:Nil -> Cons:Nil 22.65/7.92 member[Ite][True][Ite] :: False:True -> S:0' -> Cons:Nil -> False:True 22.65/7.92 !EQ :: S:0' -> S:0' -> False:True 22.65/7.92 Nil :: Cons:Nil 22.65/7.92 False :: False:True 22.65/7.92 notEmpty :: Cons:Nil -> False:True 22.65/7.92 True :: False:True 22.65/7.92 goal :: S:0' -> Cons:Nil -> False:True 22.65/7.92 S :: S:0' -> S:0' 22.65/7.92 0' :: S:0' 22.65/7.92 hole_False:True1_0 :: False:True 22.65/7.92 hole_S:0'2_0 :: S:0' 22.65/7.92 hole_Cons:Nil3_0 :: Cons:Nil 22.65/7.92 gen_S:0'4_0 :: Nat -> S:0' 22.65/7.92 gen_Cons:Nil5_0 :: Nat -> Cons:Nil 22.65/7.92 22.65/7.92 22.65/7.92 Lemmas: 22.65/7.92 !EQ(gen_S:0'4_0(n7_0), gen_S:0'4_0(+(1, n7_0))) -> False, rt in Omega(0) 22.65/7.92 22.65/7.92 22.65/7.92 Generator Equations: 22.65/7.92 gen_S:0'4_0(0) <=> 0' 22.65/7.92 gen_S:0'4_0(+(x, 1)) <=> S(gen_S:0'4_0(x)) 22.65/7.92 gen_Cons:Nil5_0(0) <=> Nil 22.65/7.92 gen_Cons:Nil5_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil5_0(x)) 22.65/7.92 22.65/7.92 22.65/7.92 The following defined symbols remain to be analysed: 22.65/7.92 member 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (21) RewriteLemmaProof (LOWER BOUND(ID)) 22.65/7.92 Proved the following rewrite lemma: 22.65/7.92 member(gen_S:0'4_0(1), gen_Cons:Nil5_0(n260_0)) -> False, rt in Omega(1 + n260_0) 22.65/7.92 22.65/7.92 Induction Base: 22.65/7.92 member(gen_S:0'4_0(1), gen_Cons:Nil5_0(0)) ->_R^Omega(1) 22.65/7.92 False 22.65/7.92 22.65/7.92 Induction Step: 22.65/7.92 member(gen_S:0'4_0(1), gen_Cons:Nil5_0(+(n260_0, 1))) ->_R^Omega(1) 22.65/7.92 member[Ite][True][Ite](!EQ(gen_S:0'4_0(1), 0'), gen_S:0'4_0(1), Cons(0', gen_Cons:Nil5_0(n260_0))) ->_R^Omega(0) 22.65/7.92 member[Ite][True][Ite](False, gen_S:0'4_0(1), Cons(0', gen_Cons:Nil5_0(n260_0))) ->_R^Omega(0) 22.65/7.92 member(gen_S:0'4_0(1), gen_Cons:Nil5_0(n260_0)) ->_IH 22.65/7.92 False 22.65/7.92 22.65/7.92 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (22) 22.65/7.92 Obligation: 22.65/7.92 Proved the lower bound n^1 for the following obligation: 22.65/7.92 22.65/7.92 Innermost TRS: 22.65/7.92 Rules: 22.65/7.92 member(x', Cons(x, xs)) -> member[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs)) 22.65/7.92 member(x, Nil) -> False 22.65/7.92 notEmpty(Cons(x, xs)) -> True 22.65/7.92 notEmpty(Nil) -> False 22.65/7.92 goal(x, xs) -> member(x, xs) 22.65/7.92 !EQ(S(x), S(y)) -> !EQ(x, y) 22.65/7.92 !EQ(0', S(y)) -> False 22.65/7.92 !EQ(S(x), 0') -> False 22.65/7.92 !EQ(0', 0') -> True 22.65/7.92 member[Ite][True][Ite](False, x', Cons(x, xs)) -> member(x', xs) 22.65/7.92 member[Ite][True][Ite](True, x, xs) -> True 22.65/7.92 22.65/7.92 Types: 22.65/7.92 member :: S:0' -> Cons:Nil -> False:True 22.65/7.92 Cons :: S:0' -> Cons:Nil -> Cons:Nil 22.65/7.92 member[Ite][True][Ite] :: False:True -> S:0' -> Cons:Nil -> False:True 22.65/7.92 !EQ :: S:0' -> S:0' -> False:True 22.65/7.92 Nil :: Cons:Nil 22.65/7.92 False :: False:True 22.65/7.92 notEmpty :: Cons:Nil -> False:True 22.65/7.92 True :: False:True 22.65/7.92 goal :: S:0' -> Cons:Nil -> False:True 22.65/7.92 S :: S:0' -> S:0' 22.65/7.92 0' :: S:0' 22.65/7.92 hole_False:True1_0 :: False:True 22.65/7.92 hole_S:0'2_0 :: S:0' 22.65/7.92 hole_Cons:Nil3_0 :: Cons:Nil 22.65/7.92 gen_S:0'4_0 :: Nat -> S:0' 22.65/7.92 gen_Cons:Nil5_0 :: Nat -> Cons:Nil 22.65/7.92 22.65/7.92 22.65/7.92 Lemmas: 22.65/7.92 !EQ(gen_S:0'4_0(n7_0), gen_S:0'4_0(+(1, n7_0))) -> False, rt in Omega(0) 22.65/7.92 22.65/7.92 22.65/7.92 Generator Equations: 22.65/7.92 gen_S:0'4_0(0) <=> 0' 22.65/7.92 gen_S:0'4_0(+(x, 1)) <=> S(gen_S:0'4_0(x)) 22.65/7.92 gen_Cons:Nil5_0(0) <=> Nil 22.65/7.92 gen_Cons:Nil5_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil5_0(x)) 22.65/7.92 22.65/7.92 22.65/7.92 The following defined symbols remain to be analysed: 22.65/7.92 member 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (23) LowerBoundPropagationProof (FINISHED) 22.65/7.92 Propagated lower bound. 22.65/7.92 ---------------------------------------- 22.65/7.92 22.65/7.92 (24) 22.65/7.92 BOUNDS(n^1, INF) 23.02/9.01 EOF