Abs program loaded in 3 ms. Rule based representation generated in 1 ms. Rule based representation stored in /tmp/costabs/rbr.rbr RBR properties stored in /tmp/costabs/rbr.properties Class invariants generated and loaded in 1 ms. Size abstraction not supported for native Abstract compilation performed in 0 ms. sabu_memo_table_1(case_0,[A,B],[1*B=1,1*A=1],0,0) sabu_memo_table_1(flip,[A,B],[1*A=1,1*B=1],0,0) sabu_memo_table_1(case_0,[A,B],[-1*A>= -2,-1*A+1*B>=0,1*A>=1],1,1) sabu_memo_table_1(flip,[A,B],[-1*A>= -2,-1*A+1*B>=0,1*A>=1],2,1) sabu_memo_table_1(case_0,[A,B],[-1*A>= -3,1*A>=1,-1*A+1*B>=0],3,2) sabu_memo_table_1(flip,[A,B],[-1*A>= -3,1*A>=1,-1*A+1*B>=0],4,2) sabu_memo_table_1(case_0,[A,B],[-1*A>= -4,1*A>=1,-1*A+1*B>=0],5,3) sabu_memo_table_1(flip,[A,B],[-1*A>= -4,1*A>=1,-1*A+1*B>=0],6,3) sabu_memo_table_1(case_0,[A,B],[-1*A+1*B>=0,1*A>=1],7,0) sabu_memo_table_1(flip,[A,B],[-1*A+1*B>=0,1*A>=1],8,0) sabu_memo_table_1(start,[A,B],[1*A>=1,-1*A+1*B>=0],0,0) sabu_memo_table_1(start,[A,B],[],0,1) :- dynamic sabu_memo_table_1/5. sabu_memo_table_1(case_0, [A, B], [-1*A+1*B>=0, 1*A>=1], 7, 0). sabu_memo_table_1(flip, [A, B], [-1*A+1*B>=0, 1*A>=1], 8, 0). sabu_memo_table_1(start, [_, _], [], 0, 1). Size analysis performed in 4 ms. Cost relation system stored in /tmp/costabs/crs.crs Generated 28 equations Cost relation system solved by PUBS in 8 ms. Method start terminates?: YES UB for start(w) = nat(w) Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [case_0/1,flip/1] 1. non_recursive : [start/1] Warning: the following predicates are never called:[and_op/2,eq/2,geq/2,gt/2,leq/2,lt/2,maxNorm/2,neg/1,neq/2,or/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into flip/1 1. SCC is partially evaluated into start/1 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations flip/1 * CE 5 is refined into CE [6] * CE 4 is refined into CE [7] * CE 3 is refined into CE [8] #### Refined cost equations flip/1 * CE 6: flip(A) = 6+ flip(B) [A>=2,A=B+1] * CE 7: flip(A) = 5+ flip(B) [A>=2,A=B+1] * CE 8: flip(A) = 3 [A=1] ### Cost equations --> "Loop" of flip/1 * CEs [8] --> Loop 6 * CEs [7] --> Loop 7 * CEs [6] --> Loop 8 #### Loops of flip/1 * Loop 6: flip(A) [A=1] * Loop 7: flip(A)-> flip(A') [A>=2,A=A'+1] * Loop 8: flip(A)-> flip(A') [A>=2,A=A'+1] ### Ranking functions of CR flip(A) * RF of phase [7,8]: [A-1] #### Partial ranking functions of CR flip(A) * Partial RF of phase [7,8]: - RF of loop [7:1,8:1]: A-1 ### Resulting Chains:flip(A) * [[7,8],6] * [6] ### Specialization of cost equations start/1 * CE 2 is refined into CE [9,10] * CE 1 is refined into CE [11] #### Refined cost equations start/1 * CE 9: start(A) = 1+ flip(A):[[7,8],6] [A>=2] * CE 10: start(A) = 1+ flip(B):[6] [B=1,A=1] * CE 11: start(A) = 1 [] ### Cost equations --> "Loop" of start/1 * CEs [9] --> Loop 9 * CEs [10] --> Loop 10 * CEs [11] --> Loop 11 #### Loops of start/1 * Loop 9: start(A) [A>=2] * Loop 10: start(A) [A=1] * Loop 11: start(A) [] ### Ranking functions of CR start(A) #### Partial ranking functions of CR start(A) ### Resulting Chains:start(A) * [11] * [10] * [9] Computing Bounds ===================================== #### Cost of loops [7,8] * loop 7:flip(A) -> [flip(A')] 5 * loop 8:flip(A) -> [flip(A')] 6 #### Cost of phase [7,8]:flip(A) -> [flip(A')] 5*it(7)+6*it(8)+0 Such that:it(7)+it(8) =< A-1 it(7)+it(8) =< A-A' it(7)+it(8) >= A-A' #### Cost of chains of flip(A): * Chain [[7,8],6]: 5*it(7)+6*it(8)+3 Such that:it(7)+it(8) =< A-1 it(7)+it(8) >= A-1 with precondition: [A>=2] * Chain [6]: 3 with precondition: [A=1] #### Cost of chains of start(A): * Chain [11]: 1 with precondition: [] * Chain [10]: 4 with precondition: [A=1] * Chain [9]: 5*s(1)+6*s(2)+4 Such that:s(1)+s(2) =< A-1 s(1)+s(2) >= A-1 with precondition: [A>=2] Closed-form bounds of start(A): ------------------------------------- * Chain [11] with precondition: [] - Lower bound: 1 - Complexity: constant * Chain [10] with precondition: [A=1] - Lower bound: 4 - Complexity: constant * Chain [9] with precondition: [A>=2] - Lower bound: 5*A-1 - Complexity: n ### Partitioned lower bound of start(A): * 1 if [] Possible lower bounds : [1] Maximum lower bound complexity: constant * Total analysis performed in 20 ms.