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 3400.213 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.001 msec.}
{preprocessed for nfg in 0.0 msec.}
{analyzed by nfg in 4.0 msec.}
{analysis information stored in 0.0 msec.}
{NOTE (infercost): Using non-parametric cost analysis}
{preprocessed for lower bounds cost analysis in 0.0 msec.}
{lower bounds cost analysis performed in 0.0 msec.}
{lower bounds cost information stored in 0.0 msec.}
{preprocessed for upper bounds cost analysis in 0.0 msec.}
{upper bounds cost analysis performed in 4.001 msec.}
{upper bounds cost information stored in 0.0 msec.}
{written file /tmp/tmpUEL4KV/inorder_eterms_shfr_nfg_steps_ualb_co.pl}
:- module(_1,[inorder/2],[assertions,regtypes,nativeprops]).

:- 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)
         : ( native_props: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)), size_ub(A,size(A)), size_ub(B,size(A)) )
         + ( steps_lb(0), steps_ub(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)
         : ( native_props: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)), size_ub(_1,length(_1)), size_ub(X,length(X)), size_ub(_2,length(X)+length(_1)) )
         + ( steps_lb(0), steps_ub(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).