380.31/291.56 WORST_CASE(Omega(n^1), O(n^2)) 380.31/291.58 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 380.31/291.58 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 380.31/291.58 380.31/291.58 380.31/291.58 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 380.31/291.58 380.31/291.58 (0) CpxTRS 380.31/291.58 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (2) CpxWeightedTrs 380.31/291.58 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (4) CpxTypedWeightedTrs 380.31/291.58 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 380.31/291.58 (6) CpxTypedWeightedCompleteTrs 380.31/291.58 (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (8) CpxTypedWeightedCompleteTrs 380.31/291.58 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 380.31/291.58 (10) CpxRNTS 380.31/291.58 (11) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (12) CpxRNTS 380.31/291.58 (13) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (14) CpxRNTS 380.31/291.58 (15) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 380.31/291.58 (16) CpxRNTS 380.31/291.58 (17) IntTrsBoundProof [UPPER BOUND(ID), 227 ms] 380.31/291.58 (18) CpxRNTS 380.31/291.58 (19) IntTrsBoundProof [UPPER BOUND(ID), 56 ms] 380.31/291.58 (20) CpxRNTS 380.31/291.58 (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 380.31/291.58 (22) CpxRNTS 380.31/291.58 (23) IntTrsBoundProof [UPPER BOUND(ID), 385 ms] 380.31/291.58 (24) CpxRNTS 380.31/291.58 (25) IntTrsBoundProof [UPPER BOUND(ID), 156 ms] 380.31/291.58 (26) CpxRNTS 380.31/291.58 (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 380.31/291.58 (28) CpxRNTS 380.31/291.58 (29) IntTrsBoundProof [UPPER BOUND(ID), 643 ms] 380.31/291.58 (30) CpxRNTS 380.31/291.58 (31) IntTrsBoundProof [UPPER BOUND(ID), 337 ms] 380.31/291.58 (32) CpxRNTS 380.31/291.58 (33) FinalProof [FINISHED, 0 ms] 380.31/291.58 (34) BOUNDS(1, n^2) 380.31/291.58 (35) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (36) CpxTRS 380.31/291.58 (37) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 380.31/291.58 (38) typed CpxTrs 380.31/291.58 (39) OrderProof [LOWER BOUND(ID), 0 ms] 380.31/291.58 (40) typed CpxTrs 380.31/291.58 (41) RewriteLemmaProof [LOWER BOUND(ID), 307 ms] 380.31/291.58 (42) BEST 380.31/291.58 (43) proven lower bound 380.31/291.58 (44) LowerBoundPropagationProof [FINISHED, 0 ms] 380.31/291.58 (45) BOUNDS(n^1, INF) 380.31/291.58 (46) typed CpxTrs 380.31/291.58 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (0) 380.31/291.58 Obligation: 380.31/291.58 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 380.31/291.58 380.31/291.58 380.31/291.58 The TRS R consists of the following rules: 380.31/291.58 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) 380.31/291.58 gr(0, x) -> false 380.31/291.58 gr(s(x), 0) -> true 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) 380.31/291.58 p(0) -> 0 380.31/291.58 p(s(x)) -> x 380.31/291.58 380.31/291.58 S is empty. 380.31/291.58 Rewrite Strategy: INNERMOST 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Transformed relative TRS to weighted TRS 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (2) 380.31/291.58 Obligation: 380.31/291.58 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 380.31/291.58 380.31/291.58 380.31/291.58 The TRS R consists of the following rules: 380.31/291.58 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) [1] 380.31/291.58 gr(0, x) -> false [1] 380.31/291.58 gr(s(x), 0) -> true [1] 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) [1] 380.31/291.58 p(0) -> 0 [1] 380.31/291.58 p(s(x)) -> x [1] 380.31/291.58 380.31/291.58 Rewrite Strategy: INNERMOST 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Infered types. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (4) 380.31/291.58 Obligation: 380.31/291.58 Runtime Complexity Weighted TRS with Types. 380.31/291.58 The TRS R consists of the following rules: 380.31/291.58 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) [1] 380.31/291.58 gr(0, x) -> false [1] 380.31/291.58 gr(s(x), 0) -> true [1] 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) [1] 380.31/291.58 p(0) -> 0 [1] 380.31/291.58 p(s(x)) -> x [1] 380.31/291.58 380.31/291.58 The TRS has the following type information: 380.31/291.58 cond :: true:false -> s:0 -> s:0 -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0 -> s:0 -> true:false 380.31/291.58 p :: s:0 -> s:0 380.31/291.58 s :: s:0 -> s:0 380.31/291.58 0 :: s:0 380.31/291.58 false :: true:false 380.31/291.58 380.31/291.58 Rewrite Strategy: INNERMOST 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (5) CompletionProof (UPPER BOUND(ID)) 380.31/291.58 The transformation into a RNTS is sound, since: 380.31/291.58 380.31/291.58 (a) The obligation is a constructor system where every type has a constant constructor, 380.31/291.58 380.31/291.58 (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: 380.31/291.58 380.31/291.58 cond_3 380.31/291.58 380.31/291.58 (c) The following functions are completely defined: 380.31/291.58 380.31/291.58 gr_2 380.31/291.58 p_1 380.31/291.58 380.31/291.58 Due to the following rules being added: 380.31/291.58 none 380.31/291.58 380.31/291.58 And the following fresh constants: const 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (6) 380.31/291.58 Obligation: 380.31/291.58 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 380.31/291.58 380.31/291.58 Runtime Complexity Weighted TRS with Types. 380.31/291.58 The TRS R consists of the following rules: 380.31/291.58 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) [1] 380.31/291.58 gr(0, x) -> false [1] 380.31/291.58 gr(s(x), 0) -> true [1] 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) [1] 380.31/291.58 p(0) -> 0 [1] 380.31/291.58 p(s(x)) -> x [1] 380.31/291.58 380.31/291.58 The TRS has the following type information: 380.31/291.58 cond :: true:false -> s:0 -> s:0 -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0 -> s:0 -> true:false 380.31/291.58 p :: s:0 -> s:0 380.31/291.58 s :: s:0 -> s:0 380.31/291.58 0 :: s:0 380.31/291.58 false :: true:false 380.31/291.58 const :: cond 380.31/291.58 380.31/291.58 Rewrite Strategy: INNERMOST 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (7) NarrowingProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Narrowed the inner basic terms of all right-hand sides by a single narrowing step. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (8) 380.31/291.58 Obligation: 380.31/291.58 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 380.31/291.58 380.31/291.58 Runtime Complexity Weighted TRS with Types. 380.31/291.58 The TRS R consists of the following rules: 380.31/291.58 380.31/291.58 cond(true, 0, y) -> cond(false, 0, s(y)) [3] 380.31/291.58 cond(true, s(x'), 0) -> cond(true, x', s(0)) [3] 380.31/291.58 cond(true, s(x''), s(y')) -> cond(gr(x'', y'), x'', s(s(y'))) [3] 380.31/291.58 gr(0, x) -> false [1] 380.31/291.58 gr(s(x), 0) -> true [1] 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) [1] 380.31/291.58 p(0) -> 0 [1] 380.31/291.58 p(s(x)) -> x [1] 380.31/291.58 380.31/291.58 The TRS has the following type information: 380.31/291.58 cond :: true:false -> s:0 -> s:0 -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0 -> s:0 -> true:false 380.31/291.58 p :: s:0 -> s:0 380.31/291.58 s :: s:0 -> s:0 380.31/291.58 0 :: s:0 380.31/291.58 false :: true:false 380.31/291.58 const :: cond 380.31/291.58 380.31/291.58 Rewrite Strategy: INNERMOST 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 380.31/291.58 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 380.31/291.58 The constant constructors are abstracted as follows: 380.31/291.58 380.31/291.58 true => 1 380.31/291.58 0 => 0 380.31/291.58 false => 0 380.31/291.58 const => 0 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (10) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(x'', y'), x'', 1 + (1 + y')) :|: z' = 1 + x'', z = 1, y' >= 0, x'' >= 0, z'' = 1 + y' 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, x', 1 + 0) :|: z'' = 0, z' = 1 + x', z = 1, x' >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + y) :|: z'' = y, z = 1, y >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (11) SimplificationProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Simplified the RNTS by moving equalities from the constraints into the right-hand sides. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (12) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Found the following analysis order by SCC decomposition: 380.31/291.58 380.31/291.58 { p } 380.31/291.58 { gr } 380.31/291.58 { cond } 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (14) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {p}, {gr}, {cond} 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (15) ResultPropagationProof (UPPER BOUND(ID)) 380.31/291.58 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (16) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {p}, {gr}, {cond} 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (17) IntTrsBoundProof (UPPER BOUND(ID)) 380.31/291.58 380.31/291.58 Computed SIZE bound using KoAT for: p 380.31/291.58 after applying outer abstraction to obtain an ITS, 380.31/291.58 resulting in: O(n^1) with polynomial bound: z 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (18) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {p}, {gr}, {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: ?, size: O(n^1) [z] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (19) IntTrsBoundProof (UPPER BOUND(ID)) 380.31/291.58 380.31/291.58 Computed RUNTIME bound using CoFloCo for: p 380.31/291.58 after applying outer abstraction to obtain an ITS, 380.31/291.58 resulting in: O(1) with polynomial bound: 1 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (20) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {gr}, {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (21) ResultPropagationProof (UPPER BOUND(ID)) 380.31/291.58 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (22) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {gr}, {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (23) IntTrsBoundProof (UPPER BOUND(ID)) 380.31/291.58 380.31/291.58 Computed SIZE bound using CoFloCo for: gr 380.31/291.58 after applying outer abstraction to obtain an ITS, 380.31/291.58 resulting in: O(1) with polynomial bound: 1 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (24) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {gr}, {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 gr: runtime: ?, size: O(1) [1] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (25) IntTrsBoundProof (UPPER BOUND(ID)) 380.31/291.58 380.31/291.58 Computed RUNTIME bound using KoAT for: gr 380.31/291.58 after applying outer abstraction to obtain an ITS, 380.31/291.58 resulting in: O(n^1) with polynomial bound: 2 + z' 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (26) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(gr(z' - 1, z'' - 1), z' - 1, 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 gr: runtime: O(n^1) [2 + z'], size: O(1) [1] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (27) ResultPropagationProof (UPPER BOUND(ID)) 380.31/291.58 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (28) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 4 + z'' }-> cond(s, z' - 1, 1 + (1 + (z'' - 1))) :|: s >= 0, s <= 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 gr: runtime: O(n^1) [2 + z'], size: O(1) [1] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (29) IntTrsBoundProof (UPPER BOUND(ID)) 380.31/291.58 380.31/291.58 Computed SIZE bound using CoFloCo for: cond 380.31/291.58 after applying outer abstraction to obtain an ITS, 380.31/291.58 resulting in: O(1) with polynomial bound: 0 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (30) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 4 + z'' }-> cond(s, z' - 1, 1 + (1 + (z'' - 1))) :|: s >= 0, s <= 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: {cond} 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 gr: runtime: O(n^1) [2 + z'], size: O(1) [1] 380.31/291.58 cond: runtime: ?, size: O(1) [0] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (31) IntTrsBoundProof (UPPER BOUND(ID)) 380.31/291.58 380.31/291.58 Computed RUNTIME bound using CoFloCo for: cond 380.31/291.58 after applying outer abstraction to obtain an ITS, 380.31/291.58 resulting in: O(n^2) with polynomial bound: 9 + 4*z' + z'*z'' + z'^2 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (32) 380.31/291.58 Obligation: 380.31/291.58 Complexity RNTS consisting of the following rules: 380.31/291.58 380.31/291.58 cond(z, z', z'') -{ 4 + z'' }-> cond(s, z' - 1, 1 + (1 + (z'' - 1))) :|: s >= 0, s <= 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(1, z' - 1, 1 + 0) :|: z'' = 0, z = 1, z' - 1 >= 0 380.31/291.58 cond(z, z', z'') -{ 3 }-> cond(0, 0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 380.31/291.58 gr(z, z') -{ 1 }-> 1 :|: z - 1 >= 0, z' = 0 380.31/291.58 gr(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 380.31/291.58 p(z) -{ 1 }-> 0 :|: z = 0 380.31/291.58 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 380.31/291.58 380.31/291.58 Function symbols to be analyzed: 380.31/291.58 Previous analysis results are: 380.31/291.58 p: runtime: O(1) [1], size: O(n^1) [z] 380.31/291.58 gr: runtime: O(n^1) [2 + z'], size: O(1) [1] 380.31/291.58 cond: runtime: O(n^2) [9 + 4*z' + z'*z'' + z'^2], size: O(1) [0] 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (33) FinalProof (FINISHED) 380.31/291.58 Computed overall runtime complexity 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (34) 380.31/291.58 BOUNDS(1, n^2) 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (35) RenamingProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Renamed function symbols to avoid clashes with predefined symbol. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (36) 380.31/291.58 Obligation: 380.31/291.58 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 380.31/291.58 380.31/291.58 380.31/291.58 The TRS R consists of the following rules: 380.31/291.58 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) 380.31/291.58 gr(0', x) -> false 380.31/291.58 gr(s(x), 0') -> true 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) 380.31/291.58 p(0') -> 0' 380.31/291.58 p(s(x)) -> x 380.31/291.58 380.31/291.58 S is empty. 380.31/291.58 Rewrite Strategy: INNERMOST 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (37) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 380.31/291.58 Infered types. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (38) 380.31/291.58 Obligation: 380.31/291.58 Innermost TRS: 380.31/291.58 Rules: 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) 380.31/291.58 gr(0', x) -> false 380.31/291.58 gr(s(x), 0') -> true 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) 380.31/291.58 p(0') -> 0' 380.31/291.58 p(s(x)) -> x 380.31/291.58 380.31/291.58 Types: 380.31/291.58 cond :: true:false -> s:0' -> s:0' -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0' -> s:0' -> true:false 380.31/291.58 p :: s:0' -> s:0' 380.31/291.58 s :: s:0' -> s:0' 380.31/291.58 0' :: s:0' 380.31/291.58 false :: true:false 380.31/291.58 hole_cond1_0 :: cond 380.31/291.58 hole_true:false2_0 :: true:false 380.31/291.58 hole_s:0'3_0 :: s:0' 380.31/291.58 gen_s:0'4_0 :: Nat -> s:0' 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (39) OrderProof (LOWER BOUND(ID)) 380.31/291.58 Heuristically decided to analyse the following defined symbols: 380.31/291.58 cond, gr 380.31/291.58 380.31/291.58 They will be analysed ascendingly in the following order: 380.31/291.58 gr < cond 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (40) 380.31/291.58 Obligation: 380.31/291.58 Innermost TRS: 380.31/291.58 Rules: 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) 380.31/291.58 gr(0', x) -> false 380.31/291.58 gr(s(x), 0') -> true 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) 380.31/291.58 p(0') -> 0' 380.31/291.58 p(s(x)) -> x 380.31/291.58 380.31/291.58 Types: 380.31/291.58 cond :: true:false -> s:0' -> s:0' -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0' -> s:0' -> true:false 380.31/291.58 p :: s:0' -> s:0' 380.31/291.58 s :: s:0' -> s:0' 380.31/291.58 0' :: s:0' 380.31/291.58 false :: true:false 380.31/291.58 hole_cond1_0 :: cond 380.31/291.58 hole_true:false2_0 :: true:false 380.31/291.58 hole_s:0'3_0 :: s:0' 380.31/291.58 gen_s:0'4_0 :: Nat -> s:0' 380.31/291.58 380.31/291.58 380.31/291.58 Generator Equations: 380.31/291.58 gen_s:0'4_0(0) <=> 0' 380.31/291.58 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 380.31/291.58 380.31/291.58 380.31/291.58 The following defined symbols remain to be analysed: 380.31/291.58 gr, cond 380.31/291.58 380.31/291.58 They will be analysed ascendingly in the following order: 380.31/291.58 gr < cond 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (41) RewriteLemmaProof (LOWER BOUND(ID)) 380.31/291.58 Proved the following rewrite lemma: 380.31/291.58 gr(gen_s:0'4_0(n6_0), gen_s:0'4_0(n6_0)) -> false, rt in Omega(1 + n6_0) 380.31/291.58 380.31/291.58 Induction Base: 380.31/291.58 gr(gen_s:0'4_0(0), gen_s:0'4_0(0)) ->_R^Omega(1) 380.31/291.58 false 380.31/291.58 380.31/291.58 Induction Step: 380.31/291.58 gr(gen_s:0'4_0(+(n6_0, 1)), gen_s:0'4_0(+(n6_0, 1))) ->_R^Omega(1) 380.31/291.58 gr(gen_s:0'4_0(n6_0), gen_s:0'4_0(n6_0)) ->_IH 380.31/291.58 false 380.31/291.58 380.31/291.58 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (42) 380.31/291.58 Complex Obligation (BEST) 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (43) 380.31/291.58 Obligation: 380.31/291.58 Proved the lower bound n^1 for the following obligation: 380.31/291.58 380.31/291.58 Innermost TRS: 380.31/291.58 Rules: 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) 380.31/291.58 gr(0', x) -> false 380.31/291.58 gr(s(x), 0') -> true 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) 380.31/291.58 p(0') -> 0' 380.31/291.58 p(s(x)) -> x 380.31/291.58 380.31/291.58 Types: 380.31/291.58 cond :: true:false -> s:0' -> s:0' -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0' -> s:0' -> true:false 380.31/291.58 p :: s:0' -> s:0' 380.31/291.58 s :: s:0' -> s:0' 380.31/291.58 0' :: s:0' 380.31/291.58 false :: true:false 380.31/291.58 hole_cond1_0 :: cond 380.31/291.58 hole_true:false2_0 :: true:false 380.31/291.58 hole_s:0'3_0 :: s:0' 380.31/291.58 gen_s:0'4_0 :: Nat -> s:0' 380.31/291.58 380.31/291.58 380.31/291.58 Generator Equations: 380.31/291.58 gen_s:0'4_0(0) <=> 0' 380.31/291.58 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 380.31/291.58 380.31/291.58 380.31/291.58 The following defined symbols remain to be analysed: 380.31/291.58 gr, cond 380.31/291.58 380.31/291.58 They will be analysed ascendingly in the following order: 380.31/291.58 gr < cond 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (44) LowerBoundPropagationProof (FINISHED) 380.31/291.58 Propagated lower bound. 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (45) 380.31/291.58 BOUNDS(n^1, INF) 380.31/291.58 380.31/291.58 ---------------------------------------- 380.31/291.58 380.31/291.58 (46) 380.31/291.58 Obligation: 380.31/291.58 Innermost TRS: 380.31/291.58 Rules: 380.31/291.58 cond(true, x, y) -> cond(gr(x, y), p(x), s(y)) 380.31/291.58 gr(0', x) -> false 380.31/291.58 gr(s(x), 0') -> true 380.31/291.58 gr(s(x), s(y)) -> gr(x, y) 380.31/291.58 p(0') -> 0' 380.31/291.58 p(s(x)) -> x 380.31/291.58 380.31/291.58 Types: 380.31/291.58 cond :: true:false -> s:0' -> s:0' -> cond 380.31/291.58 true :: true:false 380.31/291.58 gr :: s:0' -> s:0' -> true:false 380.31/291.58 p :: s:0' -> s:0' 380.31/291.58 s :: s:0' -> s:0' 380.31/291.58 0' :: s:0' 380.31/291.58 false :: true:false 380.31/291.58 hole_cond1_0 :: cond 380.31/291.58 hole_true:false2_0 :: true:false 380.31/291.58 hole_s:0'3_0 :: s:0' 380.31/291.58 gen_s:0'4_0 :: Nat -> s:0' 380.31/291.58 380.31/291.58 380.31/291.58 Lemmas: 380.31/291.58 gr(gen_s:0'4_0(n6_0), gen_s:0'4_0(n6_0)) -> false, rt in Omega(1 + n6_0) 380.31/291.58 380.31/291.58 380.31/291.58 Generator Equations: 380.31/291.58 gen_s:0'4_0(0) <=> 0' 380.31/291.58 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 380.31/291.58 380.31/291.58 380.31/291.58 The following defined symbols remain to be analysed: 380.31/291.58 cond 380.37/291.62 EOF