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 3396.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/tmpE11l_z/tree_det_co.pl}
:- module(_1,[bin_tree/1],[assertions]).

:- entry bin_tree(A)
         : ground(A).

:- true pred bin_tree(A)
         : ( ground([A]), gnd(A) )
        => ( ground([A]), rt9(A) )
         + ( is_det, mut_exclusive ).

bin_tree(void) :- !.
bin_tree(T) :-
        left(T,L),
        right(T,R),
        bin_tree(L),
        bin_tree(R).

:- true pred left(_1,L)
         : ( native_props:mshare([[L]]), var(L), ground([_1]), gnd(_1), term(L) )
        => ( ground([_1,L]), rt4(_1), gnd(L) )
         + ( is_det, mut_exclusive ).

left(void,void).
left(tree(_1,L,_2),L).

:- true pred right(_1,R)
         : ( native_props:mshare([[R]]), var(R), ground([_1]), rt4(_1), term(R) )
        => ( ground([_1,R]), rt8(_1), gnd(R) )
         + ( is_det, mut_exclusive ).

right(void,void).
right(tree(_1,_2,R),R).


:- regtype rt11/1.

rt11(A) :-
        gnd(A).
rt11(void).
rt11(tree(A,B,C)) :-
        gnd(A),
        rt11(B),
        rt10(C).


:- regtype rt10/1.

rt10(A) :-
        gnd(A).
rt10(void).
rt10(tree(A,B,C)) :-
        gnd(A),
        rt11(B),
        rt10(C).


:- regtype rt9/1.

rt9(void).
rt9(tree(A,B,C)) :-
        gnd(A),
        rt11(B),
        rt10(C).


:- regtype rt4/1.

rt4(void).
rt4(tree(A,B,C)) :-
        gnd(A),
        gnd(B),
        gnd(C).


:- regtype rt8/1.

rt8(void).
rt8(tree(A,B,C)) :-
        gnd(A),
        gnd(B),
        gnd(C).