30.92/8.86 WORST_CASE(Omega(n^1), O(n^1)) 30.92/8.88 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 30.92/8.88 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 30.92/8.88 30.92/8.88 30.92/8.88 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 30.92/8.88 30.92/8.88 (0) CpxTRS 30.92/8.88 (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] 30.92/8.88 (2) CpxTRS 30.92/8.88 (3) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 30.92/8.88 (4) CpxTRS 30.92/8.88 (5) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 30.92/8.88 (6) CpxWeightedTrs 30.92/8.88 (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 30.92/8.88 (8) CpxTypedWeightedTrs 30.92/8.88 (9) CompletionProof [UPPER BOUND(ID), 0 ms] 30.92/8.88 (10) CpxTypedWeightedCompleteTrs 30.92/8.88 (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 30.92/8.88 (12) CpxRNTS 30.92/8.88 (13) CompleteCoflocoProof [FINISHED, 209 ms] 30.92/8.88 (14) BOUNDS(1, n^1) 30.92/8.88 (15) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 30.92/8.88 (16) TRS for Loop Detection 30.92/8.88 (17) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 30.92/8.88 (18) BEST 30.92/8.88 (19) proven lower bound 30.92/8.88 (20) LowerBoundPropagationProof [FINISHED, 0 ms] 30.92/8.88 (21) BOUNDS(n^1, INF) 30.92/8.88 (22) TRS for Loop Detection 30.92/8.88 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (0) 30.92/8.88 Obligation: 30.92/8.88 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b 30.92/8.88 f(c) -> d 30.92/8.88 f(g(x, y)) -> g(f(x), f(y)) 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) 30.92/8.88 g(x, x) -> h(e, x) 30.92/8.88 30.92/8.88 S is empty. 30.92/8.88 Rewrite Strategy: FULL 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) 30.92/8.88 The following defined symbols can occur below the 0th argument of g: f, g 30.92/8.88 The following defined symbols can occur below the 1th argument of g: f, g 30.92/8.88 30.92/8.88 Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: 30.92/8.88 f(g(x, y)) -> g(f(x), f(y)) 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (2) 30.92/8.88 Obligation: 30.92/8.88 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b 30.92/8.88 f(c) -> d 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) 30.92/8.88 g(x, x) -> h(e, x) 30.92/8.88 30.92/8.88 S is empty. 30.92/8.88 Rewrite Strategy: FULL 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (3) RcToIrcProof (BOTH BOUNDS(ID, ID)) 30.92/8.88 Converted rc-obligation to irc-obligation. 30.92/8.88 30.92/8.88 The duplicating contexts are: 30.92/8.88 f(h(x, [])) 30.92/8.88 f(h([], y)) 30.92/8.88 30.92/8.88 30.92/8.88 The defined contexts are: 30.92/8.88 g(h(x0, []), h(x2, x3)) 30.92/8.88 g(h(x0, x1), h(x2, [])) 30.92/8.88 30.92/8.88 30.92/8.88 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (4) 30.92/8.88 Obligation: 30.92/8.88 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b 30.92/8.88 f(c) -> d 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) 30.92/8.88 g(x, x) -> h(e, x) 30.92/8.88 30.92/8.88 S is empty. 30.92/8.88 Rewrite Strategy: INNERMOST 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (5) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 30.92/8.88 Transformed relative TRS to weighted TRS 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (6) 30.92/8.88 Obligation: 30.92/8.88 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b [1] 30.92/8.88 f(c) -> d [1] 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) [1] 30.92/8.88 g(x, x) -> h(e, x) [1] 30.92/8.88 30.92/8.88 Rewrite Strategy: INNERMOST 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 30.92/8.88 Infered types. 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (8) 30.92/8.88 Obligation: 30.92/8.88 Runtime Complexity Weighted TRS with Types. 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b [1] 30.92/8.88 f(c) -> d [1] 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) [1] 30.92/8.88 g(x, x) -> h(e, x) [1] 30.92/8.88 30.92/8.88 The TRS has the following type information: 30.92/8.88 f :: a:b:c:d:h:e -> a:b:c:d:h:e 30.92/8.88 a :: a:b:c:d:h:e 30.92/8.88 b :: a:b:c:d:h:e 30.92/8.88 c :: a:b:c:d:h:e 30.92/8.88 d :: a:b:c:d:h:e 30.92/8.88 h :: a:b:c:d:h:e -> a:b:c:d:h:e -> a:b:c:d:h:e 30.92/8.88 g :: a:b:c:d:h:e -> a:b:c:d:h:e -> a:b:c:d:h:e 30.92/8.88 e :: a:b:c:d:h:e 30.92/8.88 30.92/8.88 Rewrite Strategy: INNERMOST 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (9) CompletionProof (UPPER BOUND(ID)) 30.92/8.88 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 30.92/8.88 30.92/8.88 f(v0) -> null_f [0] 30.92/8.88 g(v0, v1) -> null_g [0] 30.92/8.88 30.92/8.88 And the following fresh constants: null_f, null_g 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (10) 30.92/8.88 Obligation: 30.92/8.88 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 30.92/8.88 30.92/8.88 Runtime Complexity Weighted TRS with Types. 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b [1] 30.92/8.88 f(c) -> d [1] 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) [1] 30.92/8.88 g(x, x) -> h(e, x) [1] 30.92/8.88 f(v0) -> null_f [0] 30.92/8.88 g(v0, v1) -> null_g [0] 30.92/8.88 30.92/8.88 The TRS has the following type information: 30.92/8.88 f :: a:b:c:d:h:e:null_f:null_g -> a:b:c:d:h:e:null_f:null_g 30.92/8.88 a :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 b :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 c :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 d :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 h :: a:b:c:d:h:e:null_f:null_g -> a:b:c:d:h:e:null_f:null_g -> a:b:c:d:h:e:null_f:null_g 30.92/8.88 g :: a:b:c:d:h:e:null_f:null_g -> a:b:c:d:h:e:null_f:null_g -> a:b:c:d:h:e:null_f:null_g 30.92/8.88 e :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 null_f :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 null_g :: a:b:c:d:h:e:null_f:null_g 30.92/8.88 30.92/8.88 Rewrite Strategy: INNERMOST 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 30.92/8.88 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 30.92/8.88 The constant constructors are abstracted as follows: 30.92/8.88 30.92/8.88 a => 0 30.92/8.88 b => 1 30.92/8.88 c => 2 30.92/8.88 d => 3 30.92/8.88 e => 4 30.92/8.88 null_f => 0 30.92/8.88 null_g => 0 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (12) 30.92/8.88 Obligation: 30.92/8.88 Complexity RNTS consisting of the following rules: 30.92/8.88 30.92/8.88 f(z) -{ 1 }-> g(1 + y + f(x), 1 + x + f(y)) :|: z = 1 + x + y, x >= 0, y >= 0 30.92/8.88 f(z) -{ 1 }-> 3 :|: z = 2 30.92/8.88 f(z) -{ 1 }-> 1 :|: z = 0 30.92/8.88 f(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 30.92/8.88 g(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 30.92/8.88 g(z, z') -{ 1 }-> 1 + 4 + x :|: z' = x, x >= 0, z = x 30.92/8.88 30.92/8.88 Only complete derivations are relevant for the runtime complexity. 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (13) CompleteCoflocoProof (FINISHED) 30.92/8.88 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 30.92/8.88 30.92/8.88 eq(start(V, V3),0,[f(V, Out)],[V >= 0]). 30.92/8.88 eq(start(V, V3),0,[g(V, V3, Out)],[V >= 0,V3 >= 0]). 30.92/8.88 eq(f(V, Out),1,[],[Out = 1,V = 0]). 30.92/8.88 eq(f(V, Out),1,[],[Out = 3,V = 2]). 30.92/8.88 eq(f(V, Out),1,[f(V2, Ret01),f(V1, Ret11),g(1 + V1 + Ret01, 1 + V2 + Ret11, Ret)],[Out = Ret,V = 1 + V1 + V2,V2 >= 0,V1 >= 0]). 30.92/8.88 eq(g(V, V3, Out),1,[],[Out = 5 + V4,V3 = V4,V4 >= 0,V = V4]). 30.92/8.88 eq(f(V, Out),0,[],[Out = 0,V5 >= 0,V = V5]). 30.92/8.88 eq(g(V, V3, Out),0,[],[Out = 0,V7 >= 0,V6 >= 0,V = V7,V3 = V6]). 30.92/8.88 input_output_vars(f(V,Out),[V],[Out]). 30.92/8.88 input_output_vars(g(V,V3,Out),[V,V3],[Out]). 30.92/8.88 30.92/8.88 30.92/8.88 CoFloCo proof output: 30.92/8.88 Preprocessing Cost Relations 30.92/8.88 ===================================== 30.92/8.88 30.92/8.88 #### Computed strongly connected components 30.92/8.88 0. non_recursive : [g/3] 30.92/8.88 1. recursive [non_tail,multiple] : [f/2] 30.92/8.88 2. non_recursive : [start/2] 30.92/8.88 30.92/8.88 #### Obtained direct recursion through partial evaluation 30.92/8.88 0. SCC is partially evaluated into g/3 30.92/8.88 1. SCC is partially evaluated into f/2 30.92/8.88 2. SCC is partially evaluated into start/2 30.92/8.88 30.92/8.88 Control-Flow Refinement of Cost Relations 30.92/8.88 ===================================== 30.92/8.88 30.92/8.88 ### Specialization of cost equations g/3 30.92/8.88 * CE 7 is refined into CE [9] 30.92/8.88 * CE 8 is refined into CE [10] 30.92/8.88 30.92/8.88 30.92/8.88 ### Cost equations --> "Loop" of g/3 30.92/8.88 * CEs [9] --> Loop 8 30.92/8.88 * CEs [10] --> Loop 9 30.92/8.88 30.92/8.88 ### Ranking functions of CR g(V,V3,Out) 30.92/8.88 30.92/8.88 #### Partial ranking functions of CR g(V,V3,Out) 30.92/8.88 30.92/8.88 30.92/8.88 ### Specialization of cost equations f/2 30.92/8.88 * CE 6 is refined into CE [11] 30.92/8.88 * CE 4 is refined into CE [12] 30.92/8.88 * CE 3 is refined into CE [13] 30.92/8.88 * CE 5 is refined into CE [14,15] 30.92/8.88 30.92/8.88 30.92/8.88 ### Cost equations --> "Loop" of f/2 30.92/8.88 * CEs [15] --> Loop 10 30.92/8.88 * CEs [14] --> Loop 11 30.92/8.88 * CEs [11] --> Loop 12 30.92/8.88 * CEs [12] --> Loop 13 30.92/8.88 * CEs [13] --> Loop 14 30.92/8.88 30.92/8.88 ### Ranking functions of CR f(V,Out) 30.92/8.88 * RF of phase [10,11]: [V] 30.92/8.88 30.92/8.88 #### Partial ranking functions of CR f(V,Out) 30.92/8.88 * Partial RF of phase [10,11]: 30.92/8.88 - RF of loop [10:1,10:2,11:1,11:2]: 30.92/8.88 V 30.92/8.88 30.92/8.88 30.92/8.88 ### Specialization of cost equations start/2 30.92/8.88 * CE 1 is refined into CE [16,17,18] 30.92/8.88 * CE 2 is refined into CE [19,20] 30.92/8.88 30.92/8.88 30.92/8.88 ### Cost equations --> "Loop" of start/2 30.92/8.88 * CEs [20] --> Loop 15 30.92/8.88 * CEs [16,17,18,19] --> Loop 16 30.92/8.88 30.92/8.88 ### Ranking functions of CR start(V,V3) 30.92/8.88 30.92/8.88 #### Partial ranking functions of CR start(V,V3) 30.92/8.88 30.92/8.88 30.92/8.88 Computing Bounds 30.92/8.88 ===================================== 30.92/8.88 30.92/8.88 #### Cost of chains of g(V,V3,Out): 30.92/8.88 * Chain [9]: 0 30.92/8.88 with precondition: [Out=0,V>=0,V3>=0] 30.92/8.88 30.92/8.88 * Chain [8]: 1 30.92/8.88 with precondition: [V=V3,V+5=Out,V>=0] 30.92/8.88 30.92/8.88 30.92/8.88 #### Cost of chains of f(V,Out): 30.92/8.88 * Chain [14]: 1 30.92/8.88 with precondition: [V=0,Out=1] 30.92/8.88 30.92/8.88 * Chain [13]: 1 30.92/8.88 with precondition: [V=2,Out=3] 30.92/8.88 30.92/8.88 * Chain [12]: 0 30.92/8.88 with precondition: [Out=0,V>=0] 30.92/8.88 30.92/8.88 * Chain [multiple([10,11],[[14],[13],[12]])]: 2*it(10)+1*it(11)+1*it([13])+1*it([14])+0 30.92/8.88 Such that:it([13]) =< V/3+1/3 30.92/8.88 aux(1) =< V+1 30.92/8.88 aux(2) =< 10/9*V+1/9 30.92/8.88 aux(3) =< 12/11*V+1/11 30.92/8.88 it([13]) =< aux(1) 30.92/8.88 it([14]) =< aux(1) 30.92/8.88 it(10) =< aux(2) 30.92/8.88 it(11) =< aux(2) 30.92/8.88 it([13]) =< aux(2) 30.92/8.88 it(11) =< aux(3) 30.92/8.88 it([13]) =< aux(3) 30.92/8.88 30.92/8.88 with precondition: [V>=1,Out>=0,7*V+7>=2*Out] 30.92/8.88 30.92/8.88 30.92/8.88 #### Cost of chains of start(V,V3): 30.92/8.88 * Chain [16]: 1*s(9)+1*s(12)+2*s(13)+1*s(14)+1 30.92/8.88 Such that:s(8) =< V+1 30.92/8.88 s(9) =< V/3+1/3 30.92/8.88 s(10) =< 10/9*V+1/9 30.92/8.88 s(11) =< 12/11*V+1/11 30.92/8.88 s(9) =< s(8) 30.92/8.88 s(12) =< s(8) 30.92/8.88 s(13) =< s(10) 30.92/8.88 s(14) =< s(10) 30.92/8.88 s(9) =< s(10) 30.92/8.88 s(14) =< s(11) 30.92/8.88 s(9) =< s(11) 30.92/8.88 30.92/8.88 with precondition: [V>=0] 30.92/8.88 30.92/8.88 * Chain [15]: 1 30.92/8.88 with precondition: [V=V3,V>=0] 30.92/8.88 30.92/8.88 30.92/8.88 Closed-form bounds of start(V,V3): 30.92/8.88 ------------------------------------- 30.92/8.88 * Chain [16] with precondition: [V>=0] 30.92/8.88 - Upper bound: 14/3*V+8/3 30.92/8.88 - Complexity: n 30.92/8.88 * Chain [15] with precondition: [V=V3,V>=0] 30.92/8.88 - Upper bound: 1 30.92/8.88 - Complexity: constant 30.92/8.88 30.92/8.88 ### Maximum cost of start(V,V3): 14/3*V+8/3 30.92/8.88 Asymptotic class: n 30.92/8.88 * Total analysis performed in 129 ms. 30.92/8.88 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (14) 30.92/8.88 BOUNDS(1, n^1) 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (15) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 30.92/8.88 Transformed a relative TRS into a decreasing-loop problem. 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (16) 30.92/8.88 Obligation: 30.92/8.88 Analyzing the following TRS for decreasing loops: 30.92/8.88 30.92/8.88 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b 30.92/8.88 f(c) -> d 30.92/8.88 f(g(x, y)) -> g(f(x), f(y)) 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) 30.92/8.88 g(x, x) -> h(e, x) 30.92/8.88 30.92/8.88 S is empty. 30.92/8.88 Rewrite Strategy: FULL 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (17) DecreasingLoopProof (LOWER BOUND(ID)) 30.92/8.88 The following loop(s) give(s) rise to the lower bound Omega(n^1): 30.92/8.88 30.92/8.88 The rewrite sequence 30.92/8.88 30.92/8.88 f(h(x, y)) ->^+ g(h(y, f(x)), h(x, f(y))) 30.92/8.88 30.92/8.88 gives rise to a decreasing loop by considering the right hand sides subterm at position [0,1]. 30.92/8.88 30.92/8.88 The pumping substitution is [x / h(x, y)]. 30.92/8.88 30.92/8.88 The result substitution is [ ]. 30.92/8.88 30.92/8.88 30.92/8.88 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (18) 30.92/8.88 Complex Obligation (BEST) 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (19) 30.92/8.88 Obligation: 30.92/8.88 Proved the lower bound n^1 for the following obligation: 30.92/8.88 30.92/8.88 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b 30.92/8.88 f(c) -> d 30.92/8.88 f(g(x, y)) -> g(f(x), f(y)) 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) 30.92/8.88 g(x, x) -> h(e, x) 30.92/8.88 30.92/8.88 S is empty. 30.92/8.88 Rewrite Strategy: FULL 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (20) LowerBoundPropagationProof (FINISHED) 30.92/8.88 Propagated lower bound. 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (21) 30.92/8.88 BOUNDS(n^1, INF) 30.92/8.88 30.92/8.88 ---------------------------------------- 30.92/8.88 30.92/8.88 (22) 30.92/8.88 Obligation: 30.92/8.88 Analyzing the following TRS for decreasing loops: 30.92/8.88 30.92/8.88 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 30.92/8.88 30.92/8.88 30.92/8.88 The TRS R consists of the following rules: 30.92/8.88 30.92/8.88 f(a) -> b 30.92/8.88 f(c) -> d 30.92/8.88 f(g(x, y)) -> g(f(x), f(y)) 30.92/8.88 f(h(x, y)) -> g(h(y, f(x)), h(x, f(y))) 30.92/8.88 g(x, x) -> h(e, x) 30.92/8.88 30.92/8.88 S is empty. 30.92/8.88 Rewrite Strategy: FULL 31.10/11.62 EOF