334.58/291.55 WORST_CASE(Omega(n^1), O(n^2)) 334.58/291.57 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 334.58/291.57 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 334.58/291.57 334.58/291.57 334.58/291.57 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 334.58/291.57 334.58/291.57 (0) CpxTRS 334.58/291.57 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 334.58/291.57 (2) CpxWeightedTrs 334.58/291.57 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 334.58/291.57 (4) CpxTypedWeightedTrs 334.58/291.57 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (6) CpxTypedWeightedCompleteTrs 334.58/291.57 (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] 334.58/291.57 (8) CpxTypedWeightedCompleteTrs 334.58/291.57 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (10) CpxRNTS 334.58/291.57 (11) SimplificationProof [BOTH BOUNDS(ID, ID), 5 ms] 334.58/291.57 (12) CpxRNTS 334.58/291.57 (13) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] 334.58/291.57 (14) CpxRNTS 334.58/291.57 (15) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (16) CpxRNTS 334.58/291.57 (17) IntTrsBoundProof [UPPER BOUND(ID), 416 ms] 334.58/291.57 (18) CpxRNTS 334.58/291.57 (19) IntTrsBoundProof [UPPER BOUND(ID), 179 ms] 334.58/291.57 (20) CpxRNTS 334.58/291.57 (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (22) CpxRNTS 334.58/291.57 (23) IntTrsBoundProof [UPPER BOUND(ID), 1912 ms] 334.58/291.57 (24) CpxRNTS 334.58/291.57 (25) IntTrsBoundProof [UPPER BOUND(ID), 554 ms] 334.58/291.57 (26) CpxRNTS 334.58/291.57 (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (28) CpxRNTS 334.58/291.57 (29) IntTrsBoundProof [UPPER BOUND(ID), 421 ms] 334.58/291.57 (30) CpxRNTS 334.58/291.57 (31) IntTrsBoundProof [UPPER BOUND(ID), 156 ms] 334.58/291.57 (32) CpxRNTS 334.58/291.57 (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (34) CpxRNTS 334.58/291.57 (35) IntTrsBoundProof [UPPER BOUND(ID), 196 ms] 334.58/291.57 (36) CpxRNTS 334.58/291.57 (37) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] 334.58/291.57 (38) CpxRNTS 334.58/291.57 (39) FinalProof [FINISHED, 0 ms] 334.58/291.57 (40) BOUNDS(1, n^2) 334.58/291.57 (41) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 334.58/291.57 (42) TRS for Loop Detection 334.58/291.57 (43) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 334.58/291.57 (44) BEST 334.58/291.57 (45) proven lower bound 334.58/291.57 (46) LowerBoundPropagationProof [FINISHED, 0 ms] 334.58/291.57 (47) BOUNDS(n^1, INF) 334.58/291.57 (48) TRS for Loop Detection 334.58/291.57 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (0) 334.58/291.57 Obligation: 334.58/291.57 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 334.58/291.57 334.58/291.57 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) 334.58/291.57 leq#2(0, x8) -> True 334.58/291.57 leq#2(S(x12), 0) -> False 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 334.58/291.57 main(x1) -> sort#2(x1) 334.58/291.57 334.58/291.57 S is empty. 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 334.58/291.57 Transformed relative TRS to weighted TRS 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (2) 334.58/291.57 Obligation: 334.58/291.57 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 334.58/291.57 334.58/291.57 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil [1] 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) [1] 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) [1] 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) [1] 334.58/291.57 leq#2(0, x8) -> True [1] 334.58/291.57 leq#2(S(x12), 0) -> False [1] 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) [1] 334.58/291.57 main(x1) -> sort#2(x1) [1] 334.58/291.57 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 334.58/291.57 Infered types. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (4) 334.58/291.57 Obligation: 334.58/291.57 Runtime Complexity Weighted TRS with Types. 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil [1] 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) [1] 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) [1] 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) [1] 334.58/291.57 leq#2(0, x8) -> True [1] 334.58/291.57 leq#2(S(x12), 0) -> False [1] 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) [1] 334.58/291.57 main(x1) -> sort#2(x1) [1] 334.58/291.57 334.58/291.57 The TRS has the following type information: 334.58/291.57 sort#2 :: Nil:Cons -> Nil:Cons 334.58/291.57 Nil :: Nil:Cons 334.58/291.57 Cons :: 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 insert#3 :: 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 cond_insert_ord_x_ys_1 :: True:False -> 0:S -> 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 True :: True:False 334.58/291.57 False :: True:False 334.58/291.57 leq#2 :: 0:S -> 0:S -> True:False 334.58/291.57 0 :: 0:S 334.58/291.57 S :: 0:S -> 0:S 334.58/291.57 main :: Nil:Cons -> Nil:Cons 334.58/291.57 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (5) CompletionProof (UPPER BOUND(ID)) 334.58/291.57 The transformation into a RNTS is sound, since: 334.58/291.57 334.58/291.57 (a) The obligation is a constructor system where every type has a constant constructor, 334.58/291.57 334.58/291.57 (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: 334.58/291.57 334.58/291.57 main_1 334.58/291.57 334.58/291.57 (c) The following functions are completely defined: 334.58/291.57 334.58/291.57 sort#2_1 334.58/291.57 leq#2_2 334.58/291.57 insert#3_2 334.58/291.57 cond_insert_ord_x_ys_1_4 334.58/291.57 334.58/291.57 Due to the following rules being added: 334.58/291.57 none 334.58/291.57 334.58/291.57 And the following fresh constants: none 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (6) 334.58/291.57 Obligation: 334.58/291.57 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 334.58/291.57 334.58/291.57 Runtime Complexity Weighted TRS with Types. 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil [1] 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) [1] 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) [1] 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) [1] 334.58/291.57 leq#2(0, x8) -> True [1] 334.58/291.57 leq#2(S(x12), 0) -> False [1] 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) [1] 334.58/291.57 main(x1) -> sort#2(x1) [1] 334.58/291.57 334.58/291.57 The TRS has the following type information: 334.58/291.57 sort#2 :: Nil:Cons -> Nil:Cons 334.58/291.57 Nil :: Nil:Cons 334.58/291.57 Cons :: 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 insert#3 :: 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 cond_insert_ord_x_ys_1 :: True:False -> 0:S -> 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 True :: True:False 334.58/291.57 False :: True:False 334.58/291.57 leq#2 :: 0:S -> 0:S -> True:False 334.58/291.57 0 :: 0:S 334.58/291.57 S :: 0:S -> 0:S 334.58/291.57 main :: Nil:Cons -> Nil:Cons 334.58/291.57 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (7) NarrowingProof (BOTH BOUNDS(ID, ID)) 334.58/291.57 Narrowed the inner basic terms of all right-hand sides by a single narrowing step. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (8) 334.58/291.57 Obligation: 334.58/291.57 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 334.58/291.57 334.58/291.57 Runtime Complexity Weighted TRS with Types. 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil [1] 334.58/291.57 sort#2(Cons(x4, Nil)) -> insert#3(x4, Nil) [2] 334.58/291.57 sort#2(Cons(x4, Cons(x4', x2'))) -> insert#3(x4, insert#3(x4', sort#2(x2'))) [2] 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) [1] 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) [1] 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) [1] 334.58/291.57 insert#3(0, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(True, 0, x4, x2) [2] 334.58/291.57 insert#3(S(x12'), Cons(0, x2)) -> cond_insert_ord_x_ys_1(False, S(x12'), 0, x2) [2] 334.58/291.57 insert#3(S(x4''), Cons(S(x2''), x2)) -> cond_insert_ord_x_ys_1(leq#2(x4'', x2''), S(x4''), S(x2''), x2) [2] 334.58/291.57 leq#2(0, x8) -> True [1] 334.58/291.57 leq#2(S(x12), 0) -> False [1] 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) [1] 334.58/291.57 main(x1) -> sort#2(x1) [1] 334.58/291.57 334.58/291.57 The TRS has the following type information: 334.58/291.57 sort#2 :: Nil:Cons -> Nil:Cons 334.58/291.57 Nil :: Nil:Cons 334.58/291.57 Cons :: 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 insert#3 :: 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 cond_insert_ord_x_ys_1 :: True:False -> 0:S -> 0:S -> Nil:Cons -> Nil:Cons 334.58/291.57 True :: True:False 334.58/291.57 False :: True:False 334.58/291.57 leq#2 :: 0:S -> 0:S -> True:False 334.58/291.57 0 :: 0:S 334.58/291.57 S :: 0:S -> 0:S 334.58/291.57 main :: Nil:Cons -> Nil:Cons 334.58/291.57 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 334.58/291.57 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 334.58/291.57 The constant constructors are abstracted as follows: 334.58/291.57 334.58/291.57 Nil => 0 334.58/291.57 True => 1 334.58/291.57 False => 0 334.58/291.57 0 => 0 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (10) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + x2 + insert#3(x3, x1) :|: x1 >= 0, z' = x3, z1 = x1, z = 0, z'' = x2, x3 >= 0, x2 >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + x3 + (1 + x2 + x1) :|: x1 >= 0, z = 1, z' = x3, z1 = x1, z'' = x2, x3 >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(leq#2(x4'', x2''), 1 + x4'', 1 + x2'', x2) :|: x4'' >= 0, z = 1 + x4'', z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + x12', 0, x2) :|: z = 1 + x12', z' = 1 + 0 + x2, x12' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + x2 + 0 :|: z = x2, x2 >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> leq#2(x4, x2) :|: x4 >= 0, z' = 1 + x2, z = 1 + x4, x2 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: x8 >= 0, z = 0, z' = x8 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z = 1 + x12, x12 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(x1) :|: x1 >= 0, z = x1 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, 0) :|: z = 1 + x4 + 0, x4 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (11) SimplificationProof (BOTH BOUNDS(ID, ID)) 334.58/291.57 Simplified the RNTS by moving equalities from the constraints into the right-hand sides. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (12) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(leq#2(z - 1, x2''), 1 + (z - 1), 1 + x2'', x2) :|: z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> leq#2(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) 334.58/291.57 Found the following analysis order by SCC decomposition: 334.58/291.57 334.58/291.57 { leq#2 } 334.58/291.57 { cond_insert_ord_x_ys_1, insert#3 } 334.58/291.57 { sort#2 } 334.58/291.57 { main } 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (14) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(leq#2(z - 1, x2''), 1 + (z - 1), 1 + x2'', x2) :|: z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> leq#2(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {leq#2}, {cond_insert_ord_x_ys_1,insert#3}, {sort#2}, {main} 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (15) ResultPropagationProof (UPPER BOUND(ID)) 334.58/291.57 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (16) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(leq#2(z - 1, x2''), 1 + (z - 1), 1 + x2'', x2) :|: z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> leq#2(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {leq#2}, {cond_insert_ord_x_ys_1,insert#3}, {sort#2}, {main} 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (17) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed SIZE bound using CoFloCo for: leq#2 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(1) with polynomial bound: 1 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (18) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(leq#2(z - 1, x2''), 1 + (z - 1), 1 + x2'', x2) :|: z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> leq#2(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {leq#2}, {cond_insert_ord_x_ys_1,insert#3}, {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: ?, size: O(1) [1] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (19) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed RUNTIME bound using KoAT for: leq#2 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: 2 + z' 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (20) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(leq#2(z - 1, x2''), 1 + (z - 1), 1 + x2'', x2) :|: z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> leq#2(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {cond_insert_ord_x_ys_1,insert#3}, {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (21) ResultPropagationProof (UPPER BOUND(ID)) 334.58/291.57 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (22) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 4 + x2'' }-> cond_insert_ord_x_ys_1(s, 1 + (z - 1), 1 + x2'', x2) :|: s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {cond_insert_ord_x_ys_1,insert#3}, {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (23) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed SIZE bound using CoFloCo for: cond_insert_ord_x_ys_1 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: 2 + z' + z'' + z1 334.58/291.57 334.58/291.57 Computed SIZE bound using CoFloCo for: insert#3 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: 1 + z + z' 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (24) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 4 + x2'' }-> cond_insert_ord_x_ys_1(s, 1 + (z - 1), 1 + x2'', x2) :|: s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {cond_insert_ord_x_ys_1,insert#3}, {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: ?, size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: ?, size: O(n^1) [1 + z + z'] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (25) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed RUNTIME bound using CoFloCo for: cond_insert_ord_x_ys_1 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: 4 + 7*z1 334.58/291.57 334.58/291.57 Computed RUNTIME bound using CoFloCo for: insert#3 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: 6 + 7*z' 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (26) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z'' + insert#3(z', z1) :|: z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 4 + x2'' }-> cond_insert_ord_x_ys_1(s, 1 + (z - 1), 1 + x2'', x2) :|: s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(1, 0, x4, x2) :|: x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 2 }-> cond_insert_ord_x_ys_1(0, 1 + (z - 1), 0, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(z - 1, 0) :|: z - 1 >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (27) ResultPropagationProof (UPPER BOUND(ID)) 334.58/291.57 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (28) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 7 + 7*z1 }-> 1 + z'' + s1 :|: s1 >= 0, s1 <= z' + z1 + 1, z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 6 + 7*x2 }-> s2 :|: s2 >= 0, s2 <= 0 + x4 + x2 + 2, x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ -1 + 7*z' }-> s3 :|: s3 >= 0, s3 <= 1 + (z - 1) + 0 + (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 8 + 7*x2 + x2'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + (1 + x2'') + x2 + 2, s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 8 }-> s'' :|: s'' >= 0, s'' <= z - 1 + 0 + 1, z - 1 >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (29) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed SIZE bound using CoFloCo for: sort#2 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: z 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (30) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 7 + 7*z1 }-> 1 + z'' + s1 :|: s1 >= 0, s1 <= z' + z1 + 1, z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 6 + 7*x2 }-> s2 :|: s2 >= 0, s2 <= 0 + x4 + x2 + 2, x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ -1 + 7*z' }-> s3 :|: s3 >= 0, s3 <= 1 + (z - 1) + 0 + (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 8 + 7*x2 + x2'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + (1 + x2'') + x2 + 2, s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 8 }-> s'' :|: s'' >= 0, s'' <= z - 1 + 0 + 1, z - 1 >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {sort#2}, {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 sort#2: runtime: ?, size: O(n^1) [z] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (31) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed RUNTIME bound using CoFloCo for: sort#2 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^2) with polynomial bound: 15 + 21*z + 14*z^2 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (32) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 7 + 7*z1 }-> 1 + z'' + s1 :|: s1 >= 0, s1 <= z' + z1 + 1, z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 6 + 7*x2 }-> s2 :|: s2 >= 0, s2 <= 0 + x4 + x2 + 2, x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ -1 + 7*z' }-> s3 :|: s3 >= 0, s3 <= 1 + (z - 1) + 0 + (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 8 + 7*x2 + x2'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + (1 + x2'') + x2 + 2, s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 1 }-> sort#2(z) :|: z >= 0 334.58/291.57 sort#2(z) -{ 8 }-> s'' :|: s'' >= 0, s'' <= z - 1 + 0 + 1, z - 1 >= 0 334.58/291.57 sort#2(z) -{ 2 }-> insert#3(x4, insert#3(x4', sort#2(x2'))) :|: z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 sort#2: runtime: O(n^2) [15 + 21*z + 14*z^2], size: O(n^1) [z] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (33) ResultPropagationProof (UPPER BOUND(ID)) 334.58/291.57 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (34) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 7 + 7*z1 }-> 1 + z'' + s1 :|: s1 >= 0, s1 <= z' + z1 + 1, z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 6 + 7*x2 }-> s2 :|: s2 >= 0, s2 <= 0 + x4 + x2 + 2, x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ -1 + 7*z' }-> s3 :|: s3 >= 0, s3 <= 1 + (z - 1) + 0 + (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 8 + 7*x2 + x2'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + (1 + x2'') + x2 + 2, s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 16 + 21*z + 14*z^2 }-> s8 :|: s8 >= 0, s8 <= z, z >= 0 334.58/291.57 sort#2(z) -{ 8 }-> s'' :|: s'' >= 0, s'' <= z - 1 + 0 + 1, z - 1 >= 0 334.58/291.57 sort#2(z) -{ 29 + 7*s5 + 7*s6 + 21*x2' + 14*x2'^2 }-> s7 :|: s5 >= 0, s5 <= x2', s6 >= 0, s6 <= x4' + s5 + 1, s7 >= 0, s7 <= x4 + s6 + 1, z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 sort#2: runtime: O(n^2) [15 + 21*z + 14*z^2], size: O(n^1) [z] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (35) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed SIZE bound using CoFloCo for: main 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^1) with polynomial bound: z 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (36) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 7 + 7*z1 }-> 1 + z'' + s1 :|: s1 >= 0, s1 <= z' + z1 + 1, z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 6 + 7*x2 }-> s2 :|: s2 >= 0, s2 <= 0 + x4 + x2 + 2, x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ -1 + 7*z' }-> s3 :|: s3 >= 0, s3 <= 1 + (z - 1) + 0 + (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 8 + 7*x2 + x2'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + (1 + x2'') + x2 + 2, s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 16 + 21*z + 14*z^2 }-> s8 :|: s8 >= 0, s8 <= z, z >= 0 334.58/291.57 sort#2(z) -{ 8 }-> s'' :|: s'' >= 0, s'' <= z - 1 + 0 + 1, z - 1 >= 0 334.58/291.57 sort#2(z) -{ 29 + 7*s5 + 7*s6 + 21*x2' + 14*x2'^2 }-> s7 :|: s5 >= 0, s5 <= x2', s6 >= 0, s6 <= x4' + s5 + 1, s7 >= 0, s7 <= x4 + s6 + 1, z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: {main} 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 sort#2: runtime: O(n^2) [15 + 21*z + 14*z^2], size: O(n^1) [z] 334.58/291.57 main: runtime: ?, size: O(n^1) [z] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (37) IntTrsBoundProof (UPPER BOUND(ID)) 334.58/291.57 334.58/291.57 Computed RUNTIME bound using KoAT for: main 334.58/291.57 after applying outer abstraction to obtain an ITS, 334.58/291.57 resulting in: O(n^2) with polynomial bound: 16 + 21*z + 14*z^2 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (38) 334.58/291.57 Obligation: 334.58/291.57 Complexity RNTS consisting of the following rules: 334.58/291.57 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 1 }-> 1 + z' + (1 + z'' + z1) :|: z1 >= 0, z = 1, z' >= 0, z'' >= 0 334.58/291.57 cond_insert_ord_x_ys_1(z, z', z'', z1) -{ 7 + 7*z1 }-> 1 + z'' + s1 :|: s1 >= 0, s1 <= z' + z1 + 1, z1 >= 0, z = 0, z' >= 0, z'' >= 0 334.58/291.57 insert#3(z, z') -{ 6 + 7*x2 }-> s2 :|: s2 >= 0, s2 <= 0 + x4 + x2 + 2, x4 >= 0, z' = 1 + x4 + x2, z = 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ -1 + 7*z' }-> s3 :|: s3 >= 0, s3 <= 1 + (z - 1) + 0 + (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 insert#3(z, z') -{ 8 + 7*x2 + x2'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + (1 + x2'') + x2 + 2, s >= 0, s <= 1, z - 1 >= 0, z' = 1 + (1 + x2'') + x2, x2'' >= 0, x2 >= 0 334.58/291.57 insert#3(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 334.58/291.57 leq#2(z, z') -{ 2 + z' }-> s' :|: s' >= 0, s' <= 1, z - 1 >= 0, z' - 1 >= 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 334.58/291.57 leq#2(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 334.58/291.57 main(z) -{ 16 + 21*z + 14*z^2 }-> s8 :|: s8 >= 0, s8 <= z, z >= 0 334.58/291.57 sort#2(z) -{ 8 }-> s'' :|: s'' >= 0, s'' <= z - 1 + 0 + 1, z - 1 >= 0 334.58/291.57 sort#2(z) -{ 29 + 7*s5 + 7*s6 + 21*x2' + 14*x2'^2 }-> s7 :|: s5 >= 0, s5 <= x2', s6 >= 0, s6 <= x4' + s5 + 1, s7 >= 0, s7 <= x4 + s6 + 1, z = 1 + x4 + (1 + x4' + x2'), x2' >= 0, x4 >= 0, x4' >= 0 334.58/291.57 sort#2(z) -{ 1 }-> 0 :|: z = 0 334.58/291.57 334.58/291.57 Function symbols to be analyzed: 334.58/291.57 Previous analysis results are: 334.58/291.57 leq#2: runtime: O(n^1) [2 + z'], size: O(1) [1] 334.58/291.57 cond_insert_ord_x_ys_1: runtime: O(n^1) [4 + 7*z1], size: O(n^1) [2 + z' + z'' + z1] 334.58/291.57 insert#3: runtime: O(n^1) [6 + 7*z'], size: O(n^1) [1 + z + z'] 334.58/291.57 sort#2: runtime: O(n^2) [15 + 21*z + 14*z^2], size: O(n^1) [z] 334.58/291.57 main: runtime: O(n^2) [16 + 21*z + 14*z^2], size: O(n^1) [z] 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (39) FinalProof (FINISHED) 334.58/291.57 Computed overall runtime complexity 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (40) 334.58/291.57 BOUNDS(1, n^2) 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (41) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 334.58/291.57 Transformed a relative TRS into a decreasing-loop problem. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (42) 334.58/291.57 Obligation: 334.58/291.57 Analyzing the following TRS for decreasing loops: 334.58/291.57 334.58/291.57 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 334.58/291.57 334.58/291.57 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) 334.58/291.57 leq#2(0, x8) -> True 334.58/291.57 leq#2(S(x12), 0) -> False 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 334.58/291.57 main(x1) -> sort#2(x1) 334.58/291.57 334.58/291.57 S is empty. 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (43) DecreasingLoopProof (LOWER BOUND(ID)) 334.58/291.57 The following loop(s) give(s) rise to the lower bound Omega(n^1): 334.58/291.57 334.58/291.57 The rewrite sequence 334.58/291.57 334.58/291.57 sort#2(Cons(x4, x2)) ->^+ insert#3(x4, sort#2(x2)) 334.58/291.57 334.58/291.57 gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. 334.58/291.57 334.58/291.57 The pumping substitution is [x2 / Cons(x4, x2)]. 334.58/291.57 334.58/291.57 The result substitution is [ ]. 334.58/291.57 334.58/291.57 334.58/291.57 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (44) 334.58/291.57 Complex Obligation (BEST) 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (45) 334.58/291.57 Obligation: 334.58/291.57 Proved the lower bound n^1 for the following obligation: 334.58/291.57 334.58/291.57 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 334.58/291.57 334.58/291.57 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) 334.58/291.57 leq#2(0, x8) -> True 334.58/291.57 leq#2(S(x12), 0) -> False 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 334.58/291.57 main(x1) -> sort#2(x1) 334.58/291.57 334.58/291.57 S is empty. 334.58/291.57 Rewrite Strategy: INNERMOST 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (46) LowerBoundPropagationProof (FINISHED) 334.58/291.57 Propagated lower bound. 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (47) 334.58/291.57 BOUNDS(n^1, INF) 334.58/291.57 334.58/291.57 ---------------------------------------- 334.58/291.57 334.58/291.57 (48) 334.58/291.57 Obligation: 334.58/291.57 Analyzing the following TRS for decreasing loops: 334.58/291.57 334.58/291.57 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 334.58/291.57 334.58/291.57 334.58/291.57 The TRS R consists of the following rules: 334.58/291.57 334.58/291.57 sort#2(Nil) -> Nil 334.58/291.57 sort#2(Cons(x4, x2)) -> insert#3(x4, sort#2(x2)) 334.58/291.57 cond_insert_ord_x_ys_1(True, x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 334.58/291.57 cond_insert_ord_x_ys_1(False, x3, x2, x1) -> Cons(x2, insert#3(x3, x1)) 334.58/291.57 insert#3(x2, Nil) -> Cons(x2, Nil) 334.58/291.57 insert#3(x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) 334.58/291.57 leq#2(0, x8) -> True 334.58/291.57 leq#2(S(x12), 0) -> False 334.58/291.57 leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 334.58/291.57 main(x1) -> sort#2(x1) 334.58/291.57 334.58/291.57 S is empty. 334.58/291.57 Rewrite Strategy: INNERMOST 334.74/291.61 EOF