11.97/4.65 WORST_CASE(Omega(n^1), O(n^1)) 11.97/4.67 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 11.97/4.67 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 11.97/4.67 11.97/4.67 11.97/4.67 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 11.97/4.67 11.97/4.67 (0) CpxTRS 11.97/4.67 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 11.97/4.67 (2) CpxWeightedTrs 11.97/4.67 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 11.97/4.67 (4) CpxTypedWeightedTrs 11.97/4.67 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 11.97/4.67 (6) CpxTypedWeightedCompleteTrs 11.97/4.67 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 11.97/4.67 (8) CpxRNTS 11.97/4.67 (9) CompleteCoflocoProof [FINISHED, 40 ms] 11.97/4.67 (10) BOUNDS(1, n^1) 11.97/4.67 (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 11.97/4.67 (12) TRS for Loop Detection 11.97/4.67 (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 11.97/4.67 (14) BEST 11.97/4.67 (15) proven lower bound 11.97/4.67 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 11.97/4.67 (17) BOUNDS(n^1, INF) 11.97/4.67 (18) TRS for Loop Detection 11.97/4.67 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (0) 11.97/4.67 Obligation: 11.97/4.67 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 11.97/4.67 11.97/4.67 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) 11.97/4.67 11.97/4.67 S is empty. 11.97/4.67 Rewrite Strategy: INNERMOST 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 11.97/4.67 Transformed relative TRS to weighted TRS 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (2) 11.97/4.67 Obligation: 11.97/4.67 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 11.97/4.67 11.97/4.67 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) [1] 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) [1] 11.97/4.67 11.97/4.67 Rewrite Strategy: INNERMOST 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 11.97/4.67 Infered types. 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (4) 11.97/4.67 Obligation: 11.97/4.67 Runtime Complexity Weighted TRS with Types. 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) [1] 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) [1] 11.97/4.67 11.97/4.67 The TRS has the following type information: 11.97/4.67 ackin :: s -> s -> ackout:u22 11.97/4.67 s :: s -> s 11.97/4.67 u21 :: ackout:u22 -> s -> ackout:u22 11.97/4.67 ackout :: s -> ackout:u22 11.97/4.67 u22 :: ackout:u22 -> ackout:u22 11.97/4.67 11.97/4.67 Rewrite Strategy: INNERMOST 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (5) CompletionProof (UPPER BOUND(ID)) 11.97/4.67 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 11.97/4.67 11.97/4.67 ackin(v0, v1) -> null_ackin [0] 11.97/4.67 u21(v0, v1) -> null_u21 [0] 11.97/4.67 11.97/4.67 And the following fresh constants: null_ackin, null_u21, const 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (6) 11.97/4.67 Obligation: 11.97/4.67 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 11.97/4.67 11.97/4.67 Runtime Complexity Weighted TRS with Types. 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) [1] 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) [1] 11.97/4.67 ackin(v0, v1) -> null_ackin [0] 11.97/4.67 u21(v0, v1) -> null_u21 [0] 11.97/4.67 11.97/4.67 The TRS has the following type information: 11.97/4.67 ackin :: s -> s -> ackout:u22:null_ackin:null_u21 11.97/4.67 s :: s -> s 11.97/4.67 u21 :: ackout:u22:null_ackin:null_u21 -> s -> ackout:u22:null_ackin:null_u21 11.97/4.67 ackout :: s -> ackout:u22:null_ackin:null_u21 11.97/4.67 u22 :: ackout:u22:null_ackin:null_u21 -> ackout:u22:null_ackin:null_u21 11.97/4.67 null_ackin :: ackout:u22:null_ackin:null_u21 11.97/4.67 null_u21 :: ackout:u22:null_ackin:null_u21 11.97/4.67 const :: s 11.97/4.67 11.97/4.67 Rewrite Strategy: INNERMOST 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 11.97/4.67 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 11.97/4.67 The constant constructors are abstracted as follows: 11.97/4.67 11.97/4.67 null_ackin => 0 11.97/4.67 null_u21 => 0 11.97/4.67 const => 0 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (8) 11.97/4.67 Obligation: 11.97/4.67 Complexity RNTS consisting of the following rules: 11.97/4.67 11.97/4.67 ackin(z, z') -{ 1 }-> u21(ackin(1 + X, Y), X) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 11.97/4.67 ackin(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 11.97/4.67 u21(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 11.97/4.67 u21(z, z') -{ 1 }-> 1 + ackin(Y, X) :|: z = 1 + X, z' = Y, Y >= 0, X >= 0 11.97/4.67 11.97/4.67 Only complete derivations are relevant for the runtime complexity. 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (9) CompleteCoflocoProof (FINISHED) 11.97/4.67 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 11.97/4.67 11.97/4.67 eq(start(V1, V),0,[ackin(V1, V, Out)],[V1 >= 0,V >= 0]). 11.97/4.67 eq(start(V1, V),0,[u21(V1, V, Out)],[V1 >= 0,V >= 0]). 11.97/4.67 eq(ackin(V1, V, Out),1,[ackin(1 + X1, Y1, Ret0),u21(Ret0, X1, Ret)],[Out = Ret,V1 = 1 + X1,Y1 >= 0,V = 1 + Y1,X1 >= 0]). 11.97/4.67 eq(u21(V1, V, Out),1,[ackin(Y2, X2, Ret1)],[Out = 1 + Ret1,V1 = 1 + X2,V = Y2,Y2 >= 0,X2 >= 0]). 11.97/4.67 eq(ackin(V1, V, Out),0,[],[Out = 0,V3 >= 0,V2 >= 0,V1 = V3,V = V2]). 11.97/4.67 eq(u21(V1, V, Out),0,[],[Out = 0,V5 >= 0,V4 >= 0,V1 = V5,V = V4]). 11.97/4.67 input_output_vars(ackin(V1,V,Out),[V1,V],[Out]). 11.97/4.67 input_output_vars(u21(V1,V,Out),[V1,V],[Out]). 11.97/4.67 11.97/4.67 11.97/4.67 CoFloCo proof output: 11.97/4.67 Preprocessing Cost Relations 11.97/4.67 ===================================== 11.97/4.67 11.97/4.67 #### Computed strongly connected components 11.97/4.67 0. recursive [multiple] : [ackin/3,u21/3] 11.97/4.67 1. non_recursive : [start/2] 11.97/4.67 11.97/4.67 #### Obtained direct recursion through partial evaluation 11.97/4.67 0. SCC is partially evaluated into ackin/3 11.97/4.67 1. SCC is partially evaluated into start/2 11.97/4.67 11.97/4.67 Control-Flow Refinement of Cost Relations 11.97/4.67 ===================================== 11.97/4.67 11.97/4.67 ### Specialization of cost equations ackin/3 11.97/4.67 * CE 6 is refined into CE [7] 11.97/4.67 * CE 5 is refined into CE [8] 11.97/4.67 * CE 4 is refined into CE [9] 11.97/4.67 11.97/4.67 11.97/4.67 ### Cost equations --> "Loop" of ackin/3 11.97/4.67 * CEs [9] --> Loop 5 11.97/4.67 * CEs [8] --> Loop 6 11.97/4.67 * CEs [7] --> Loop 7 11.97/4.67 11.97/4.67 ### Ranking functions of CR ackin(V1,V,Out) 11.97/4.67 11.97/4.67 #### Partial ranking functions of CR ackin(V1,V,Out) 11.97/4.67 * Partial RF of phase [5,6]: 11.97/4.67 - RF of loop [5:1,6:1]: 11.97/4.67 V depends on loops [6:2] 11.97/4.67 - RF of loop [6:2]: 11.97/4.67 V1 11.97/4.67 11.97/4.67 11.97/4.67 ### Specialization of cost equations start/2 11.97/4.67 * CE 1 is refined into CE [10] 11.97/4.67 * CE 2 is refined into CE [11] 11.97/4.67 * CE 3 is refined into CE [12] 11.97/4.67 11.97/4.67 11.97/4.67 ### Cost equations --> "Loop" of start/2 11.97/4.67 * CEs [10,11,12] --> Loop 8 11.97/4.67 11.97/4.67 ### Ranking functions of CR start(V1,V) 11.97/4.67 11.97/4.67 #### Partial ranking functions of CR start(V1,V) 11.97/4.67 11.97/4.67 11.97/4.67 Computing Bounds 11.97/4.67 ===================================== 11.97/4.67 11.97/4.67 #### Cost of chains of ackin(V1,V,Out): 11.97/4.67 * Chain [7]: 0 11.97/4.67 with precondition: [Out=0,V1>=0,V>=0] 11.97/4.67 11.97/4.67 * Chain [multiple([5,6],[[7]])]: 1*it(5)+0 11.97/4.67 Such that:it(5) =< V 11.97/4.67 11.97/4.67 with precondition: [Out=0,V1>=1,V>=1] 11.97/4.67 11.97/4.67 11.97/4.67 #### Cost of chains of start(V1,V): 11.97/4.67 * Chain [8]: 1*s(2)+1*s(3)+1 11.97/4.67 Such that:s(2) =< V1 11.97/4.67 s(3) =< V 11.97/4.67 11.97/4.67 with precondition: [V1>=0,V>=0] 11.97/4.67 11.97/4.67 11.97/4.67 Closed-form bounds of start(V1,V): 11.97/4.67 ------------------------------------- 11.97/4.67 * Chain [8] with precondition: [V1>=0,V>=0] 11.97/4.67 - Upper bound: V1+V+1 11.97/4.67 - Complexity: n 11.97/4.67 11.97/4.67 ### Maximum cost of start(V1,V): V1+V+1 11.97/4.67 Asymptotic class: n 11.97/4.67 * Total analysis performed in 73 ms. 11.97/4.67 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (10) 11.97/4.67 BOUNDS(1, n^1) 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 11.97/4.67 Transformed a relative TRS into a decreasing-loop problem. 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (12) 11.97/4.67 Obligation: 11.97/4.67 Analyzing the following TRS for decreasing loops: 11.97/4.67 11.97/4.67 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 11.97/4.67 11.97/4.67 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) 11.97/4.67 11.97/4.67 S is empty. 11.97/4.67 Rewrite Strategy: INNERMOST 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (13) DecreasingLoopProof (LOWER BOUND(ID)) 11.97/4.67 The following loop(s) give(s) rise to the lower bound Omega(n^1): 11.97/4.67 11.97/4.67 The rewrite sequence 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) ->^+ u21(ackin(s(X), Y), X) 11.97/4.67 11.97/4.67 gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. 11.97/4.67 11.97/4.67 The pumping substitution is [Y / s(Y)]. 11.97/4.67 11.97/4.67 The result substitution is [ ]. 11.97/4.67 11.97/4.67 11.97/4.67 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (14) 11.97/4.67 Complex Obligation (BEST) 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (15) 11.97/4.67 Obligation: 11.97/4.67 Proved the lower bound n^1 for the following obligation: 11.97/4.67 11.97/4.67 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 11.97/4.67 11.97/4.67 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) 11.97/4.67 11.97/4.67 S is empty. 11.97/4.67 Rewrite Strategy: INNERMOST 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (16) LowerBoundPropagationProof (FINISHED) 11.97/4.67 Propagated lower bound. 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (17) 11.97/4.67 BOUNDS(n^1, INF) 11.97/4.67 11.97/4.67 ---------------------------------------- 11.97/4.67 11.97/4.67 (18) 11.97/4.67 Obligation: 11.97/4.67 Analyzing the following TRS for decreasing loops: 11.97/4.67 11.97/4.67 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 11.97/4.67 11.97/4.67 11.97/4.67 The TRS R consists of the following rules: 11.97/4.67 11.97/4.67 ackin(s(X), s(Y)) -> u21(ackin(s(X), Y), X) 11.97/4.67 u21(ackout(X), Y) -> u22(ackin(Y, X)) 11.97/4.67 11.97/4.67 S is empty. 11.97/4.67 Rewrite Strategy: INNERMOST 12.11/4.72 EOF