WORST_CASE(?,O(n^1)) proof of input_79PHWvH8SM.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxWeightedTrs (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTypedWeightedTrs (15) CompletionProof [UPPER BOUND(ID), 0 ms] (16) CpxTypedWeightedCompleteTrs (17) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (18) CpxRNTS (19) CompleteCoflocoProof [FINISHED, 1007 ms] (20) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: cond(true, x, y) -> cond(and(gr(x, 0), gr(y, 0)), p(x), p(y)) and(true, true) -> true and(x, false) -> false and(false, x) -> false gr(0, 0) -> false gr(0, x) -> false gr(s(x), 0) -> true gr(s(x), s(y)) -> gr(x, y) p(0) -> 0 p(s(x)) -> x S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: cond(true, z0, z1) -> cond(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)) and(true, true) -> true and(z0, false) -> false and(false, z0) -> false gr(0, 0) -> false gr(0, z0) -> false gr(s(z0), 0) -> true gr(s(z0), s(z1)) -> gr(z0, z1) p(0) -> 0 p(s(z0)) -> z0 Tuples: COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z0, 0)) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z1, 0)) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z0)) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z1)) AND(true, true) -> c4 AND(z0, false) -> c5 AND(false, z0) -> c6 GR(0, 0) -> c7 GR(0, z0) -> c8 GR(s(z0), 0) -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) P(0) -> c11 P(s(z0)) -> c12 S tuples: COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z0, 0)) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z1, 0)) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z0)) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z1)) AND(true, true) -> c4 AND(z0, false) -> c5 AND(false, z0) -> c6 GR(0, 0) -> c7 GR(0, z0) -> c8 GR(s(z0), 0) -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) P(0) -> c11 P(s(z0)) -> c12 K tuples:none Defined Rule Symbols: cond_3, and_2, gr_2, p_1 Defined Pair Symbols: COND_3, AND_2, GR_2, P_1 Compound Symbols: c_3, c1_3, c2_2, c3_2, c4, c5, c6, c7, c8, c9, c10_1, c11, c12 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 8 trailing nodes: AND(z0, false) -> c5 P(0) -> c11 P(s(z0)) -> c12 AND(false, z0) -> c6 AND(true, true) -> c4 GR(s(z0), 0) -> c9 GR(0, z0) -> c8 GR(0, 0) -> c7 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: cond(true, z0, z1) -> cond(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)) and(true, true) -> true and(z0, false) -> false and(false, z0) -> false gr(0, 0) -> false gr(0, z0) -> false gr(s(z0), 0) -> true gr(s(z0), s(z1)) -> gr(z0, z1) p(0) -> 0 p(s(z0)) -> z0 Tuples: COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z0, 0)) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z1, 0)) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z0)) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z1)) GR(s(z0), s(z1)) -> c10(GR(z0, z1)) S tuples: COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z0, 0)) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), AND(gr(z0, 0), gr(z1, 0)), GR(z1, 0)) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z0)) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)), P(z1)) GR(s(z0), s(z1)) -> c10(GR(z0, z1)) K tuples:none Defined Rule Symbols: cond_3, and_2, gr_2, p_1 Defined Pair Symbols: COND_3, GR_2 Compound Symbols: c_3, c1_3, c2_2, c3_2, c10_1 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: cond(true, z0, z1) -> cond(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)) and(true, true) -> true and(z0, false) -> false and(false, z0) -> false gr(0, 0) -> false gr(0, z0) -> false gr(s(z0), 0) -> true gr(s(z0), s(z1)) -> gr(z0, z1) p(0) -> 0 p(s(z0)) -> z0 Tuples: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) S tuples: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) K tuples:none Defined Rule Symbols: cond_3, and_2, gr_2, p_1 Defined Pair Symbols: GR_2, COND_3 Compound Symbols: c10_1, c_1, c1_1, c2_1, c3_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: cond(true, z0, z1) -> cond(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)) gr(s(z0), s(z1)) -> gr(z0, z1) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: and(true, true) -> true and(z0, false) -> false and(false, z0) -> false gr(0, 0) -> false gr(0, z0) -> false gr(s(z0), 0) -> true p(0) -> 0 p(s(z0)) -> z0 Tuples: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) S tuples: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) K tuples:none Defined Rule Symbols: and_2, gr_2, p_1 Defined Pair Symbols: GR_2, COND_3 Compound Symbols: c10_1, c_1, c1_1, c2_1, c3_1 ---------------------------------------- (9) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) The (relative) TRS S consists of the following rules: and(true, true) -> true and(z0, false) -> false and(false, z0) -> false gr(0, 0) -> false gr(0, z0) -> false gr(s(z0), 0) -> true p(0) -> 0 p(s(z0)) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (11) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) [1] COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] and(true, true) -> true [0] and(z0, false) -> false [0] and(false, z0) -> false [0] gr(0, 0) -> false [0] gr(0, z0) -> false [0] gr(s(z0), 0) -> true [0] p(0) -> 0 [0] p(s(z0)) -> z0 [0] Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) [1] COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] and(true, true) -> true [0] and(z0, false) -> false [0] and(false, z0) -> false [0] gr(0, 0) -> false [0] gr(0, z0) -> false [0] gr(s(z0), 0) -> true [0] p(0) -> 0 [0] p(s(z0)) -> z0 [0] The TRS has the following type information: GR :: s:0 -> s:0 -> c10 s :: s:0 -> s:0 c10 :: c10 -> c10 COND :: true:false -> s:0 -> s:0 -> c:c1:c2:c3 true :: true:false c :: c:c1:c2:c3 -> c:c1:c2:c3 and :: true:false -> true:false -> true:false gr :: s:0 -> s:0 -> true:false 0 :: s:0 p :: s:0 -> s:0 c1 :: c:c1:c2:c3 -> c:c1:c2:c3 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 false :: true:false Rewrite Strategy: INNERMOST ---------------------------------------- (15) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: and(v0, v1) -> null_and [0] gr(v0, v1) -> null_gr [0] p(v0) -> null_p [0] GR(v0, v1) -> null_GR [0] COND(v0, v1, v2) -> null_COND [0] And the following fresh constants: null_and, null_gr, null_p, null_GR, null_COND ---------------------------------------- (16) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: GR(s(z0), s(z1)) -> c10(GR(z0, z1)) [1] COND(true, z0, z1) -> c(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c1(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c2(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] COND(true, z0, z1) -> c3(COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1))) [1] and(true, true) -> true [0] and(z0, false) -> false [0] and(false, z0) -> false [0] gr(0, 0) -> false [0] gr(0, z0) -> false [0] gr(s(z0), 0) -> true [0] p(0) -> 0 [0] p(s(z0)) -> z0 [0] and(v0, v1) -> null_and [0] gr(v0, v1) -> null_gr [0] p(v0) -> null_p [0] GR(v0, v1) -> null_GR [0] COND(v0, v1, v2) -> null_COND [0] The TRS has the following type information: GR :: s:0:null_p -> s:0:null_p -> c10:null_GR s :: s:0:null_p -> s:0:null_p c10 :: c10:null_GR -> c10:null_GR COND :: true:false:null_and:null_gr -> s:0:null_p -> s:0:null_p -> c:c1:c2:c3:null_COND true :: true:false:null_and:null_gr c :: c:c1:c2:c3:null_COND -> c:c1:c2:c3:null_COND and :: true:false:null_and:null_gr -> true:false:null_and:null_gr -> true:false:null_and:null_gr gr :: s:0:null_p -> s:0:null_p -> true:false:null_and:null_gr 0 :: s:0:null_p p :: s:0:null_p -> s:0:null_p c1 :: c:c1:c2:c3:null_COND -> c:c1:c2:c3:null_COND c2 :: c:c1:c2:c3:null_COND -> c:c1:c2:c3:null_COND c3 :: c:c1:c2:c3:null_COND -> c:c1:c2:c3:null_COND false :: true:false:null_and:null_gr null_and :: true:false:null_and:null_gr null_gr :: true:false:null_and:null_gr null_p :: s:0:null_p null_GR :: c10:null_GR null_COND :: c:c1:c2:c3:null_COND Rewrite Strategy: INNERMOST ---------------------------------------- (17) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: true => 2 0 => 0 false => 1 null_and => 0 null_gr => 0 null_p => 0 null_GR => 0 null_COND => 0 ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: COND(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 COND(z, z', z'') -{ 1 }-> 1 + COND(and(gr(z0, 0), gr(z1, 0)), p(z0), p(z1)) :|: z = 2, z1 >= 0, z0 >= 0, z' = z0, z'' = z1 GR(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 GR(z, z') -{ 1 }-> 1 + GR(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 and(z, z') -{ 0 }-> 2 :|: z = 2, z' = 2 and(z, z') -{ 0 }-> 1 :|: z = z0, z0 >= 0, z' = 1 and(z, z') -{ 0 }-> 1 :|: z = 1, z0 >= 0, z' = z0 and(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 gr(z, z') -{ 0 }-> 2 :|: z = 1 + z0, z0 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z = 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z0 >= 0, z = 0, z' = z0 gr(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 p(z) -{ 0 }-> z0 :|: z = 1 + z0, z0 >= 0 p(z) -{ 0 }-> 0 :|: z = 0 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (19) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V4),0,[fun(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V4),0,[fun1(V1, V, V4, Out)],[V1 >= 0,V >= 0,V4 >= 0]). eq(start(V1, V, V4),0,[and(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V4),0,[gr(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V4),0,[p(V1, Out)],[V1 >= 0]). eq(fun(V1, V, Out),1,[fun(V3, V2, Ret1)],[Out = 1 + Ret1,V2 >= 0,V1 = 1 + V3,V3 >= 0,V = 1 + V2]). eq(fun1(V1, V, V4, Out),1,[gr(V6, 0, Ret100),gr(V5, 0, Ret101),and(Ret100, Ret101, Ret10),p(V6, Ret11),p(V5, Ret12),fun1(Ret10, Ret11, Ret12, Ret13)],[Out = 1 + Ret13,V1 = 2,V5 >= 0,V6 >= 0,V = V6,V4 = V5]). eq(and(V1, V, Out),0,[],[Out = 2,V1 = 2,V = 2]). eq(and(V1, V, Out),0,[],[Out = 1,V1 = V7,V7 >= 0,V = 1]). eq(and(V1, V, Out),0,[],[Out = 1,V1 = 1,V8 >= 0,V = V8]). eq(gr(V1, V, Out),0,[],[Out = 1,V1 = 0,V = 0]). eq(gr(V1, V, Out),0,[],[Out = 1,V9 >= 0,V1 = 0,V = V9]). eq(gr(V1, V, Out),0,[],[Out = 2,V1 = 1 + V10,V10 >= 0,V = 0]). eq(p(V1, Out),0,[],[Out = 0,V1 = 0]). eq(p(V1, Out),0,[],[Out = V11,V1 = 1 + V11,V11 >= 0]). eq(and(V1, V, Out),0,[],[Out = 0,V13 >= 0,V12 >= 0,V1 = V13,V = V12]). eq(gr(V1, V, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V1 = V15,V = V14]). eq(p(V1, Out),0,[],[Out = 0,V16 >= 0,V1 = V16]). eq(fun(V1, V, Out),0,[],[Out = 0,V17 >= 0,V18 >= 0,V1 = V17,V = V18]). eq(fun1(V1, V, V4, Out),0,[],[Out = 0,V19 >= 0,V4 = V21,V20 >= 0,V1 = V19,V = V20,V21 >= 0]). input_output_vars(fun(V1,V,Out),[V1,V],[Out]). input_output_vars(fun1(V1,V,V4,Out),[V1,V,V4],[Out]). input_output_vars(and(V1,V,Out),[V1,V],[Out]). input_output_vars(gr(V1,V,Out),[V1,V],[Out]). input_output_vars(p(V1,Out),[V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [and/3] 1. recursive : [fun/3] 2. non_recursive : [gr/3] 3. non_recursive : [p/2] 4. recursive : [fun1/4] 5. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into and/3 1. SCC is partially evaluated into fun/3 2. SCC is partially evaluated into gr/3 3. SCC is partially evaluated into p/2 4. SCC is partially evaluated into fun1/4 5. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations and/3 * CE 13 is refined into CE [19] * CE 11 is refined into CE [20] * CE 10 is refined into CE [21] * CE 12 is refined into CE [22] ### Cost equations --> "Loop" of and/3 * CEs [19] --> Loop 15 * CEs [20] --> Loop 16 * CEs [21] --> Loop 17 * CEs [22] --> Loop 18 ### Ranking functions of CR and(V1,V,Out) #### Partial ranking functions of CR and(V1,V,Out) ### Specialization of cost equations fun/3 * CE 7 is refined into CE [23] * CE 6 is refined into CE [24] ### Cost equations --> "Loop" of fun/3 * CEs [24] --> Loop 19 * CEs [23] --> Loop 20 ### Ranking functions of CR fun(V1,V,Out) * RF of phase [19]: [V,V1] #### Partial ranking functions of CR fun(V1,V,Out) * Partial RF of phase [19]: - RF of loop [19:1]: V V1 ### Specialization of cost equations gr/3 * CE 16 is refined into CE [25] * CE 15 is refined into CE [26] * CE 14 is refined into CE [27] ### Cost equations --> "Loop" of gr/3 * CEs [25] --> Loop 21 * CEs [26] --> Loop 22 * CEs [27] --> Loop 23 ### Ranking functions of CR gr(V1,V,Out) #### Partial ranking functions of CR gr(V1,V,Out) ### Specialization of cost equations p/2 * CE 18 is refined into CE [28] * CE 17 is refined into CE [29] ### Cost equations --> "Loop" of p/2 * CEs [28] --> Loop 24 * CEs [29] --> Loop 25 ### Ranking functions of CR p(V1,Out) #### Partial ranking functions of CR p(V1,Out) ### Specialization of cost equations fun1/4 * CE 9 is refined into CE [30] * CE 8 is refined into CE [31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69] ### Cost equations --> "Loop" of fun1/4 * CEs [49] --> Loop 26 * CEs [48] --> Loop 27 * CEs [47] --> Loop 28 * CEs [46] --> Loop 29 * CEs [53,57,65,69] --> Loop 30 * CEs [43,59] --> Loop 31 * CEs [42,58] --> Loop 32 * CEs [45,52,56,61,64,68] --> Loop 33 * CEs [44,60] --> Loop 34 * CEs [35,39] --> Loop 35 * CEs [37,41,51,55,63,67] --> Loop 36 * CEs [31,32,34,38] --> Loop 37 * CEs [33,36,40,50,54,62,66] --> Loop 38 * CEs [30] --> Loop 39 ### Ranking functions of CR fun1(V1,V,V4,Out) * RF of phase [26]: [V,V4] #### Partial ranking functions of CR fun1(V1,V,V4,Out) * Partial RF of phase [26]: - RF of loop [26:1]: V V4 ### Specialization of cost equations start/3 * CE 1 is refined into CE [70,71] * CE 2 is refined into CE [72,73,74,75,76,77,78] * CE 3 is refined into CE [79,80,81,82] * CE 4 is refined into CE [83,84,85] * CE 5 is refined into CE [86,87] ### Cost equations --> "Loop" of start/3 * CEs [81] --> Loop 40 * CEs [84] --> Loop 41 * CEs [72,73,74,75,76,77] --> Loop 42 * CEs [80] --> Loop 43 * CEs [79] --> Loop 44 * CEs [70,71,78,82,83,85,86,87] --> Loop 45 ### Ranking functions of CR start(V1,V,V4) #### Partial ranking functions of CR start(V1,V,V4) Computing Bounds ===================================== #### Cost of chains of and(V1,V,Out): * Chain [18]: 0 with precondition: [V1=1,Out=1,V>=0] * Chain [17]: 0 with precondition: [V1=2,V=2,Out=2] * Chain [16]: 0 with precondition: [V=1,Out=1,V1>=0] * Chain [15]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of fun(V1,V,Out): * Chain [[19],20]: 1*it(19)+0 Such that:it(19) =< Out with precondition: [Out>=1,V1>=Out,V>=Out] * Chain [20]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of gr(V1,V,Out): * Chain [23]: 0 with precondition: [V1=0,Out=1,V>=0] * Chain [22]: 0 with precondition: [V=0,Out=2,V1>=1] * Chain [21]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of p(V1,Out): * Chain [25]: 0 with precondition: [Out=0,V1>=0] * Chain [24]: 0 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of fun1(V1,V,V4,Out): * Chain [[26],39]: 1*it(26)+0 Such that:it(26) =< Out with precondition: [V1=2,Out>=1,V>=Out,V4>=Out] * Chain [[26],38,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V+1>=Out,V4+1>=Out] * Chain [[26],37,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,V+1=Out,V>=1,V4>=V] * Chain [[26],36,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V+1>=Out,V4>=Out] * Chain [[26],35,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,V+1=Out,V>=1,V4>=V+1] * Chain [[26],34,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,V4+1=Out,V4>=1,V>=V4] * Chain [[26],33,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V>=Out,V4+1>=Out] * Chain [[26],32,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,V4+1=Out,V4>=1,V>=V4] * Chain [[26],31,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,V4+1=Out,V4>=1,V>=V4+1] * Chain [[26],30,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V>=Out,V4>=Out] * Chain [[26],29,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V>=Out,V4>=Out] * Chain [[26],29,38,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],29,37,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],29,34,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],29,32,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],28,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V>=Out,V4>=Out] * Chain [[26],28,38,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],28,37,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],28,36,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4>=Out] * Chain [[26],28,35,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4>=Out] * Chain [[26],28,34,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,V4+1=Out,V4>=2,V>=V4] * Chain [[26],28,32,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,V4+1=Out,V4>=2,V>=V4] * Chain [[26],27,39]: 1*it(26)+1 Such that:it(26) =< Out with precondition: [V1=2,Out>=2,V>=Out,V4>=Out] * Chain [[26],27,38,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],27,37,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,V+1=Out,V>=2,V4>=V] * Chain [[26],27,34,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],27,33,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V>=Out,V4+1>=Out] * Chain [[26],27,32,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V+1>=Out,V4+1>=Out] * Chain [[26],27,31,39]: 1*it(26)+2 Such that:it(26) =< Out with precondition: [V1=2,Out>=3,V>=Out,V4+1>=Out] * Chain [39]: 0 with precondition: [Out=0,V1>=0,V>=0,V4>=0] * Chain [38,39]: 1 with precondition: [V1=2,Out=1,V>=0,V4>=0] * Chain [37,39]: 1 with precondition: [V1=2,V=0,Out=1,V4>=0] * Chain [36,39]: 1 with precondition: [V1=2,Out=1,V>=0,V4>=1] * Chain [35,39]: 1 with precondition: [V1=2,V=0,Out=1,V4>=1] * Chain [34,39]: 1 with precondition: [V1=2,V4=0,Out=1,V>=0] * Chain [33,39]: 1 with precondition: [V1=2,Out=1,V>=1,V4>=0] * Chain [32,39]: 1 with precondition: [V1=2,V4=0,Out=1,V>=0] * Chain [31,39]: 1 with precondition: [V1=2,V4=0,Out=1,V>=1] * Chain [30,39]: 1 with precondition: [V1=2,Out=1,V>=1,V4>=1] * Chain [29,39]: 1 with precondition: [V1=2,Out=1,V>=1,V4>=1] * Chain [29,38,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [29,37,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [29,34,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [29,32,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [28,39]: 1 with precondition: [V1=2,Out=1,V>=1,V4>=1] * Chain [28,38,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [28,37,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [28,36,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=2] * Chain [28,35,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=2] * Chain [28,34,39]: 2 with precondition: [V1=2,V4=1,Out=2,V>=1] * Chain [28,32,39]: 2 with precondition: [V1=2,V4=1,Out=2,V>=1] * Chain [27,39]: 1 with precondition: [V1=2,Out=1,V>=1,V4>=1] * Chain [27,38,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [27,37,39]: 2 with precondition: [V1=2,V=1,Out=2,V4>=1] * Chain [27,34,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [27,33,39]: 2 with precondition: [V1=2,Out=2,V>=2,V4>=1] * Chain [27,32,39]: 2 with precondition: [V1=2,Out=2,V>=1,V4>=1] * Chain [27,31,39]: 2 with precondition: [V1=2,Out=2,V>=2,V4>=1] #### Cost of chains of start(V1,V,V4): * Chain [45]: 1*s(29)+0 Such that:s(29) =< V with precondition: [V1>=0] * Chain [44]: 0 with precondition: [V1=1,V>=0] * Chain [43]: 0 with precondition: [V1=2,V=2] * Chain [42]: 25*s(31)+3*s(35)+1*s(36)+2 Such that:s(34) =< V+1 s(36) =< V4 aux(4) =< V4+1 s(35) =< s(34) s(31) =< aux(4) with precondition: [V1=2,V>=0,V4>=0] * Chain [41]: 0 with precondition: [V=0,V1>=1] * Chain [40]: 0 with precondition: [V=1,V1>=0] Closed-form bounds of start(V1,V,V4): ------------------------------------- * Chain [45] with precondition: [V1>=0] - Upper bound: nat(V) - Complexity: n * Chain [44] with precondition: [V1=1,V>=0] - Upper bound: 0 - Complexity: constant * Chain [43] with precondition: [V1=2,V=2] - Upper bound: 0 - Complexity: constant * Chain [42] with precondition: [V1=2,V>=0,V4>=0] - Upper bound: 3*V+26*V4+30 - Complexity: n * Chain [41] with precondition: [V=0,V1>=1] - Upper bound: 0 - Complexity: constant * Chain [40] with precondition: [V=1,V1>=0] - Upper bound: 0 - Complexity: constant ### Maximum cost of start(V1,V,V4): max([nat(V),nat(V4)+2+nat(V+1)*3+nat(V4+1)*25]) Asymptotic class: n * Total analysis performed in 997 ms. ---------------------------------------- (20) BOUNDS(1, n^1)