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 3736.234 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using eterms with local-control off in 4.001 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using shfr with local-control off in 0.0 msec.}
{preprocessed for nfg in 0.0 msec.}
{analyzed by nfg in 0.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 24.001 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 12.001 msec.}
{lb bounds cost information stored in 0.0 msec.}
{written file /tmp/tmpnOqCBl/length_eterms_shfr_nfg_resources_co.pl}
:- module(_1,[len/2],[assertions,predefres(res_steps),nativeprops,basicmodes,regtypes]).
:- entry len(A,B)
: ground(A).
:- true pred len(A,B)
: ( gnd(A), term(B) )
=> ( list(A,gnd), rt8(B) ).
:- true pred len(A,B)
: ( mshare([[B]]), ground([A]) )
=> ground([A,B]).
:- true pred len(A,B)
: ( gnd(A), term(B) )
=> ( list(A,gnd), rt8(B) )
+ ( possibly_fails, not_covered ).
:- true pred len(A,B)
: ( gnd(A), term(B) )
=> ( list(A,gnd), rt8(B), size(lb,A,length(A)), size(lb,B,length(A)+1) )
+ cost(lb,steps,0).
:- true pred len(A,B)
: ( gnd(A), term(B) )
=> ( list(A,gnd), rt8(B), size(ub,A,length(A)), size(ub,B,length(A)+1) )
+ cost(ub,steps,length(A)+1).
len([],0).
len([_1|Ts],s(N)) :-
len(Ts,N).
:- regtype rt8/1.
rt8(0).
rt8(s(A)) :-
rt8(A).