Ciao Preprocessor (integrated Alpha version)
 | This is an alpha distribution, meant only for testing. Please do let us 
 | know at ciaopp-bugclip.dia.fi.upm.es any problems you may have.

{loaded in 3816.238 msec.}
{preprocessed for plai in 4.0 msec.}
{analyzed by plai using eterms with local-control off in 8.0 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using shfr with local-control off in 4.0 msec.}
{preprocessed for nfg in 4.0 msec.}
{analyzed by nfg in 4.001 msec.}
{analysis information stored in 0.0 msec.}
{preprocessed for ub bounds cost analysis in 0.0 msec.}
{ub bounds cost analysis performed in 120.008 msec.}
{ub bounds cost information stored in 0.0 msec.}
{preprocessed for lb bounds cost analysis in 0.0 msec.}
{lb bounds cost analysis performed in 60.003 msec.}
{lb bounds cost information stored in 0.0 msec.}
{written file /tmp/tmpCO8kYm/inorder_eterms_shfr_nfg_resources_co.pl}
:- module(_1,[inorder/2],[assertions,predefres(res_steps),nativeprops,basicmodes,regtypes]).

:- entry inorder(A,B)
         : ground(A).

:- true pred inorder(A,B)
         : ( gnd(A), term(B) )
        => ( rt7(A), list(B,gnd) ).

:- true pred inorder(A,B)
         : ( mshare([[B]]), ground([A]) )
        => ground([A,B]).

:- true pred inorder(A,B)
         : ( gnd(A), term(B) )
        => ( rt7(A), list(B,gnd) )
         + ( possibly_fails, not_covered ).

:- true pred inorder(A,B)
         : ( gnd(A), term(B) )
        => ( rt7(A), list(B,gnd), size(lb,A,size(A)), size(lb,B,size(A)) )
         + cost(lb,steps,0).

:- true pred inorder(A,B)
         : ( gnd(A), term(B) )
        => ( rt7(A), list(B,gnd), size(ub,A,size(A)), size(ub,B,size(A)) )
         + cost(ub,steps,0.5*exp(size(A),2)+2.5*size(A)).

inorder(nil,[]).
inorder(tree(L,V,R),I) :-
        inorder(L,LI),
        inorder(R,RI),
        append(LI,[V|RI],I).

:- true pred append(_1,X,_2)
         : ( list(_1,gnd), rt12(X), term(_2) )
        => ( list(_1,gnd), rt12(X), rt12(_2) ).

:- true pred append(_1,X,_2)
         : ( mshare([[_2]]), ground([_1,X]) )
        => ground([_1,X,_2]).

:- true pred append(_1,X,_2)
         : ( list(_1,gnd), rt12(X), term(_2) )
        => ( list(_1,gnd), rt12(X), rt12(_2) )
         + ( possibly_fails, not_covered ).

:- true pred append(_1,X,_2)
         : ( list(_1,gnd), rt12(X), term(_2) )
        => ( list(_1,gnd), rt12(X), rt12(_2), size(lb,_1,length(_1)), size(lb,X,length(X)), size(lb,_2,length(X)+length(_1)) )
         + cost(lb,steps,0).

:- true pred append(_1,X,_2)
         : ( list(_1,gnd), rt12(X), term(_2) )
        => ( list(_1,gnd), rt12(X), rt12(_2), size(ub,_1,length(_1)), size(ub,X,length(X)), size(ub,_2,length(X)+length(_1)) )
         + cost(ub,steps,length(_1)+1).

append([],X,X).
append([X|Xs],Ys,[X|Zs]) :-
        append(Xs,Ys,Zs).


:- regtype rt12/1.

rt12([A|B]) :-
        gnd(A),
        list(B,gnd).


:- regtype rt7/1.

rt7(nil).
rt7(tree(A,B,C)) :-
        rt7(A),
        gnd(B),
        rt7(C).