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 3400.212 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 4.0 msec.}
{written file /tmp/tmpEYLvA_/duplicate1_det_co.pl}
:- module(_1,[duplicate/2],[assertions]).
:- entry duplicate(A,B)
: ground(A).
:- true pred duplicate(A,B)
: ( native_props:mshare([[B]]), ground([A]), gnd(A), term(B) )
=> ( native_props:mshare([[B]]), ground([A]), rt11(A), rt13(B) )
+ ( is_det, mut_exclusive ).
duplicate([],L) :-
!,
eq(L,[]).
duplicate(X,[H,H|Z]) :-
head(X,H),
tail(X,T),
duplicate(T,Z).
:- true pred head(_2,_1)
: ( native_props:mshare([[_1]]), ground([_2]), gnd(_2), term(_1) )
=> ( native_props:mshare([[_1]]), ground([_2]), rt4(_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]), rt4(_1), term(T) )
=> ( ground([_1,T]), rt8(_1), gnd(T) )
+ ( is_det, mut_exclusive ).
tail([],[]).
tail([_1|T],T).
:- true pred eq(X,[])
: ( native_props:mshare([[X]]), term(X) )
=> ( ground([X]), rt0(X) )
+ ( is_det, mut_exclusive ).
eq(X,X).
:- regtype rt12/1.
rt12([]).
rt12(A) :-
gnd(A).
rt12([A|B]) :-
gnd(A),
rt12(B).
:- regtype rt11/1.
rt11([]).
rt11([A|B]) :-
gnd(A),
rt12(B).
:- regtype rt14/1.
rt14([]).
rt14([A,B|C]) :-
term(A),
term(B),
rt14(C).
:- regtype rt13/1.
rt13([]).
rt13([A,B|C]) :-
term(A),
term(B),
rt14(C).
:- regtype rt4/1.
rt4([]).
rt4([A|B]) :-
gnd(A),
gnd(B).
:- regtype rt8/1.
rt8([]).
rt8([A|B]) :-
gnd(A),
gnd(B).
:- regtype rt0/1.
rt0([]).