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 3356.209 msec.}
{preprocessed for plai in 4.0 msec.}
{analyzed by plai using det with local-control off in 4.0 msec.}
{written file /tmp/tmp_8Ygok/gopher_det_co.pl}
:- module(_1,[gopher/2],[assertions]).

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

:- true pred gopher(A,B)
         : ( native_props:mshare([[B]]), ground([A]), gnd(A), term(B) )
        => ( ground([A,B]), rt21(A), rt26(B) )
         + ( is_det, mut_exclusive ).

:- true pred gopher(cons(_1,cons(_2,_3)),B)
         : ( native_props:mshare([[B]]), ground([_1,_2,_3]), term(B), gnd(_1), gnd(_2), gnd(_3) )
        => ( ground([B,_1,_2,_3]), rt7(B), rt15(_1), gnd(_2), rt14(_3) )
         + ( is_det, mut_exclusive ).

gopher(nil,nil).
gopher(cons(nil,Y),cons(nil,Y)).
gopher(cons(cons(U,V),W),X) :-
        gopher(cons(U,cons(V,W)),X).


:- regtype rt25/1.

rt25(nil).
rt25(cons(A,B)) :-
        rt25(A),
        gnd(B).


:- regtype rt24/1.

rt24(nil).
rt24(cons(A,B)) :-
        rt25(A),
        gnd(B).


:- regtype rt23/1.

rt23(nil).
rt23(cons(A,B)) :-
        rt24(A),
        gnd(B).


:- regtype rt22/1.

rt22(A) :-
        gnd(A).


:- regtype rt21/1.

rt21(nil).
rt21(cons(A,B)) :-
        rt23(A),
        rt22(B).


:- regtype rt27/1.

rt27(A) :-
        gnd(A).


:- regtype rt26/1.

rt26(nil).
rt26(cons(nil,A)) :-
        rt27(A).


:- regtype rt6/1.

rt6(cons(A,B)) :-
        gnd(A),
        gnd(B).


:- regtype rt7/1.

rt7(cons(nil,A)) :-
        rt6(A).


:- regtype rt16/1.

rt16(nil).
rt16(cons(A,B)) :-
        rt16(A),
        gnd(B).


:- regtype rt15/1.

rt15(nil).
rt15(cons(A,B)) :-
        rt16(A),
        gnd(B).


:- regtype rt14/1.

rt14(A) :-
        gnd(A).