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.

{Reading /tmp/tmpU1jJUV/map.pl
}
{loaded in 3420.213 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 4.0 msec.}
{written file /tmp/tmpU1jJUV/map_det_co.pl}
:- module(_1,[map/2],[assertions]).

:- entry map(A,B)
         : ground(A).

:- true pred map(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 ).

map([],L) :-
        !,
        eq(L,[]).
map(X,[Y|Ys]) :-
        head(X,H),
        tail(X,T),
        p(H,Y),
        map(T,Ys).

:- true pred head(_2,_1)
         : ( native_props:mshare([[_1]]), var(_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 p(X,Y)
         : ( native_props:mshare([[X],[Y]]), term(X), term(Y) )
        => ( native_props:mshare([[X],[Y]]), term(X), term(Y) )
         + ( is_det, mut_exclusive ).

p(X,Y).

:- 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]) :-
        term(A),
        rt14(B).


:- regtype rt13/1.

rt13([]).
rt13([A|B]) :-
        term(A),
        rt14(B).


:- 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([]).