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/tmprWDMnj/samefringe.pl
}
{loaded in 3372.21 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 8.001 msec.}
{written file /tmp/tmprWDMnj/samefringe_det_co.pl}
:- module(_1,[samefringe/2],[assertions]).

:- true pred gopher(cons(_1,_2),cons(_3,_4))
         : ( native_props:mshare([[_3],[_4]]), var(_3), var(_4), ground([_1,_2]), gnd(_1), gnd(_2), term(_3), term(_4) )
        => ( ground([_1,_2,_3,_4]), rt19(_1), rt22(_2), rt17(_3), rt23(_4) )
         + ( is_det, mut_exclusive ).

:- true pred gopher(cons(_1,cons(_2,_3)),X)
         : ( native_props:mshare([[X]]), ground([_1,_2,_3]), rt4(X), gnd(_1), gnd(_2), gnd(_3) )
        => ( ground([X,_1,_2,_3]), rt6(X), rt14(_1), gnd(_2), rt13(_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).

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

:- true pred samefringe(A,B)
         : ( ground([A,B]), gnd(A), gnd(B) )
        => ( ground([A,B]), rt28(A), rt33(B) )
         + ( is_det, mut_exclusive ).

samefringe(nil,nil).
samefringe(cons(U,V),cons(X,Y)) :-
        gopher(cons(U,V),cons(U1,V1)),
        gopher(cons(X,Y),cons(X1,Y1)),
        samefringe(V1,Y1).


:- regtype rt32/1.

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


:- regtype rt31/1.

rt31(nil).
rt31(cons(A,B)) :-
        rt32(A),
        gnd(B).


:- regtype rt30/1.

rt30(nil).
rt30(cons(A,B)) :-
        rt31(A),
        gnd(B).


:- regtype rt29/1.

rt29(A) :-
        gnd(A).
rt29(nil).
rt29(cons(A,B)) :-
        rt30(A),
        rt29(B).


:- regtype rt28/1.

rt28(nil).
rt28(cons(A,B)) :-
        rt30(A),
        rt29(B).


:- regtype rt37/1.

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


:- regtype rt36/1.

rt36(nil).
rt36(cons(A,B)) :-
        rt37(A),
        gnd(B).


:- regtype rt35/1.

rt35(nil).
rt35(cons(A,B)) :-
        rt36(A),
        gnd(B).


:- regtype rt34/1.

rt34(A) :-
        gnd(A).
rt34(nil).
rt34(cons(A,B)) :-
        rt35(A),
        rt34(B).


:- regtype rt33/1.

rt33(nil).
rt33(cons(A,B)) :-
        rt35(A),
        rt34(B).


:- regtype rt21/1.

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


:- regtype rt20/1.

rt20(nil).
rt20(cons(A,B)) :-
        rt21(A),
        gnd(B).


:- regtype rt19/1.

rt19(nil).
rt19(cons(A,B)) :-
        rt20(A),
        gnd(B).


:- regtype rt22/1.

rt22(A) :-
        gnd(A).


:- regtype rt17/1.

rt17(nil).


:- regtype rt23/1.

rt23(A) :-
        gnd(A).


:- regtype rt4/1.

rt4(cons(A,B)) :-
        term(A),
        term(B).


:- regtype rt5/1.

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


:- regtype rt6/1.

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


:- regtype rt15/1.

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


:- regtype rt14/1.

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


:- regtype rt13/1.

rt13(A) :-
        gnd(A).