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 3420.213 msec.}
{preprocessed for plai in 4.0 msec.}
{analyzed by plai using det with local-control off in 20.001 msec.}
{written file /tmp/tmpMdz7ma/lessleaves_det_co.pl}
:- module(_1,[lessleaves/2],[assertions]).
:- entry lessleaves(A,B)
: ( ground(A), ground(B) ).
:- true pred lessleaves(A,B)
: ( ground([A,B]), gnd(A), gnd(B) )
=> ( ground([A,B]), rt57(A), rt62(B) )
+ ( is_det, mut_exclusive ).
:- true pred lessleaves(A,B)
: ( native_props:mshare([[A],[B]]), rt15(A), rt15(B) )
=> ( native_props:mshare([[A],[B]]), rt45(A), rt50(B) )
+ ( is_det, mut_exclusive ).
:- true pred lessleaves(A,B)
: ( native_props:mshare([[A],[B]]), term(A), term(B) )
=> ( native_props:mshare([[A],[B]]), rt37(A), rt33(B) )
+ ( is_det, mut_exclusive ).
lessleaves(nil,cons(_1,_2)).
lessleaves(cons(U,V),cons(W,Z)) :-
app(U,V,U1),
app(W,Z,W1),
lessleaves(U1,W1).
:- true pred app(X,Y,Z)
: ( native_props:mshare([[X],[X,Y],[Y],[Z]]), var(Z), term(X), term(Y), term(Z) )
=> ( native_props:mshare([[X],[X,Y,Z],[X,Z],[Y,Z],[Z]]), rt29(X), term(Y), term(Z) )
+ ( is_det, mut_exclusive ).
:- true pred app(X,Y,Z)
: ( native_props:mshare([[Z]]), var(Z), ground([X,Y]), gnd(X), gnd(Y), term(Z) )
=> ( native_props:mshare([[Z]]), ground([X,Y]), rt13(X), gnd(Y), rt15(Z) )
+ ( is_det, mut_exclusive ).
app(nil,Y,Z) :-
!,
eq(Y,Z).
app(X,Y,cons(U,Z)) :-
head(X,U),
tail(X,V),
app(V,Y,Z).
:- true pred head(_2,_1)
: ( native_props:mshare([[_2],[_1]]), var(_1), term(_2), term(_1) )
=> ( native_props:mshare([[_2],[_2,_1],[_1]]), rt22(_2), term(_1) )
+ ( is_det, mut_exclusive ).
:- true pred head(_2,_1)
: ( native_props:mshare([[_1]]), var(_1), ground([_2]), gnd(_2), term(_1) )
=> ( native_props:mshare([[_1]]), ground([_2]), rt5(_2), term(_1) )
+ ( is_det, mut_exclusive ).
head([],_1).
head([X|_1],X).
:- true pred tail(_1,X)
: ( native_props:mshare([[_1],[X]]), var(X), rt22(_1), term(X) )
=> ( native_props:mshare([[_1],[_1,X]]), rt26(_1), term(X) )
+ ( is_det, mut_exclusive ).
:- true pred tail(_1,X)
: ( native_props:mshare([[X]]), var(X), ground([_1]), rt5(_1), term(X) )
=> ( ground([_1,X]), rt9(_1), gnd(X) )
+ ( is_det, mut_exclusive ).
tail([],[]).
tail([_1|X],X).
:- true pred eq(X,_1)
: ( native_props:mshare([[X],[_1]]), var(_1), term(X), term(_1) )
=> ( native_props:mshare([[X,_1]]), term(X), term(_1) )
+ ( is_det, mut_exclusive ).
:- true pred eq(X,_1)
: ( native_props:mshare([[_1]]), var(_1), ground([X]), gnd(X), term(_1) )
=> ( ground([X,_1]), gnd(X), gnd(_1) )
+ ( is_det, mut_exclusive ).
eq(X,X).
:- regtype rt61/1.
rt61([]).
rt61(A) :-
gnd(A).
rt61(nil).
rt61([A|B]) :-
rt61(A),
rt60(B).
:- regtype rt60/1.
rt60([]).
rt60(A) :-
gnd(A).
rt60(nil).
rt60([A|B]) :-
rt61(A),
rt60(B).
:- regtype rt59/1.
rt59([]).
rt59(nil).
rt59([A|B]) :-
rt61(A),
rt60(B).
:- regtype rt58/1.
rt58(A) :-
gnd(A).
:- regtype rt57/1.
rt57(nil).
rt57(cons(A,B)) :-
rt59(A),
rt58(B).
:- regtype rt64/1.
rt64(A) :-
gnd(A).
:- regtype rt63/1.
rt63(A) :-
gnd(A).
:- regtype rt62/1.
rt62(cons(A,B)) :-
rt64(A),
rt63(B).
:- regtype rt16/1.
rt16(A) :-
gnd(A).
rt16(cons(A,B)) :-
term(A),
rt16(B).
:- regtype rt15/1.
rt15(A) :-
gnd(A).
rt15(cons(A,B)) :-
term(A),
rt16(B).
:- regtype rt49/1.
rt49([]).
rt49(A) :-
term(A).
rt49(nil).
rt49([A|B]) :-
rt49(A),
rt48(B).
:- regtype rt48/1.
rt48([]).
rt48(A) :-
term(A).
rt48(nil).
rt48([A|B]) :-
rt49(A),
rt48(B).
:- regtype rt47/1.
rt47([]).
rt47(nil).
rt47([A|B]) :-
rt49(A),
rt48(B).
:- regtype rt46/1.
rt46(A) :-
term(A).
rt46(nil).
rt46(cons(A,B)) :-
rt47(A),
rt46(B).
:- regtype rt45/1.
rt45(nil).
rt45(cons(A,B)) :-
rt47(A),
rt46(B).
:- regtype rt52/1.
rt52(A) :-
term(A).
:- regtype rt51/1.
rt51(A) :-
term(A).
rt51(cons(A,B)) :-
rt52(A),
rt51(B).
:- regtype rt50/1.
rt50(cons(A,B)) :-
rt52(A),
rt51(B).
:- regtype rt41/1.
rt41([]).
rt41(A) :-
term(A).
rt41(nil).
rt41([A|B]) :-
rt41(A),
rt40(B).
:- regtype rt40/1.
rt40([]).
rt40(A) :-
term(A).
rt40(nil).
rt40([A|B]) :-
rt41(A),
rt40(B).
:- regtype rt39/1.
rt39([]).
rt39(nil).
rt39([A|B]) :-
rt41(A),
rt40(B).
:- regtype rt38/1.
rt38(A) :-
term(A).
rt38(nil).
rt38(cons(A,B)) :-
rt39(A),
rt38(B).
:- regtype rt37/1.
rt37(nil).
rt37(cons(A,B)) :-
rt39(A),
rt38(B).
:- regtype rt33/1.
rt33(cons(A,B)) :-
term(A),
term(B).
:- regtype rt31/1.
rt31([]).
rt31(A) :-
term(A).
rt31(nil).
rt31([A|B]) :-
rt31(A),
rt30(B).
:- regtype rt30/1.
rt30([]).
rt30(A) :-
term(A).
rt30(nil).
rt30([A|B]) :-
rt31(A),
rt30(B).
:- regtype rt29/1.
rt29([]).
rt29(nil).
rt29([A|B]) :-
rt31(A),
rt30(B).
:- regtype rt22/1.
rt22([]).
rt22([A|B]) :-
term(A),
term(B).
:- regtype rt26/1.
rt26([]).
rt26([A|B]) :-
term(A),
term(B).
:- regtype rt14/1.
rt14([]).
rt14(A) :-
gnd(A).
rt14(nil).
rt14([A|B]) :-
gnd(A),
rt14(B).
:- regtype rt13/1.
rt13([]).
rt13(nil).
rt13([A|B]) :-
gnd(A),
rt14(B).
:- regtype rt5/1.
rt5([]).
rt5([A|B]) :-
gnd(A),
gnd(B).
:- regtype rt9/1.
rt9([]).
rt9([A|B]) :-
gnd(A),
gnd(B).