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 3368.211 msec.}
{preprocessed for plai in 4.0 msec.}
{analyzed by plai using det with local-control off in 0.0 msec.}
{written file /tmp/tmp5p3tSc/fold3_det_co.pl}
:- module(_1,[fold/3],[assertions]).
:- entry fold(A,B,C)
: ( ground(A), ground(B) ).
:- true pred fold(A,B,C)
: ( native_props:mshare([[C]]), ground([A,B]), gnd(A), gnd(B), term(C) )
=> ( ground([A,B,C]), gnd(A), rt17(B), gnd(C) )
+ ( is_det, mut_exclusive ).
:- true pred fold(A,B,C)
: ( native_props:mshare([[C]]), ground([A,B]), rt10(A), gnd(B), term(C) )
=> ( ground([A,B,C]), rt12(A), rt15(B), rt10(C) )
+ ( is_det, mut_exclusive ).
fold(X,[],Z) :-
!,
eq(X,Z).
fold(X,Y,Z) :-
head(Y,H),
tail(Y,T),
myop(X,H,V),
fold(V,T,Z).
:- true pred myop(_1,_2,_3)
: ( native_props:mshare([[_2],[_3]]), var(_3), ground([_1]), rt10(_1), term(_2), term(_3) )
=> ( ground([_1,_2,_3]), rt12(_1), rt13(_2), rt14(_3) )
+ ( is_det, mut_exclusive ).
:- true pred myop(_1,_2,_3)
: ( native_props:mshare([[_2],[_3]]), var(_3), ground([_1]), gnd(_1), term(_2), term(_3) )
=> ( ground([_1,_2,_3]), rt8(_1), rt9(_2), rt10(_3) )
+ ( is_det, mut_exclusive ).
myop(a,b,a).
:- true pred head(_2,_1)
: ( native_props:mshare([[_1]]), var(_1), ground([_2]), gnd(_2), term(_1) )
=> ( native_props:mshare([[_1]]), ground([_2]), rt3(_2), term(_1) )
+ ( is_det, mut_exclusive ).
head([],_1).
head([H|_1],H).
:- true pred tail(_1,T)
: ( native_props:mshare([[T]]), var(T), ground([_1]), rt3(_1), term(T) )
=> ( ground([_1,T]), rt7(_1), gnd(T) )
+ ( is_det, mut_exclusive ).
tail([],[]).
tail([_1|T],T).
:- true pred eq(X,_1)
: ( native_props:mshare([[_1]]), ground([X]), rt10(X), term(_1) )
=> ( ground([X,_1]), rt10(X), rt10(_1) )
+ ( is_det, mut_exclusive ).
:- true pred eq(X,_1)
: ( native_props:mshare([[_1]]), ground([X]), gnd(X), term(_1) )
=> ( ground([X,_1]), gnd(X), gnd(_1) )
+ ( is_det, mut_exclusive ).
eq(X,X).
:- regtype rt18/1.
rt18([]).
rt18(A) :-
gnd(A).
rt18([A|B]) :-
gnd(A),
rt18(B).
:- regtype rt17/1.
rt17([]).
rt17([A|B]) :-
gnd(A),
rt18(B).
:- regtype rt10/1.
rt10(a).
:- regtype rt12/1.
rt12(a).
:- regtype rt16/1.
rt16([]).
rt16(A) :-
gnd(A).
rt16([A|B]) :-
gnd(A),
rt16(B).
:- regtype rt15/1.
rt15([]).
rt15([A|B]) :-
gnd(A),
rt16(B).
:- regtype rt13/1.
rt13(b).
:- regtype rt14/1.
rt14(a).
:- regtype rt3/1.
rt3([]).
rt3([A|B]) :-
gnd(A),
gnd(B).
:- regtype rt7/1.
rt7([]).
rt7([A|B]) :-
gnd(A),
gnd(B).
:- regtype rt8/1.
rt8(a).
:- regtype rt9/1.
rt9(b).