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

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

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

:- true pred p(A,g(_1))
         : ( native_props:mshare([[_1]]), ground([A]), gnd(A), term(_1) )
        => ( ground([A,_1]), gnd(A), gnd(_1) )
         + ( is_det, mut_exclusive ).

p(X,g(X)).
p(X,f(Y)) :-
        p(X,g(Y)).


:- regtype rt2/1.

rt2(f(A)) :-
        gnd(A).
rt2(g(A)) :-
        gnd(A).