1152.81/291.46 WORST_CASE(Omega(n^1), O(n^2)) 1152.81/291.48 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 1152.81/291.48 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1152.81/291.48 1152.81/291.48 1152.81/291.48 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1152.81/291.48 1152.81/291.48 (0) CpxTRS 1152.81/291.48 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 1152.81/291.48 (2) CpxTRS 1152.81/291.48 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 1152.81/291.48 (4) CpxWeightedTrs 1152.81/291.48 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1152.81/291.48 (6) CpxTypedWeightedTrs 1152.81/291.48 (7) CompletionProof [UPPER BOUND(ID), 7 ms] 1152.81/291.48 (8) CpxTypedWeightedCompleteTrs 1152.81/291.48 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 1152.81/291.48 (10) CpxRNTS 1152.81/291.48 (11) CompleteCoflocoProof [FINISHED, 1187 ms] 1152.81/291.48 (12) BOUNDS(1, n^2) 1152.81/291.48 (13) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 1152.81/291.48 (14) TRS for Loop Detection 1152.81/291.48 (15) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 1152.81/291.48 (16) BEST 1152.81/291.48 (17) proven lower bound 1152.81/291.48 (18) LowerBoundPropagationProof [FINISHED, 0 ms] 1152.81/291.48 (19) BOUNDS(n^1, INF) 1152.81/291.48 (20) TRS for Loop Detection 1152.81/291.48 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (0) 1152.81/291.48 Obligation: 1152.81/291.48 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1152.81/291.48 1152.81/291.48 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true 1152.81/291.48 le(s(x), 0) -> false 1152.81/291.48 le(s(x), s(y)) -> le(x, y) 1152.81/291.48 mod(x, 0) -> modZeroErro 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) 1152.81/291.48 if(true, x, y, z, u) -> u 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) 1152.81/291.48 1152.81/291.48 S is empty. 1152.81/291.48 Rewrite Strategy: FULL 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 1152.81/291.48 Converted rc-obligation to irc-obligation. 1152.81/291.48 1152.81/291.48 The duplicating contexts are: 1152.81/291.48 modIter([], s(y), z, u) 1152.81/291.48 modIter(x, s(y), [], u) 1152.81/291.48 if(false, x, [], z, u) 1152.81/291.48 if(false, x, y, z, []) 1152.81/291.48 1152.81/291.48 1152.81/291.48 The defined contexts are: 1152.81/291.48 if2([], x1, x2, s(x3), s(x4)) 1152.81/291.48 if([], x1, s(x2), x3, x4) 1152.81/291.48 1152.81/291.48 1152.81/291.48 [] just represents basic- or constructor-terms in the following defined contexts: 1152.81/291.48 if2([], x1, x2, s(x3), s(x4)) 1152.81/291.48 if([], x1, s(x2), x3, x4) 1152.81/291.48 1152.81/291.48 1152.81/291.48 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (2) 1152.81/291.48 Obligation: 1152.81/291.48 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2). 1152.81/291.48 1152.81/291.48 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true 1152.81/291.48 le(s(x), 0) -> false 1152.81/291.48 le(s(x), s(y)) -> le(x, y) 1152.81/291.48 mod(x, 0) -> modZeroErro 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) 1152.81/291.48 if(true, x, y, z, u) -> u 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) 1152.81/291.48 1152.81/291.48 S is empty. 1152.81/291.48 Rewrite Strategy: INNERMOST 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 1152.81/291.48 Transformed relative TRS to weighted TRS 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (4) 1152.81/291.48 Obligation: 1152.81/291.48 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 1152.81/291.48 1152.81/291.48 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true [1] 1152.81/291.48 le(s(x), 0) -> false [1] 1152.81/291.48 le(s(x), s(y)) -> le(x, y) [1] 1152.81/291.48 mod(x, 0) -> modZeroErro [1] 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) [1] 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) [1] 1152.81/291.48 if(true, x, y, z, u) -> u [1] 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) [1] 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) [1] 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) [1] 1152.81/291.48 1152.81/291.48 Rewrite Strategy: INNERMOST 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1152.81/291.48 Infered types. 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (6) 1152.81/291.48 Obligation: 1152.81/291.48 Runtime Complexity Weighted TRS with Types. 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true [1] 1152.81/291.48 le(s(x), 0) -> false [1] 1152.81/291.48 le(s(x), s(y)) -> le(x, y) [1] 1152.81/291.48 mod(x, 0) -> modZeroErro [1] 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) [1] 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) [1] 1152.81/291.48 if(true, x, y, z, u) -> u [1] 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) [1] 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) [1] 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) [1] 1152.81/291.48 1152.81/291.48 The TRS has the following type information: 1152.81/291.48 le :: 0:s:modZeroErro -> 0:s:modZeroErro -> true:false 1152.81/291.48 0 :: 0:s:modZeroErro 1152.81/291.48 true :: true:false 1152.81/291.48 s :: 0:s:modZeroErro -> 0:s:modZeroErro 1152.81/291.48 false :: true:false 1152.81/291.48 mod :: 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro 1152.81/291.48 modZeroErro :: 0:s:modZeroErro 1152.81/291.48 modIter :: 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro 1152.81/291.48 if :: true:false -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro 1152.81/291.48 if2 :: true:false -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro -> 0:s:modZeroErro 1152.81/291.48 1152.81/291.48 Rewrite Strategy: INNERMOST 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (7) CompletionProof (UPPER BOUND(ID)) 1152.81/291.48 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 1152.81/291.48 1152.81/291.48 le(v0, v1) -> null_le [0] 1152.81/291.48 mod(v0, v1) -> null_mod [0] 1152.81/291.48 modIter(v0, v1, v2, v3) -> null_modIter [0] 1152.81/291.48 if(v0, v1, v2, v3, v4) -> null_if [0] 1152.81/291.48 if2(v0, v1, v2, v3, v4) -> null_if2 [0] 1152.81/291.48 1152.81/291.48 And the following fresh constants: null_le, null_mod, null_modIter, null_if, null_if2 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (8) 1152.81/291.48 Obligation: 1152.81/291.48 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 1152.81/291.48 1152.81/291.48 Runtime Complexity Weighted TRS with Types. 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true [1] 1152.81/291.48 le(s(x), 0) -> false [1] 1152.81/291.48 le(s(x), s(y)) -> le(x, y) [1] 1152.81/291.48 mod(x, 0) -> modZeroErro [1] 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) [1] 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) [1] 1152.81/291.48 if(true, x, y, z, u) -> u [1] 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) [1] 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) [1] 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) [1] 1152.81/291.48 le(v0, v1) -> null_le [0] 1152.81/291.48 mod(v0, v1) -> null_mod [0] 1152.81/291.48 modIter(v0, v1, v2, v3) -> null_modIter [0] 1152.81/291.48 if(v0, v1, v2, v3, v4) -> null_if [0] 1152.81/291.48 if2(v0, v1, v2, v3, v4) -> null_if2 [0] 1152.81/291.48 1152.81/291.48 The TRS has the following type information: 1152.81/291.48 le :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> true:false:null_le 1152.81/291.48 0 :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 true :: true:false:null_le 1152.81/291.48 s :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 false :: true:false:null_le 1152.81/291.48 mod :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 modZeroErro :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 modIter :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 if :: true:false:null_le -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 if2 :: true:false:null_le -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 -> 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 null_le :: true:false:null_le 1152.81/291.48 null_mod :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 null_modIter :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 null_if :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 null_if2 :: 0:s:modZeroErro:null_mod:null_modIter:null_if:null_if2 1152.81/291.48 1152.81/291.48 Rewrite Strategy: INNERMOST 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 1152.81/291.48 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 1152.81/291.48 The constant constructors are abstracted as follows: 1152.81/291.48 1152.81/291.48 0 => 0 1152.81/291.48 true => 2 1152.81/291.48 false => 1 1152.81/291.48 modZeroErro => 1 1152.81/291.48 null_le => 0 1152.81/291.48 null_mod => 0 1152.81/291.48 null_modIter => 0 1152.81/291.48 null_if => 0 1152.81/291.48 null_if2 => 0 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (10) 1152.81/291.48 Obligation: 1152.81/291.48 Complexity RNTS consisting of the following rules: 1152.81/291.48 1152.81/291.48 if(z', z'', z1, z2, z3) -{ 1 }-> u :|: z1 = y, z >= 0, z' = 2, z2 = z, x >= 0, y >= 0, z'' = x, z3 = u, u >= 0 1152.81/291.48 if(z', z'', z1, z2, z3) -{ 1 }-> if2(le(y, 1 + u), x, y, 1 + z, 1 + u) :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1, z3 = u, u >= 0 1152.81/291.48 if(z', z'', z1, z2, z3) -{ 0 }-> 0 :|: z2 = v3, v0 >= 0, v4 >= 0, z1 = v2, v1 >= 0, z'' = v1, z3 = v4, v2 >= 0, v3 >= 0, z' = v0 1152.81/291.48 if2(z', z'', z1, z2, z3) -{ 1 }-> modIter(x, y, z, u) :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1, z3 = u, u >= 0 1152.81/291.48 if2(z', z'', z1, z2, z3) -{ 1 }-> modIter(x, y, z, 0) :|: z1 = y, z >= 0, z' = 2, z2 = z, x >= 0, y >= 0, z'' = x, z3 = u, u >= 0 1152.81/291.48 if2(z', z'', z1, z2, z3) -{ 0 }-> 0 :|: z2 = v3, v0 >= 0, v4 >= 0, z1 = v2, v1 >= 0, z'' = v1, z3 = v4, v2 >= 0, v3 >= 0, z' = v0 1152.81/291.48 le(z', z'') -{ 1 }-> le(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y 1152.81/291.48 le(z', z'') -{ 1 }-> 2 :|: z'' = y, y >= 0, z' = 0 1152.81/291.48 le(z', z'') -{ 1 }-> 1 :|: z'' = 0, z' = 1 + x, x >= 0 1152.81/291.48 le(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 1152.81/291.48 mod(z', z'') -{ 1 }-> modIter(x, 1 + y, 0, 0) :|: z' = x, x >= 0, y >= 0, z'' = 1 + y 1152.81/291.48 mod(z', z'') -{ 1 }-> 1 :|: z'' = 0, z' = x, x >= 0 1152.81/291.48 mod(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 1152.81/291.48 modIter(z', z'', z1, z2) -{ 1 }-> if(le(x, z), x, 1 + y, z, u) :|: z1 = z, z2 = u, z >= 0, z' = x, x >= 0, y >= 0, z'' = 1 + y, u >= 0 1152.81/291.48 modIter(z', z'', z1, z2) -{ 0 }-> 0 :|: z2 = v3, v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, v3 >= 0, z' = v0 1152.81/291.48 1152.81/291.48 Only complete derivations are relevant for the runtime complexity. 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (11) CompleteCoflocoProof (FINISHED) 1152.81/291.48 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 1152.81/291.48 1152.81/291.48 eq(start(V, V1, V14, V13, V19),0,[le(V, V1, Out)],[V >= 0,V1 >= 0]). 1152.81/291.48 eq(start(V, V1, V14, V13, V19),0,[mod(V, V1, Out)],[V >= 0,V1 >= 0]). 1152.81/291.48 eq(start(V, V1, V14, V13, V19),0,[modIter(V, V1, V14, V13, Out)],[V >= 0,V1 >= 0,V14 >= 0,V13 >= 0]). 1152.81/291.48 eq(start(V, V1, V14, V13, V19),0,[if(V, V1, V14, V13, V19, Out)],[V >= 0,V1 >= 0,V14 >= 0,V13 >= 0,V19 >= 0]). 1152.81/291.48 eq(start(V, V1, V14, V13, V19),0,[if2(V, V1, V14, V13, V19, Out)],[V >= 0,V1 >= 0,V14 >= 0,V13 >= 0,V19 >= 0]). 1152.81/291.48 eq(le(V, V1, Out),1,[],[Out = 2,V1 = V2,V2 >= 0,V = 0]). 1152.81/291.48 eq(le(V, V1, Out),1,[],[Out = 1,V1 = 0,V = 1 + V3,V3 >= 0]). 1152.81/291.48 eq(le(V, V1, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V4,V4 >= 0,V5 >= 0,V1 = 1 + V5]). 1152.81/291.48 eq(mod(V, V1, Out),1,[],[Out = 1,V1 = 0,V = V6,V6 >= 0]). 1152.81/291.48 eq(mod(V, V1, Out),1,[modIter(V7, 1 + V8, 0, 0, Ret1)],[Out = Ret1,V = V7,V7 >= 0,V8 >= 0,V1 = 1 + V8]). 1152.81/291.48 eq(modIter(V, V1, V14, V13, Out),1,[le(V10, V11, Ret0),if(Ret0, V10, 1 + V12, V11, V9, Ret2)],[Out = Ret2,V14 = V11,V13 = V9,V11 >= 0,V = V10,V10 >= 0,V12 >= 0,V1 = 1 + V12,V9 >= 0]). 1152.81/291.48 eq(if(V, V1, V14, V13, V19, Out),1,[],[Out = V16,V14 = V15,V17 >= 0,V = 2,V13 = V17,V18 >= 0,V15 >= 0,V1 = V18,V19 = V16,V16 >= 0]). 1152.81/291.48 eq(if(V, V1, V14, V13, V19, Out),1,[le(V21, 1 + V22, Ret01),if2(Ret01, V23, V21, 1 + V20, 1 + V22, Ret3)],[Out = Ret3,V14 = V21,V20 >= 0,V13 = V20,V23 >= 0,V21 >= 0,V1 = V23,V = 1,V19 = V22,V22 >= 0]). 1152.81/291.48 eq(if2(V, V1, V14, V13, V19, Out),1,[modIter(V25, V26, V24, V27, Ret4)],[Out = Ret4,V14 = V26,V24 >= 0,V13 = V24,V25 >= 0,V26 >= 0,V1 = V25,V = 1,V19 = V27,V27 >= 0]). 1152.81/291.48 eq(if2(V, V1, V14, V13, V19, Out),1,[modIter(V29, V31, V30, 0, Ret5)],[Out = Ret5,V14 = V31,V30 >= 0,V = 2,V13 = V30,V29 >= 0,V31 >= 0,V1 = V29,V19 = V28,V28 >= 0]). 1152.81/291.48 eq(le(V, V1, Out),0,[],[Out = 0,V33 >= 0,V32 >= 0,V1 = V32,V = V33]). 1152.81/291.48 eq(mod(V, V1, Out),0,[],[Out = 0,V35 >= 0,V34 >= 0,V1 = V34,V = V35]). 1152.81/291.48 eq(modIter(V, V1, V14, V13, Out),0,[],[Out = 0,V13 = V38,V37 >= 0,V14 = V39,V36 >= 0,V1 = V36,V39 >= 0,V38 >= 0,V = V37]). 1152.81/291.48 eq(if(V, V1, V14, V13, V19, Out),0,[],[Out = 0,V13 = V44,V40 >= 0,V43 >= 0,V14 = V41,V42 >= 0,V1 = V42,V19 = V43,V41 >= 0,V44 >= 0,V = V40]). 1152.81/291.48 eq(if2(V, V1, V14, V13, V19, Out),0,[],[Out = 0,V13 = V47,V46 >= 0,V49 >= 0,V14 = V48,V45 >= 0,V1 = V45,V19 = V49,V48 >= 0,V47 >= 0,V = V46]). 1152.81/291.48 input_output_vars(le(V,V1,Out),[V,V1],[Out]). 1152.81/291.48 input_output_vars(mod(V,V1,Out),[V,V1],[Out]). 1152.81/291.48 input_output_vars(modIter(V,V1,V14,V13,Out),[V,V1,V14,V13],[Out]). 1152.81/291.48 input_output_vars(if(V,V1,V14,V13,V19,Out),[V,V1,V14,V13,V19],[Out]). 1152.81/291.48 input_output_vars(if2(V,V1,V14,V13,V19,Out),[V,V1,V14,V13,V19],[Out]). 1152.81/291.48 1152.81/291.48 1152.81/291.48 CoFloCo proof output: 1152.81/291.48 Preprocessing Cost Relations 1152.81/291.48 ===================================== 1152.81/291.48 1152.81/291.48 #### Computed strongly connected components 1152.81/291.48 0. recursive : [le/3] 1152.81/291.48 1. recursive : [if/6,if2/6,modIter/5] 1152.81/291.48 2. non_recursive : [(mod)/3] 1152.81/291.48 3. non_recursive : [start/5] 1152.81/291.48 1152.81/291.48 #### Obtained direct recursion through partial evaluation 1152.81/291.48 0. SCC is partially evaluated into le/3 1152.81/291.48 1. SCC is partially evaluated into modIter/5 1152.81/291.48 2. SCC is partially evaluated into (mod)/3 1152.81/291.48 3. SCC is partially evaluated into start/5 1152.81/291.48 1152.81/291.48 Control-Flow Refinement of Cost Relations 1152.81/291.48 ===================================== 1152.81/291.48 1152.81/291.48 ### Specialization of cost equations le/3 1152.81/291.48 * CE 14 is refined into CE [24] 1152.81/291.48 * CE 12 is refined into CE [25] 1152.81/291.48 * CE 11 is refined into CE [26] 1152.81/291.48 * CE 13 is refined into CE [27] 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Cost equations --> "Loop" of le/3 1152.81/291.48 * CEs [27] --> Loop 14 1152.81/291.48 * CEs [24] --> Loop 15 1152.81/291.48 * CEs [25] --> Loop 16 1152.81/291.48 * CEs [26] --> Loop 17 1152.81/291.48 1152.81/291.48 ### Ranking functions of CR le(V,V1,Out) 1152.81/291.48 * RF of phase [14]: [V,V1] 1152.81/291.48 1152.81/291.48 #### Partial ranking functions of CR le(V,V1,Out) 1152.81/291.48 * Partial RF of phase [14]: 1152.81/291.48 - RF of loop [14:1]: 1152.81/291.48 V 1152.81/291.48 V1 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Specialization of cost equations modIter/5 1152.81/291.48 * CE 19 is refined into CE [28,29] 1152.81/291.48 * CE 15 is refined into CE [30,31,32,33,34,35] 1152.81/291.48 * CE 18 is refined into CE [36,37,38,39,40] 1152.81/291.48 * CE 20 is refined into CE [41] 1152.81/291.48 * CE 17 is refined into CE [42,43] 1152.81/291.48 * CE 16 is refined into CE [44,45] 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Cost equations --> "Loop" of modIter/5 1152.81/291.48 * CEs [43] --> Loop 18 1152.81/291.48 * CEs [45] --> Loop 19 1152.81/291.48 * CEs [42] --> Loop 20 1152.81/291.48 * CEs [44] --> Loop 21 1152.81/291.48 * CEs [29] --> Loop 22 1152.81/291.48 * CEs [30,31,32,37] --> Loop 23 1152.81/291.48 * CEs [28] --> Loop 24 1152.81/291.48 * CEs [33,34,35,36,38,39,40,41] --> Loop 25 1152.81/291.48 1152.81/291.48 ### Ranking functions of CR modIter(V,V1,V14,V13,Out) 1152.81/291.48 * RF of phase [18,19]: [V-V14] 1152.81/291.48 1152.81/291.48 #### Partial ranking functions of CR modIter(V,V1,V14,V13,Out) 1152.81/291.48 * Partial RF of phase [18,19]: 1152.81/291.48 - RF of loop [18:1]: 1152.81/291.48 V1-V13-1 depends on loops [19:1] 1152.81/291.48 - RF of loop [18:1,19:1]: 1152.81/291.48 V-V14 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Specialization of cost equations (mod)/3 1152.81/291.48 * CE 22 is refined into CE [46,47,48,49,50] 1152.81/291.48 * CE 23 is refined into CE [51] 1152.81/291.48 * CE 21 is refined into CE [52] 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Cost equations --> "Loop" of (mod)/3 1152.81/291.48 * CEs [49] --> Loop 26 1152.81/291.48 * CEs [50] --> Loop 27 1152.81/291.48 * CEs [52] --> Loop 28 1152.81/291.48 * CEs [48] --> Loop 29 1152.81/291.48 * CEs [46,47,51] --> Loop 30 1152.81/291.48 1152.81/291.48 ### Ranking functions of CR mod(V,V1,Out) 1152.81/291.48 1152.81/291.48 #### Partial ranking functions of CR mod(V,V1,Out) 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Specialization of cost equations start/5 1152.81/291.48 * CE 4 is refined into CE [53,54,55,56,57,58,59] 1152.81/291.48 * CE 7 is refined into CE [60] 1152.81/291.48 * CE 1 is refined into CE [61,62,63,64] 1152.81/291.48 * CE 2 is refined into CE [65] 1152.81/291.48 * CE 3 is refined into CE [66,67,68,69,70] 1152.81/291.48 * CE 5 is refined into CE [71,72,73,74] 1152.81/291.48 * CE 6 is refined into CE [75,76,77,78,79,80,81] 1152.81/291.48 * CE 8 is refined into CE [82,83,84,85,86] 1152.81/291.48 * CE 9 is refined into CE [87,88,89,90] 1152.81/291.48 * CE 10 is refined into CE [91,92,93,94,95,96,97] 1152.81/291.48 1152.81/291.48 1152.81/291.48 ### Cost equations --> "Loop" of start/5 1152.81/291.48 * CEs [94] --> Loop 31 1152.81/291.48 * CEs [95] --> Loop 32 1152.81/291.48 * CEs [83,88] --> Loop 33 1152.81/291.48 * CEs [56] --> Loop 34 1152.81/291.48 * CEs [57] --> Loop 35 1152.81/291.48 * CEs [55] --> Loop 36 1152.81/291.48 * CEs [53,54,58,59,60] --> Loop 37 1152.81/291.48 * CEs [78] --> Loop 38 1152.81/291.48 * CEs [79] --> Loop 39 1152.81/291.48 * CEs [87,93] --> Loop 40 1152.81/291.48 * CEs [61,66] --> Loop 41 1152.81/291.48 * CEs [77] --> Loop 42 1152.81/291.48 * CEs [62,63,64,67,68,69,70,71,72,73,74,75,76,80,81] --> Loop 43 1152.81/291.48 * CEs [65,82,84,85,86,89,90,91,92,96,97] --> Loop 44 1152.81/291.48 1152.81/291.48 ### Ranking functions of CR start(V,V1,V14,V13,V19) 1152.81/291.48 1152.81/291.48 #### Partial ranking functions of CR start(V,V1,V14,V13,V19) 1152.81/291.48 1152.81/291.48 1152.81/291.48 Computing Bounds 1152.81/291.48 ===================================== 1152.81/291.48 1152.81/291.48 #### Cost of chains of le(V,V1,Out): 1152.81/291.48 * Chain [[14],17]: 1*it(14)+1 1152.81/291.48 Such that:it(14) =< V 1152.81/291.48 1152.81/291.48 with precondition: [Out=2,V>=1,V1>=V] 1152.81/291.48 1152.81/291.48 * Chain [[14],16]: 1*it(14)+1 1152.81/291.48 Such that:it(14) =< V1 1152.81/291.48 1152.81/291.48 with precondition: [Out=1,V1>=1,V>=V1+1] 1152.81/291.48 1152.81/291.48 * Chain [[14],15]: 1*it(14)+0 1152.81/291.48 Such that:it(14) =< V1 1152.81/291.48 1152.81/291.48 with precondition: [Out=0,V>=1,V1>=1] 1152.81/291.48 1152.81/291.48 * Chain [17]: 1 1152.81/291.48 with precondition: [V=0,Out=2,V1>=0] 1152.81/291.48 1152.81/291.48 * Chain [16]: 1 1152.81/291.48 with precondition: [V1=0,Out=1,V>=1] 1152.81/291.48 1152.81/291.48 * Chain [15]: 0 1152.81/291.48 with precondition: [Out=0,V>=0,V1>=0] 1152.81/291.48 1152.81/291.48 1152.81/291.48 #### Cost of chains of modIter(V,V1,V14,V13,Out): 1152.81/291.48 * Chain [[18,19],25]: 10*it(18)+6*s(2)+3*s(3)+1*s(7)+1*s(19)+1*s(20)+1*s(21)+4 1152.81/291.48 Such that:s(7) =< V1 1152.81/291.48 aux(13) =< V1+V13 1152.81/291.48 aux(14) =< V 1152.81/291.48 aux(15) =< V-V14 1152.81/291.48 aux(16) =< V-V14+V13+1 1152.81/291.48 s(2) =< aux(14) 1152.81/291.48 s(3) =< aux(16) 1152.81/291.48 it(18) =< aux(15) 1152.81/291.48 aux(7) =< aux(14) 1152.81/291.48 s(21) =< it(18)*aux(7) 1152.81/291.48 s(20) =< it(18)*aux(13) 1152.81/291.48 s(19) =< it(18)*aux(14) 1152.81/291.48 1152.81/291.48 with precondition: [Out=0,V1>=1,V14>=1,V13>=0,V>=V14+1] 1152.81/291.48 1152.81/291.48 * Chain [[18,19],22]: 10*it(18)+1*s(19)+1*s(20)+1*s(21)+1*s(22)+1*s(23)+3 1152.81/291.48 Such that:s(22) =< V-V14+V13-Out 1152.81/291.48 aux(13) =< V1+V13 1152.81/291.48 aux(17) =< V 1152.81/291.48 aux(18) =< V-V14 1152.81/291.48 s(23) =< aux(17) 1152.81/291.48 it(18) =< aux(18) 1152.81/291.48 aux(7) =< aux(17) 1152.81/291.48 s(21) =< it(18)*aux(7) 1152.81/291.48 s(20) =< it(18)*aux(13) 1152.81/291.48 s(19) =< it(18)*aux(17) 1152.81/291.48 1152.81/291.48 with precondition: [V14>=1,V13>=0,Out>=0,V>=V14+1,V1>=Out+1,V+V13>=Out+V14] 1152.81/291.48 1152.81/291.48 * Chain [25]: 5*s(2)+2*s(3)+1*s(7)+1*s(10)+4 1152.81/291.48 Such that:s(10) =< V 1152.81/291.48 s(7) =< V1 1152.81/291.48 aux(1) =< V14 1152.81/291.48 aux(2) =< V13+1 1152.81/291.48 s(2) =< aux(1) 1152.81/291.48 s(3) =< aux(2) 1152.81/291.48 1152.81/291.48 with precondition: [Out=0,V>=0,V1>=0,V14>=0,V13>=0] 1152.81/291.48 1152.81/291.48 * Chain [24]: 3 1152.81/291.48 with precondition: [V=0,V13=Out,V1>=1,V14>=0,V13>=0] 1152.81/291.48 1152.81/291.48 * Chain [23]: 2*s(24)+1*s(26)+4 1152.81/291.48 Such that:s(26) =< V1 1152.81/291.48 aux(19) =< V13+1 1152.81/291.48 s(24) =< aux(19) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,Out=0,V>=1,V1>=1,V13>=0] 1152.81/291.48 1152.81/291.48 * Chain [22]: 1*s(23)+3 1152.81/291.48 Such that:s(23) =< V 1152.81/291.48 1152.81/291.48 with precondition: [V13=Out,V>=1,V1>=1,V13>=0,V14>=V] 1152.81/291.48 1152.81/291.48 * Chain [21,[18,19],25]: 19*it(18)+2*s(7)+1*s(19)+1*s(20)+1*s(21)+9 1152.81/291.48 Such that:aux(20) =< V 1152.81/291.48 aux(21) =< V1 1152.81/291.48 s(7) =< aux(21) 1152.81/291.48 it(18) =< aux(20) 1152.81/291.48 aux(7) =< aux(20) 1152.81/291.48 s(21) =< it(18)*aux(7) 1152.81/291.48 s(20) =< it(18)*aux(21) 1152.81/291.48 s(19) =< it(18)*aux(20) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,Out=0,V>=2,V1>=1,V13+1>=V1] 1152.81/291.48 1152.81/291.48 * Chain [21,[18,19],22]: 11*it(18)+1*s(19)+1*s(20)+1*s(21)+1*s(22)+1*s(27)+8 1152.81/291.48 Such that:s(22) =< V-Out 1152.81/291.48 aux(22) =< V 1152.81/291.48 aux(23) =< V1 1152.81/291.48 s(27) =< aux(23) 1152.81/291.48 it(18) =< aux(22) 1152.81/291.48 aux(7) =< aux(22) 1152.81/291.48 s(21) =< it(18)*aux(7) 1152.81/291.48 s(20) =< it(18)*aux(23) 1152.81/291.48 s(19) =< it(18)*aux(22) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,V>=2,Out>=0,V13+1>=V1,V>=Out+1,V1>=Out+1] 1152.81/291.48 1152.81/291.48 * Chain [21,25]: 7*s(2)+2*s(7)+1*s(10)+9 1152.81/291.48 Such that:s(10) =< V 1152.81/291.48 aux(24) =< 1 1152.81/291.48 aux(25) =< V1 1152.81/291.48 s(7) =< aux(25) 1152.81/291.48 s(2) =< aux(24) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,Out=0,V>=1,V1>=1,V13+1>=V1] 1152.81/291.48 1152.81/291.48 * Chain [21,22]: 1*s(23)+1*s(27)+8 1152.81/291.48 Such that:s(23) =< 1 1152.81/291.48 s(27) =< V1 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V14=0,Out=0,V1>=1,V13+1>=V1] 1152.81/291.48 1152.81/291.48 * Chain [20,[18,19],25]: 16*it(18)+3*s(3)+1*s(7)+1*s(19)+1*s(20)+1*s(21)+1*s(28)+9 1152.81/291.48 Such that:aux(16) =< V+V13+1 1152.81/291.48 s(7) =< V1 1152.81/291.48 aux(13) =< V1+V13+1 1152.81/291.48 s(28) =< V13+1 1152.81/291.48 aux(26) =< V 1152.81/291.48 it(18) =< aux(26) 1152.81/291.48 s(3) =< aux(16) 1152.81/291.48 aux(7) =< aux(26) 1152.81/291.48 s(21) =< it(18)*aux(7) 1152.81/291.48 s(20) =< it(18)*aux(13) 1152.81/291.48 s(19) =< it(18)*aux(26) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,Out=0,V>=2,V13>=0,V1>=V13+2] 1152.81/291.48 1152.81/291.48 * Chain [20,[18,19],22]: 11*it(18)+1*s(19)+1*s(20)+1*s(21)+1*s(22)+1*s(28)+8 1152.81/291.48 Such that:s(22) =< V+V13-Out 1152.81/291.48 aux(13) =< V1+V13+1 1152.81/291.48 s(28) =< V13+1 1152.81/291.48 aux(27) =< V 1152.81/291.48 it(18) =< aux(27) 1152.81/291.48 aux(7) =< aux(27) 1152.81/291.48 s(21) =< it(18)*aux(7) 1152.81/291.48 s(20) =< it(18)*aux(13) 1152.81/291.48 s(19) =< it(18)*aux(27) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,V>=2,V13>=0,Out>=0,V1>=V13+2,V1>=Out+1,V+V13>=Out] 1152.81/291.48 1152.81/291.48 * Chain [20,25]: 5*s(2)+2*s(3)+1*s(7)+1*s(10)+1*s(28)+9 1152.81/291.48 Such that:aux(1) =< 1 1152.81/291.48 s(10) =< V 1152.81/291.48 s(7) =< V1 1152.81/291.48 s(28) =< V13+1 1152.81/291.48 aux(2) =< V13+2 1152.81/291.48 s(2) =< aux(1) 1152.81/291.48 s(3) =< aux(2) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,Out=0,V>=1,V13>=0,V1>=V13+2] 1152.81/291.48 1152.81/291.48 * Chain [20,22]: 1*s(23)+1*s(28)+8 1152.81/291.48 Such that:s(23) =< 1 1152.81/291.48 s(28) =< Out 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V14=0,V13+1=Out,V13>=0,V1>=V13+2] 1152.81/291.48 1152.81/291.48 1152.81/291.48 #### Cost of chains of mod(V,V1,Out): 1152.81/291.48 * Chain [30]: 19*s(94)+54*s(95)+10*s(96)+2*s(98)+3*s(100)+2*s(101)+3*s(102)+6*s(104)+1*s(105)+10 1152.81/291.48 Such that:aux(32) =< 1 1152.81/291.48 s(89) =< 2 1152.81/291.48 aux(33) =< V 1152.81/291.48 aux(34) =< V+1 1152.81/291.48 aux(35) =< V1 1152.81/291.48 s(87) =< V1+1 1152.81/291.48 s(94) =< aux(32) 1152.81/291.48 s(95) =< aux(33) 1152.81/291.48 s(96) =< aux(35) 1152.81/291.48 s(98) =< s(89) 1152.81/291.48 s(99) =< aux(33) 1152.81/291.48 s(100) =< s(95)*s(99) 1152.81/291.48 s(101) =< s(95)*aux(35) 1152.81/291.48 s(102) =< s(95)*aux(33) 1152.81/291.48 s(104) =< aux(34) 1152.81/291.48 s(105) =< s(95)*s(87) 1152.81/291.48 1152.81/291.48 with precondition: [Out=0,V>=0,V1>=0] 1152.81/291.48 1152.81/291.48 * Chain [29]: 2*s(111)+9 1152.81/291.48 Such that:aux(36) =< 1 1152.81/291.48 s(111) =< aux(36) 1152.81/291.48 1152.81/291.48 with precondition: [V=1,Out=1,V1>=2] 1152.81/291.48 1152.81/291.48 * Chain [28]: 1 1152.81/291.48 with precondition: [V1=0,Out=1,V>=0] 1152.81/291.48 1152.81/291.48 * Chain [27]: 12*s(113)+1*s(116)+1*s(119)+1*s(120)+1*s(121)+9 1152.81/291.48 Such that:s(115) =< 1 1152.81/291.48 aux(37) =< V 1152.81/291.48 s(113) =< aux(37) 1152.81/291.48 s(116) =< s(115) 1152.81/291.48 s(118) =< aux(37) 1152.81/291.48 s(119) =< s(113)*s(118) 1152.81/291.48 s(120) =< s(113)*s(115) 1152.81/291.48 s(121) =< s(113)*aux(37) 1152.81/291.48 1152.81/291.48 with precondition: [V1=1,Out=0,V>=2] 1152.81/291.48 1152.81/291.48 * Chain [26]: 12*s(122)+1*s(124)+1*s(128)+1*s(129)+1*s(130)+9 1152.81/291.48 Such that:s(124) =< 1 1152.81/291.48 s(123) =< V1+1 1152.81/291.48 aux(38) =< V 1152.81/291.48 s(122) =< aux(38) 1152.81/291.48 s(127) =< aux(38) 1152.81/291.48 s(128) =< s(122)*s(127) 1152.81/291.48 s(129) =< s(122)*s(123) 1152.81/291.48 s(130) =< s(122)*aux(38) 1152.81/291.48 1152.81/291.48 with precondition: [V>=2,V1>=2,Out>=0,V>=Out,V1>=Out+1] 1152.81/291.48 1152.81/291.48 1152.81/291.48 #### Cost of chains of start(V,V1,V14,V13,V19): 1152.81/291.48 * Chain [44]: 22*s(155)+125*s(157)+34*s(165)+7*s(167)+1*s(168)+7*s(169)+2*s(171)+3*s(172)+6*s(173)+2*s(174)+6*s(197)+2*s(198)+5*s(203)+3*s(204)+1*s(205)+3*s(206)+20*s(207)+2*s(208)+2*s(209)+2*s(210)+1*s(212)+10 1152.81/291.48 Such that:s(158) =< 2 1152.81/291.48 s(159) =< V+1 1152.81/291.48 s(212) =< V-V14+V13 1152.81/291.48 s(184) =< V-V14+V13+1 1152.81/291.48 s(185) =< V+V13+1 1152.81/291.48 s(187) =< V1+V13+1 1152.81/291.48 s(188) =< V14 1152.81/291.48 s(193) =< V13+1 1152.81/291.48 s(189) =< V13+2 1152.81/291.48 aux(41) =< 1 1152.81/291.48 aux(42) =< V 1152.81/291.48 aux(43) =< V-V14 1152.81/291.48 aux(44) =< V1 1152.81/291.48 aux(45) =< V1+1 1152.81/291.48 aux(46) =< V1+V13 1152.81/291.48 s(165) =< aux(41) 1152.81/291.48 s(157) =< aux(42) 1152.81/291.48 s(155) =< aux(44) 1152.81/291.48 s(166) =< aux(42) 1152.81/291.48 s(167) =< s(157)*s(166) 1152.81/291.48 s(168) =< s(157)*aux(41) 1152.81/291.48 s(169) =< s(157)*aux(42) 1152.81/291.48 s(171) =< s(158) 1152.81/291.48 s(172) =< s(157)*aux(44) 1152.81/291.48 s(173) =< s(159) 1152.81/291.48 s(174) =< s(157)*aux(45) 1152.81/291.48 s(197) =< s(193) 1152.81/291.48 s(198) =< s(189) 1152.81/291.48 s(203) =< s(188) 1152.81/291.48 s(204) =< s(185) 1152.81/291.48 s(205) =< s(157)*s(187) 1152.81/291.48 s(206) =< s(184) 1152.81/291.48 s(207) =< aux(43) 1152.81/291.48 s(208) =< s(207)*s(166) 1152.81/291.48 s(209) =< s(207)*aux(46) 1152.81/291.48 s(210) =< s(207)*aux(42) 1152.81/291.48 1152.81/291.48 with precondition: [V>=0,V1>=0] 1152.81/291.48 1152.81/291.48 * Chain [43]: 12*s(222)+35*s(224)+45*s(238)+138*s(239)+2*s(242)+6*s(244)+3*s(245)+6*s(246)+10*s(247)+3*s(248)+1*s(249)+64*s(250)+6*s(252)+2*s(253)+6*s(254)+8*s(284)+2*s(285)+3*s(291)+1*s(292)+6*s(293)+2*s(296)+2*s(301)+5*s(331)+3*s(332)+1*s(333)+2*s(337)+12 1152.81/291.48 Such that:s(233) =< 2 1152.81/291.48 s(229) =< V1+1 1152.81/291.48 s(313) =< V1+V19+1 1152.81/291.48 s(272) =< V1+V19+2 1152.81/291.48 s(231) =< V14+1 1152.81/291.48 s(274) =< V14+V19+2 1152.81/291.48 s(316) =< V13 1152.81/291.48 s(276) =< V19+3 1152.81/291.48 aux(52) =< 1 1152.81/291.48 aux(53) =< V1 1152.81/291.48 aux(54) =< V1-V13 1152.81/291.48 aux(55) =< V1-V13+V19 1152.81/291.48 aux(56) =< V1-V13+V19+1 1152.81/291.48 aux(57) =< V14 1152.81/291.48 aux(58) =< V14+V19 1152.81/291.48 aux(59) =< V14+V19+1 1152.81/291.48 aux(60) =< V13+1 1152.81/291.48 aux(61) =< V19+1 1152.81/291.48 aux(62) =< V19+2 1152.81/291.48 s(239) =< aux(53) 1152.81/291.48 s(301) =< aux(55) 1152.81/291.48 s(224) =< aux(57) 1152.81/291.48 s(222) =< aux(61) 1152.81/291.48 s(238) =< aux(52) 1152.81/291.48 s(284) =< aux(62) 1152.81/291.48 s(285) =< s(276) 1152.81/291.48 s(243) =< aux(53) 1152.81/291.48 s(244) =< s(239)*s(243) 1152.81/291.48 s(245) =< s(239)*aux(57) 1152.81/291.48 s(246) =< s(239)*aux(53) 1152.81/291.48 s(247) =< aux(60) 1152.81/291.48 s(291) =< s(272) 1152.81/291.48 s(292) =< s(239)*s(274) 1152.81/291.48 s(293) =< aux(56) 1152.81/291.48 s(250) =< aux(54) 1152.81/291.48 s(252) =< s(250)*s(243) 1152.81/291.48 s(296) =< s(250)*aux(59) 1152.81/291.48 s(254) =< s(250)*aux(53) 1152.81/291.48 s(331) =< s(316) 1152.81/291.48 s(332) =< s(313) 1152.81/291.48 s(333) =< s(239)*aux(59) 1152.81/291.48 s(337) =< s(250)*aux(58) 1152.81/291.48 s(242) =< s(233) 1152.81/291.48 s(248) =< s(229) 1152.81/291.48 s(249) =< s(239)*s(231) 1152.81/291.48 s(253) =< s(250)*aux(57) 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V1>=0,V14>=0,V13>=0,V19>=0] 1152.81/291.48 1152.81/291.48 * Chain [42]: 1*s(350)+1*s(351)+9 1152.81/291.48 Such that:s(350) =< 1 1152.81/291.48 s(351) =< V19+1 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V1=1,V13=0,V19>=0,V14>=V19+2] 1152.81/291.48 1152.81/291.48 * Chain [41]: 19*s(363)+44*s(364)+2*s(367)+2*s(369)+2*s(371)+5*s(372)+3*s(373)+1*s(374)+13*s(375)+1*s(377)+1*s(379)+12 1152.81/291.48 Such that:aux(64) =< 1 1152.81/291.48 s(358) =< 2 1152.81/291.48 s(360) =< V1 1152.81/291.48 s(354) =< V1+1 1152.81/291.48 aux(65) =< V1-V13 1152.81/291.48 s(357) =< V13+1 1152.81/291.48 s(363) =< aux(64) 1152.81/291.48 s(364) =< s(360) 1152.81/291.48 s(367) =< s(358) 1152.81/291.48 s(368) =< s(360) 1152.81/291.48 s(369) =< s(364)*s(368) 1152.81/291.48 s(371) =< s(364)*s(360) 1152.81/291.48 s(372) =< s(357) 1152.81/291.48 s(373) =< s(354) 1152.81/291.48 s(374) =< s(364)*aux(64) 1152.81/291.48 s(375) =< aux(65) 1152.81/291.48 s(377) =< s(375)*s(368) 1152.81/291.48 s(379) =< s(375)*s(360) 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V14=0,V1>=0,V13>=0,V19>=0] 1152.81/291.48 1152.81/291.48 * Chain [40]: 3*s(381)+1*s(383)+9 1152.81/291.48 Such that:s(383) =< V13+1 1152.81/291.48 aux(66) =< 1 1152.81/291.48 s(381) =< aux(66) 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V1>=2] 1152.81/291.48 1152.81/291.48 * Chain [39]: 12*s(384)+1*s(387)+1*s(390)+1*s(391)+1*s(392)+9 1152.81/291.48 Such that:s(386) =< V14 1152.81/291.48 aux(67) =< V1 1152.81/291.48 s(384) =< aux(67) 1152.81/291.48 s(387) =< s(386) 1152.81/291.48 s(389) =< aux(67) 1152.81/291.48 s(390) =< s(384)*s(389) 1152.81/291.48 s(391) =< s(384)*s(386) 1152.81/291.48 s(392) =< s(384)*aux(67) 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V13=0,V1>=2,V14>=1,V19+1>=V14] 1152.81/291.48 1152.81/291.48 * Chain [38]: 1*s(393)+1*s(395)+11*s(397)+1*s(399)+1*s(400)+1*s(401)+9 1152.81/291.48 Such that:s(396) =< V1 1152.81/291.48 s(393) =< V1+V19 1152.81/291.48 s(394) =< V14+V19+1 1152.81/291.48 s(395) =< V19+1 1152.81/291.48 s(397) =< s(396) 1152.81/291.48 s(398) =< s(396) 1152.81/291.48 s(399) =< s(397)*s(398) 1152.81/291.48 s(400) =< s(397)*s(394) 1152.81/291.48 s(401) =< s(397)*s(396) 1152.81/291.48 1152.81/291.48 with precondition: [V=1,V13=0,V1>=2,V19>=0,V14>=V19+2] 1152.81/291.48 1152.81/291.48 * Chain [37]: 19*s(413)+46*s(414)+10*s(415)+2*s(417)+2*s(419)+1*s(420)+2*s(421)+5*s(422)+3*s(423)+1*s(424)+3*s(425)+21*s(426)+2*s(427)+2*s(428)+2*s(429)+10 1152.81/291.48 Such that:aux(68) =< 1 1152.81/291.48 s(408) =< 2 1152.81/291.48 s(404) =< V1+1 1152.81/291.48 s(403) =< V1-V13+1 1152.81/291.48 s(406) =< V14+1 1152.81/291.48 s(407) =< V13 1152.81/291.48 aux(71) =< V1 1152.81/291.48 aux(72) =< V1-V13 1152.81/291.48 aux(73) =< V14 1152.81/291.48 s(414) =< aux(71) 1152.81/291.48 s(413) =< aux(68) 1152.81/291.48 s(415) =< aux(73) 1152.81/291.48 s(417) =< s(408) 1152.81/291.48 s(418) =< aux(71) 1152.81/291.48 s(419) =< s(414)*s(418) 1152.81/291.48 s(420) =< s(414)*aux(73) 1152.81/291.48 s(421) =< s(414)*aux(71) 1152.81/291.48 s(422) =< s(407) 1152.81/291.48 s(423) =< s(404) 1152.81/291.48 s(424) =< s(414)*s(406) 1152.81/291.48 s(425) =< s(403) 1152.81/291.48 s(426) =< aux(72) 1152.81/291.48 s(427) =< s(426)*s(418) 1152.81/291.48 s(428) =< s(426)*aux(73) 1152.81/291.48 s(429) =< s(426)*aux(71) 1152.81/291.48 1152.81/291.48 with precondition: [V=2,V1>=0,V14>=0,V13>=0,V19>=0] 1152.81/291.48 1152.81/291.48 * Chain [36]: 2*s(441)+9 1152.81/291.48 Such that:aux(74) =< 1 1152.81/291.48 s(441) =< aux(74) 1152.81/291.48 1152.81/291.48 with precondition: [V=2,V1=1,V13=0,V14>=2,V19>=0] 1152.81/291.48 1152.81/291.48 * Chain [35]: 12*s(443)+1*s(446)+1*s(449)+1*s(450)+1*s(451)+9 1152.81/291.48 Such that:s(445) =< 1 1152.81/291.48 aux(75) =< V1 1152.81/291.48 s(443) =< aux(75) 1152.81/291.48 s(446) =< s(445) 1152.81/291.48 s(448) =< aux(75) 1152.81/291.48 s(449) =< s(443)*s(448) 1152.81/291.48 s(450) =< s(443)*s(445) 1152.81/291.48 s(451) =< s(443)*aux(75) 1152.81/291.48 1152.81/291.48 with precondition: [V=2,V14=1,V13=0,V1>=2,V19>=0] 1152.81/291.48 1152.81/291.48 * Chain [34]: 12*s(452)+1*s(454)+1*s(458)+1*s(459)+1*s(460)+9 1152.81/291.48 Such that:s(454) =< 1 1152.81/291.48 s(453) =< V14+1 1152.81/291.48 aux(76) =< V1 1152.81/291.48 s(452) =< aux(76) 1152.81/291.48 s(457) =< aux(76) 1152.81/291.48 s(458) =< s(452)*s(457) 1152.81/291.48 s(459) =< s(452)*s(453) 1152.81/291.48 s(460) =< s(452)*aux(76) 1152.81/291.48 1152.81/291.48 with precondition: [V=2,V13=0,V1>=2,V14>=2,V19>=0] 1152.81/291.48 1152.81/291.48 * Chain [33]: 1 1152.81/291.48 with precondition: [V1=0,V>=0] 1152.81/291.48 1152.81/291.48 * Chain [32]: 12*s(461)+1*s(464)+1*s(467)+1*s(468)+1*s(469)+8 1152.81/291.48 Such that:s(463) =< V1 1152.81/291.48 aux(77) =< V 1152.81/291.48 s(461) =< aux(77) 1152.81/291.48 s(464) =< s(463) 1152.81/291.48 s(466) =< aux(77) 1152.81/291.48 s(467) =< s(461)*s(466) 1152.81/291.48 s(468) =< s(461)*s(463) 1152.81/291.48 s(469) =< s(461)*aux(77) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,V>=2,V1>=1,V13+1>=V1] 1152.81/291.48 1152.81/291.48 * Chain [31]: 1*s(470)+1*s(472)+11*s(474)+1*s(476)+1*s(477)+1*s(478)+8 1152.81/291.48 Such that:s(473) =< V 1152.81/291.48 s(470) =< V+V13 1152.81/291.48 s(471) =< V1+V13+1 1152.81/291.48 s(472) =< V13+1 1152.81/291.48 s(474) =< s(473) 1152.81/291.48 s(475) =< s(473) 1152.81/291.48 s(476) =< s(474)*s(475) 1152.81/291.48 s(477) =< s(474)*s(471) 1152.81/291.48 s(478) =< s(474)*s(473) 1152.81/291.48 1152.81/291.48 with precondition: [V14=0,V>=2,V13>=0,V1>=V13+2] 1152.81/291.48 1152.81/291.48 1152.81/291.48 Closed-form bounds of start(V,V1,V14,V13,V19): 1152.81/291.48 ------------------------------------- 1152.81/291.48 * Chain [44] with precondition: [V>=0,V1>=0] 1152.81/291.48 - Upper bound: 126*V+48+14*V*V+3*V*V1+(V1+1)*(2*V)+nat(V1+V13+1)*V+4*V*nat(V-V14)+22*V1+nat(V14)*5+(6*V+6)+nat(V1+V13)*2*nat(V-V14)+nat(V13+1)*6+nat(V13+2)*2+nat(V+V13+1)*3+nat(V-V14+V13+1)*3+nat(V-V14+V13)+nat(V-V14)*20 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [43] with precondition: [V=1,V1>=0,V14>=0,V13>=0,V19>=0] 1152.81/291.48 - Upper bound: 138*V1+61+12*V1*V1+3*V1*V14+(V14+1)*V1+(V14+V19+1)*V1+(V14+V19+2)*V1+12*V1*nat(V1-V13)+35*V14+2*V14*nat(V1-V13)+5*V13+(3*V1+3)+(2*V14+2*V19)*nat(V1-V13)+(10*V13+10)+(12*V19+12)+(8*V19+16)+(2*V19+6)+(3*V1+3*V19+3)+(3*V1+3*V19+6)+(2*V14+2*V19+2)*nat(V1-V13)+nat(V1-V13+V19+1)*6+nat(V1-V13+V19)*2+nat(V1-V13)*64 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [42] with precondition: [V=1,V1=1,V13=0,V19>=0,V14>=V19+2] 1152.81/291.48 - Upper bound: V19+11 1152.81/291.48 - Complexity: n 1152.81/291.48 * Chain [41] with precondition: [V=1,V14=0,V1>=0,V13>=0,V19>=0] 1152.81/291.48 - Upper bound: 45*V1+35+4*V1*V1+2*V1*nat(V1-V13)+(3*V1+3)+(5*V13+5)+nat(V1-V13)*13 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [40] with precondition: [V=1,V1>=2] 1152.81/291.48 - Upper bound: nat(V13+1)+12 1152.81/291.48 - Complexity: n 1152.81/291.48 * Chain [39] with precondition: [V=1,V13=0,V1>=2,V14>=1,V19+1>=V14] 1152.81/291.48 - Upper bound: 12*V1+9+2*V1*V1+V14*V1+V14 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [38] with precondition: [V=1,V13=0,V1>=2,V19>=0,V14>=V19+2] 1152.81/291.48 - Upper bound: 11*V1+9+2*V1*V1+(V14+V19+1)*V1+(V1+V19)+(V19+1) 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [37] with precondition: [V=2,V1>=0,V14>=0,V13>=0,V19>=0] 1152.81/291.48 - Upper bound: 46*V1+33+4*V1*V1+V14*V1+(V14+1)*V1+4*V1*nat(V1-V13)+10*V14+2*V14*nat(V1-V13)+5*V13+(3*V1+3)+nat(V1-V13+1)*3+nat(V1-V13)*21 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [36] with precondition: [V=2,V1=1,V13=0,V14>=2,V19>=0] 1152.81/291.48 - Upper bound: 11 1152.81/291.48 - Complexity: constant 1152.81/291.48 * Chain [35] with precondition: [V=2,V14=1,V13=0,V1>=2,V19>=0] 1152.81/291.48 - Upper bound: 13*V1+10+2*V1*V1 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [34] with precondition: [V=2,V13=0,V1>=2,V14>=2,V19>=0] 1152.81/291.48 - Upper bound: 12*V1+10+2*V1*V1+(V14+1)*V1 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [33] with precondition: [V1=0,V>=0] 1152.81/291.48 - Upper bound: 1 1152.81/291.48 - Complexity: constant 1152.81/291.48 * Chain [32] with precondition: [V14=0,V>=2,V1>=1,V13+1>=V1] 1152.81/291.48 - Upper bound: 12*V+8+2*V*V+V1*V+V1 1152.81/291.48 - Complexity: n^2 1152.81/291.48 * Chain [31] with precondition: [V14=0,V>=2,V13>=0,V1>=V13+2] 1152.81/291.48 - Upper bound: 11*V+8+2*V*V+(V1+V13+1)*V+(V+V13)+(V13+1) 1152.81/291.48 - Complexity: n^2 1152.81/291.48 1152.81/291.48 ### Maximum cost of start(V,V1,V14,V13,V19): max([max([max([10,nat(V19+1)+9]),nat(V13+1)+7+max([4,2*V*V+11*V+nat(V1+V13+1)*V+nat(V+V13)])]),V1+7+max([10*V1+1+max([max([2*V1*V1+max([max([nat(V14)*V1+nat(V14),nat(V14+1)*V1+1]),32*V1+23+2*V1*V1+2*V1*nat(V1-V13)+(3*V1+3)+nat(V1-V13)*13+max([nat(V13+1)*5+2,nat(V14)*V1+V1+nat(V14+1)*V1+2*V1*nat(V1-V13)+nat(V14)*10+nat(V14)*2*nat(V1-V13)+nat(V13)*5+nat(V1-V13)*8+max([nat(V1-V13+1)*3,92*V1+28+8*V1*V1+2*V1*nat(V14)+nat(V14+V19+1)*V1+nat(V14+V19+2)*V1+8*V1*nat(V1-V13)+nat(V14)*25+nat(V14+V19)*2*nat(V1-V13)+nat(V13+1)*10+nat(V19+1)*12+nat(V19+2)*8+nat(V19+3)*2+nat(V1+V19+1)*3+nat(V1+V19+2)*3+nat(V14+V19+1)*2*nat(V1-V13)+nat(V1-V13+V19+1)*6+nat(V1-V13+V19)*2+nat(V1-V13)*43])])+(V1+1)]),126*V+39+14*V*V+3*V*V1+(V1+1)*(2*V)+nat(V1+V13+1)*V+4*V*nat(V-V14)+10*V1+nat(V14)*5+(6*V+6)+nat(V1+V13)*2*nat(V-V14)+nat(V13+1)*6+nat(V13+2)*2+nat(V+V13+1)*3+nat(V-V14+V13+1)*3+nat(V-V14+V13)+nat(V-V14)*20])+V1,2*V1*V1+nat(V14+V19+1)*V1+nat(V1+V19)+nat(V19+1)]),2*V*V+12*V+V1*V])])+1 1152.81/291.48 Asymptotic class: n^2 1152.81/291.48 * Total analysis performed in 1044 ms. 1152.81/291.48 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (12) 1152.81/291.48 BOUNDS(1, n^2) 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (13) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 1152.81/291.48 Transformed a relative TRS into a decreasing-loop problem. 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (14) 1152.81/291.48 Obligation: 1152.81/291.48 Analyzing the following TRS for decreasing loops: 1152.81/291.48 1152.81/291.48 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1152.81/291.48 1152.81/291.48 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true 1152.81/291.48 le(s(x), 0) -> false 1152.81/291.48 le(s(x), s(y)) -> le(x, y) 1152.81/291.48 mod(x, 0) -> modZeroErro 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) 1152.81/291.48 if(true, x, y, z, u) -> u 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) 1152.81/291.48 1152.81/291.48 S is empty. 1152.81/291.48 Rewrite Strategy: FULL 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (15) DecreasingLoopProof (LOWER BOUND(ID)) 1152.81/291.48 The following loop(s) give(s) rise to the lower bound Omega(n^1): 1152.81/291.48 1152.81/291.48 The rewrite sequence 1152.81/291.48 1152.81/291.48 le(s(x), s(y)) ->^+ le(x, y) 1152.81/291.48 1152.81/291.48 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 1152.81/291.48 1152.81/291.48 The pumping substitution is [x / s(x), y / s(y)]. 1152.81/291.48 1152.81/291.48 The result substitution is [ ]. 1152.81/291.48 1152.81/291.48 1152.81/291.48 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (16) 1152.81/291.48 Complex Obligation (BEST) 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (17) 1152.81/291.48 Obligation: 1152.81/291.48 Proved the lower bound n^1 for the following obligation: 1152.81/291.48 1152.81/291.48 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1152.81/291.48 1152.81/291.48 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true 1152.81/291.48 le(s(x), 0) -> false 1152.81/291.48 le(s(x), s(y)) -> le(x, y) 1152.81/291.48 mod(x, 0) -> modZeroErro 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) 1152.81/291.48 if(true, x, y, z, u) -> u 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) 1152.81/291.48 1152.81/291.48 S is empty. 1152.81/291.48 Rewrite Strategy: FULL 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (18) LowerBoundPropagationProof (FINISHED) 1152.81/291.48 Propagated lower bound. 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (19) 1152.81/291.48 BOUNDS(n^1, INF) 1152.81/291.48 1152.81/291.48 ---------------------------------------- 1152.81/291.48 1152.81/291.48 (20) 1152.81/291.48 Obligation: 1152.81/291.48 Analyzing the following TRS for decreasing loops: 1152.81/291.48 1152.81/291.48 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1152.81/291.48 1152.81/291.48 1152.81/291.48 The TRS R consists of the following rules: 1152.81/291.48 1152.81/291.48 le(0, y) -> true 1152.81/291.48 le(s(x), 0) -> false 1152.81/291.48 le(s(x), s(y)) -> le(x, y) 1152.81/291.48 mod(x, 0) -> modZeroErro 1152.81/291.48 mod(x, s(y)) -> modIter(x, s(y), 0, 0) 1152.81/291.48 modIter(x, s(y), z, u) -> if(le(x, z), x, s(y), z, u) 1152.81/291.48 if(true, x, y, z, u) -> u 1152.81/291.48 if(false, x, y, z, u) -> if2(le(y, s(u)), x, y, s(z), s(u)) 1152.81/291.48 if2(false, x, y, z, u) -> modIter(x, y, z, u) 1152.81/291.48 if2(true, x, y, z, u) -> modIter(x, y, z, 0) 1152.81/291.48 1152.81/291.48 S is empty. 1152.81/291.48 Rewrite Strategy: FULL 1152.99/291.55 EOF