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 3796.237 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.0 msec.}
{preprocessed for nfg in 4.0 msec.}
{analyzed by nfg in 4.0 msec.}
{analysis information stored in 0.0 msec.}
{preprocessed for ub bounds cost analysis in 0.0 msec.}
{ub bounds cost analysis performed in 100.006 msec.}
{ub bounds cost information stored in 0.0 msec.}
{preprocessed for lb bounds cost analysis in 4.0 msec.}
{lb bounds cost analysis performed in 52.004 msec.}
{lb bounds cost information stored in 0.0 msec.}
{written file /tmp/tmpCDgZAv/naive_rev_eterms_shfr_nfg_resources_co.pl}
:- module(_1,[reverse/2],[assertions,predefres(res_steps),nativeprops,basicmodes,regtypes]).
:- 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)
: ( 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)) )
+ cost(lb,steps,0).
:- true pred app(_1,Ys,_2)
: ( list(_1,gnd), rt2(Ys), term(_2) )
=> ( list(_1,gnd), rt19(Ys), rt19(_2), size(ub,_1,length(_1)), size(ub,Ys,length(Ys)), size(ub,_2,length(Ys)+length(_1)) )
+ cost(ub,steps,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)
: ( 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)) )
+ cost(lb,steps,0).
:- true pred reverse(A,B)
: ( gnd(A), term(B) )
=> ( list(A,gnd), list(B,gnd), size(ub,A,length(A)), size(ub,B,length(A)) )
+ cost(ub,steps,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).