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 3408.213 msec.}
{preprocessed for plai in 4.001 msec.}
{analyzed by plai using eterms with local-control off in 20.001 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.001 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 4.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.0 msec.}
{upper bounds cost information stored in 0.0 msec.}
{written file /tmp/tmpUCukXu/naive_rev_eterms_shfr_nfg_steps_ualb_co.pl}
:- module(_1,[reverse/2],[assertions,regtypes,nativeprops]).

:- true pred app(_1,Ys,_2)
         : ( list(_1,gnd), rt2(Ys), term(_2) )
        => ( list(_1,gnd), rt19(Ys), rt19(_2) ).

:- true pred app(_1,Ys,_2)
         : ( native_props:mshare([[_2]]), ground([_1,Ys]) )
        => ground([_1,Ys,_2]).

:- true pred app(_1,Ys,_2)
         : ( list(_1,gnd), rt2(Ys), term(_2) )
        => ( list(_1,gnd), rt19(Ys), rt19(_2) )
         + ( possibly_fails, not_covered ).

:- true pred app(_1,Ys,_2)
         : ( list(_1,gnd), rt2(Ys), term(_2) )
        => ( list(_1,gnd), rt19(Ys), rt19(_2), size_lb(_1,length(_1)), size_lb(Ys,length(Ys)), size_lb(_2,length(Ys)+length(_1)), size_ub(_1,length(_1)), size_ub(Ys,length(Ys)), size_ub(_2,length(Ys)+length(_1)) )
         + ( steps_lb(0), steps_ub(length(_1)+1) ).

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

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

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

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

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

:- true pred reverse(A,B)
         : ( gnd(A), term(B) )
        => ( list(A,gnd), list(B,gnd), size_lb(A,length(A)), size_lb(B,length(A)), size_ub(A,length(A)), size_ub(B,length(A)) )
         + ( steps_lb(0), steps_ub(0.5*exp(length(A),2)+1.5*length(A)+1) ).

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


:- regtype rt2/1.

rt2([A]) :-
        gnd(A).


:- regtype rt19/1.

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