17.32/5.55 WORST_CASE(Omega(n^1), O(n^1)) 17.64/5.56 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 17.64/5.56 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 17.64/5.56 17.64/5.56 17.64/5.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 17.64/5.56 17.64/5.56 (0) CpxTRS 17.64/5.56 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (2) CpxTRS 17.64/5.56 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (4) CpxWeightedTrs 17.64/5.56 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (6) CpxTypedWeightedTrs 17.64/5.56 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 17.64/5.56 (8) CpxTypedWeightedCompleteTrs 17.64/5.56 (9) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (10) CpxTypedWeightedCompleteTrs 17.64/5.56 (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 17.64/5.56 (12) CpxRNTS 17.64/5.56 (13) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (14) CpxRNTS 17.64/5.56 (15) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (16) CpxRNTS 17.64/5.56 (17) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 17.64/5.56 (18) CpxRNTS 17.64/5.56 (19) IntTrsBoundProof [UPPER BOUND(ID), 514 ms] 17.64/5.56 (20) CpxRNTS 17.64/5.56 (21) IntTrsBoundProof [UPPER BOUND(ID), 189 ms] 17.64/5.56 (22) CpxRNTS 17.64/5.56 (23) FinalProof [FINISHED, 0 ms] 17.64/5.56 (24) BOUNDS(1, n^1) 17.64/5.56 (25) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (26) CpxTRS 17.64/5.56 (27) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 17.64/5.56 (28) typed CpxTrs 17.64/5.56 (29) OrderProof [LOWER BOUND(ID), 0 ms] 17.64/5.56 (30) typed CpxTrs 17.64/5.56 (31) RewriteLemmaProof [LOWER BOUND(ID), 420 ms] 17.64/5.56 (32) proven lower bound 17.64/5.56 (33) LowerBoundPropagationProof [FINISHED, 0 ms] 17.64/5.56 (34) BOUNDS(n^1, INF) 17.64/5.56 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (0) 17.64/5.56 Obligation: 17.64/5.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 17.64/5.56 17.64/5.56 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0, s(y), s(z)) -> 0 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) 17.64/5.56 quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) 17.64/5.56 17.64/5.56 S is empty. 17.64/5.56 Rewrite Strategy: FULL 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Converted rc-obligation to irc-obligation. 17.64/5.56 17.64/5.56 As the TRS does not nest defined symbols, we have rc = irc. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (2) 17.64/5.56 Obligation: 17.64/5.56 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 17.64/5.56 17.64/5.56 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0, s(y), s(z)) -> 0 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) 17.64/5.56 quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) 17.64/5.56 17.64/5.56 S is empty. 17.64/5.56 Rewrite Strategy: INNERMOST 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Transformed relative TRS to weighted TRS 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (4) 17.64/5.56 Obligation: 17.64/5.56 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 17.64/5.56 17.64/5.56 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0, s(y), s(z)) -> 0 [1] 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) [1] 17.64/5.56 quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) [1] 17.64/5.56 17.64/5.56 Rewrite Strategy: INNERMOST 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Infered types. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (6) 17.64/5.56 Obligation: 17.64/5.56 Runtime Complexity Weighted TRS with Types. 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0, s(y), s(z)) -> 0 [1] 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) [1] 17.64/5.56 quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) [1] 17.64/5.56 17.64/5.56 The TRS has the following type information: 17.64/5.56 quot :: 0:s -> 0:s -> 0:s -> 0:s 17.64/5.56 0 :: 0:s 17.64/5.56 s :: 0:s -> 0:s 17.64/5.56 17.64/5.56 Rewrite Strategy: INNERMOST 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (7) CompletionProof (UPPER BOUND(ID)) 17.64/5.56 The transformation into a RNTS is sound, since: 17.64/5.56 17.64/5.56 (a) The obligation is a constructor system where every type has a constant constructor, 17.64/5.56 17.64/5.56 (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: 17.64/5.56 17.64/5.56 quot_3 17.64/5.56 17.64/5.56 (c) The following functions are completely defined: 17.64/5.56 none 17.64/5.56 17.64/5.56 Due to the following rules being added: 17.64/5.56 none 17.64/5.56 17.64/5.56 And the following fresh constants: none 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (8) 17.64/5.56 Obligation: 17.64/5.56 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 17.64/5.56 17.64/5.56 Runtime Complexity Weighted TRS with Types. 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0, s(y), s(z)) -> 0 [1] 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) [1] 17.64/5.56 quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) [1] 17.64/5.56 17.64/5.56 The TRS has the following type information: 17.64/5.56 quot :: 0:s -> 0:s -> 0:s -> 0:s 17.64/5.56 0 :: 0:s 17.64/5.56 s :: 0:s -> 0:s 17.64/5.56 17.64/5.56 Rewrite Strategy: INNERMOST 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (9) NarrowingProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Narrowed the inner basic terms of all right-hand sides by a single narrowing step. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (10) 17.64/5.56 Obligation: 17.64/5.56 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 17.64/5.56 17.64/5.56 Runtime Complexity Weighted TRS with Types. 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0, s(y), s(z)) -> 0 [1] 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) [1] 17.64/5.56 quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) [1] 17.64/5.56 17.64/5.56 The TRS has the following type information: 17.64/5.56 quot :: 0:s -> 0:s -> 0:s -> 0:s 17.64/5.56 0 :: 0:s 17.64/5.56 s :: 0:s -> 0:s 17.64/5.56 17.64/5.56 Rewrite Strategy: INNERMOST 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 17.64/5.56 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 17.64/5.56 The constant constructors are abstracted as follows: 17.64/5.56 17.64/5.56 0 => 0 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (12) 17.64/5.56 Obligation: 17.64/5.56 Complexity RNTS consisting of the following rules: 17.64/5.56 17.64/5.56 quot(z', z'', z1) -{ 1 }-> quot(x, y, z) :|: z' = 1 + x, z1 = z, z >= 0, x >= 0, y >= 0, z'' = 1 + y 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 0 :|: z >= 0, y >= 0, z'' = 1 + y, z1 = 1 + z, z' = 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 1 + quot(x, 1 + z, 1 + z) :|: z'' = 0, z >= 0, z' = x, x >= 0, z1 = 1 + z 17.64/5.56 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (13) SimplificationProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Simplified the RNTS by moving equalities from the constraints into the right-hand sides. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (14) 17.64/5.56 Obligation: 17.64/5.56 Complexity RNTS consisting of the following rules: 17.64/5.56 17.64/5.56 quot(z', z'', z1) -{ 1 }-> quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 0 :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 1 + quot(z', 1 + (z1 - 1), 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0 17.64/5.56 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Found the following analysis order by SCC decomposition: 17.64/5.56 17.64/5.56 { quot } 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (16) 17.64/5.56 Obligation: 17.64/5.56 Complexity RNTS consisting of the following rules: 17.64/5.56 17.64/5.56 quot(z', z'', z1) -{ 1 }-> quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 0 :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 1 + quot(z', 1 + (z1 - 1), 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0 17.64/5.56 17.64/5.56 Function symbols to be analyzed: {quot} 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (17) ResultPropagationProof (UPPER BOUND(ID)) 17.64/5.56 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (18) 17.64/5.56 Obligation: 17.64/5.56 Complexity RNTS consisting of the following rules: 17.64/5.56 17.64/5.56 quot(z', z'', z1) -{ 1 }-> quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 0 :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 1 + quot(z', 1 + (z1 - 1), 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0 17.64/5.56 17.64/5.56 Function symbols to be analyzed: {quot} 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (19) IntTrsBoundProof (UPPER BOUND(ID)) 17.64/5.56 17.64/5.56 Computed SIZE bound using KoAT for: quot 17.64/5.56 after applying outer abstraction to obtain an ITS, 17.64/5.56 resulting in: O(n^1) with polynomial bound: 1 + z' 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (20) 17.64/5.56 Obligation: 17.64/5.56 Complexity RNTS consisting of the following rules: 17.64/5.56 17.64/5.56 quot(z', z'', z1) -{ 1 }-> quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 0 :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 1 + quot(z', 1 + (z1 - 1), 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0 17.64/5.56 17.64/5.56 Function symbols to be analyzed: {quot} 17.64/5.56 Previous analysis results are: 17.64/5.56 quot: runtime: ?, size: O(n^1) [1 + z'] 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (21) IntTrsBoundProof (UPPER BOUND(ID)) 17.64/5.56 17.64/5.56 Computed RUNTIME bound using KoAT for: quot 17.64/5.56 after applying outer abstraction to obtain an ITS, 17.64/5.56 resulting in: O(n^1) with polynomial bound: 2 + 2*z' 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (22) 17.64/5.56 Obligation: 17.64/5.56 Complexity RNTS consisting of the following rules: 17.64/5.56 17.64/5.56 quot(z', z'', z1) -{ 1 }-> quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 0 :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 17.64/5.56 quot(z', z'', z1) -{ 1 }-> 1 + quot(z', 1 + (z1 - 1), 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0 17.64/5.56 17.64/5.56 Function symbols to be analyzed: 17.64/5.56 Previous analysis results are: 17.64/5.56 quot: runtime: O(n^1) [2 + 2*z'], size: O(n^1) [1 + z'] 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (23) FinalProof (FINISHED) 17.64/5.56 Computed overall runtime complexity 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (24) 17.64/5.56 BOUNDS(1, n^1) 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (25) RenamingProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Renamed function symbols to avoid clashes with predefined symbol. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (26) 17.64/5.56 Obligation: 17.64/5.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 17.64/5.56 17.64/5.56 17.64/5.56 The TRS R consists of the following rules: 17.64/5.56 17.64/5.56 quot(0', s(y), s(z)) -> 0' 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) 17.64/5.56 quot(x, 0', s(z)) -> s(quot(x, s(z), s(z))) 17.64/5.56 17.64/5.56 S is empty. 17.64/5.56 Rewrite Strategy: FULL 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (27) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 17.64/5.56 Infered types. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (28) 17.64/5.56 Obligation: 17.64/5.56 TRS: 17.64/5.56 Rules: 17.64/5.56 quot(0', s(y), s(z)) -> 0' 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) 17.64/5.56 quot(x, 0', s(z)) -> s(quot(x, s(z), s(z))) 17.64/5.56 17.64/5.56 Types: 17.64/5.56 quot :: 0':s -> 0':s -> 0':s -> 0':s 17.64/5.56 0' :: 0':s 17.64/5.56 s :: 0':s -> 0':s 17.64/5.56 hole_0':s1_0 :: 0':s 17.64/5.56 gen_0':s2_0 :: Nat -> 0':s 17.64/5.56 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (29) OrderProof (LOWER BOUND(ID)) 17.64/5.56 Heuristically decided to analyse the following defined symbols: 17.64/5.56 quot 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (30) 17.64/5.56 Obligation: 17.64/5.56 TRS: 17.64/5.56 Rules: 17.64/5.56 quot(0', s(y), s(z)) -> 0' 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) 17.64/5.56 quot(x, 0', s(z)) -> s(quot(x, s(z), s(z))) 17.64/5.56 17.64/5.56 Types: 17.64/5.56 quot :: 0':s -> 0':s -> 0':s -> 0':s 17.64/5.56 0' :: 0':s 17.64/5.56 s :: 0':s -> 0':s 17.64/5.56 hole_0':s1_0 :: 0':s 17.64/5.56 gen_0':s2_0 :: Nat -> 0':s 17.64/5.56 17.64/5.56 17.64/5.56 Generator Equations: 17.64/5.56 gen_0':s2_0(0) <=> 0' 17.64/5.56 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 17.64/5.56 17.64/5.56 17.64/5.56 The following defined symbols remain to be analysed: 17.64/5.56 quot 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (31) RewriteLemmaProof (LOWER BOUND(ID)) 17.64/5.56 Proved the following rewrite lemma: 17.64/5.56 quot(gen_0':s2_0(n4_0), gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(1)) -> gen_0':s2_0(0), rt in Omega(1 + n4_0) 17.64/5.56 17.64/5.56 Induction Base: 17.64/5.56 quot(gen_0':s2_0(0), gen_0':s2_0(+(1, 0)), gen_0':s2_0(1)) ->_R^Omega(1) 17.64/5.56 0' 17.64/5.56 17.64/5.56 Induction Step: 17.64/5.56 quot(gen_0':s2_0(+(n4_0, 1)), gen_0':s2_0(+(1, +(n4_0, 1))), gen_0':s2_0(1)) ->_R^Omega(1) 17.64/5.56 quot(gen_0':s2_0(n4_0), gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(1)) ->_IH 17.64/5.56 gen_0':s2_0(0) 17.64/5.56 17.64/5.56 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (32) 17.64/5.56 Obligation: 17.64/5.56 Proved the lower bound n^1 for the following obligation: 17.64/5.56 17.64/5.56 TRS: 17.64/5.56 Rules: 17.64/5.56 quot(0', s(y), s(z)) -> 0' 17.64/5.56 quot(s(x), s(y), z) -> quot(x, y, z) 17.64/5.56 quot(x, 0', s(z)) -> s(quot(x, s(z), s(z))) 17.64/5.56 17.64/5.56 Types: 17.64/5.56 quot :: 0':s -> 0':s -> 0':s -> 0':s 17.64/5.56 0' :: 0':s 17.64/5.56 s :: 0':s -> 0':s 17.64/5.56 hole_0':s1_0 :: 0':s 17.64/5.56 gen_0':s2_0 :: Nat -> 0':s 17.64/5.56 17.64/5.56 17.64/5.56 Generator Equations: 17.64/5.56 gen_0':s2_0(0) <=> 0' 17.64/5.56 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 17.64/5.56 17.64/5.56 17.64/5.56 The following defined symbols remain to be analysed: 17.64/5.56 quot 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (33) LowerBoundPropagationProof (FINISHED) 17.64/5.56 Propagated lower bound. 17.64/5.56 ---------------------------------------- 17.64/5.56 17.64/5.56 (34) 17.64/5.56 BOUNDS(n^1, INF) 18.01/5.93 EOF