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 3424.214 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 8.001 msec.}
{written file /tmp/tmpYrk3Th/app1_det_co.pl}
:- module(_1,[app/3],[assertions]).

:- entry app(A,B,C)
         : ground(A).

:- true pred app(A,B,C)
         : ( native_props:mshare([[B],[B,C],[C]]), ground([A]), gnd(A), term(B), term(C) )
        => ( native_props:mshare([[B,C],[C]]), ground([A]), rt9(A), term(B), term(C) )
         + ( is_det, mut_exclusive ).

app([],Y,Z) :-
        !,
        eq(Y,Z).
app(X,Y,[H|Z]) :-
        head(X,H),
        tail(X,T),
        app(T,Y,Z).

:- true pred head(_2,_1)
         : ( native_props:mshare([[_1]]), ground([_2]), gnd(_2), term(_1) )
        => ( native_props:mshare([[_1]]), ground([_2]), rt3(_2), term(_1) )
         + ( is_det, mut_exclusive ).

head([],_1).
head([X|_1],X).

:- true pred tail(_1,Xs)
         : ( native_props:mshare([[Xs]]), var(Xs), ground([_1]), rt3(_1), term(Xs) )
        => ( ground([_1,Xs]), rt7(_1), gnd(Xs) )
         + ( is_det, mut_exclusive ).

tail([],[]).
tail([_1|Xs],Xs).

:- true pred eq(X,_1)
         : ( native_props:mshare([[X],[X,_1],[_1]]), term(X), term(_1) )
        => ( native_props:mshare([[X,_1]]), term(X), term(_1) )
         + ( is_det, mut_exclusive ).

eq(X,X).


:- regtype rt10/1.

rt10([]).
rt10(A) :-
        gnd(A).
rt10([A|B]) :-
        gnd(A),
        rt10(B).


:- regtype rt9/1.

rt9([]).
rt9([A|B]) :-
        gnd(A),
        rt10(B).


:- regtype rt3/1.

rt3([]).
rt3([A|B]) :-
        gnd(A),
        gnd(B).


:- regtype rt7/1.

rt7([]).
rt7([A|B]) :-
        gnd(A),
        gnd(B).