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 3476.217 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 4.001 msec.}
{written file /tmp/tmp36dCs_/add1_det_co.pl}
:- module(_1,[add/3],[assertions]).
:- entry add(A,B,C)
: ground(B).
:- true pred add(A,B,C)
: ( native_props:mshare([[A],[A,C],[C]]), ground([B]), term(A), gnd(B), term(C) )
=> ( native_props:mshare([[A,C]]), ground([B]), term(A), rt6(B), term(C) )
+ ( is_det, mut_exclusive ).
add(X,0,Y) :-
!,
eq(X,Y).
add(X,Y,s(Z)) :-
p(Y,P),
add(X,P,Z).
:- true pred p(_1,X)
: ( native_props:mshare([[X]]), var(X), ground([_1]), gnd(_1), term(X) )
=> ( ground([_1,X]), rt4(_1), gnd(X) )
+ ( is_det, mut_exclusive ).
p(0,0).
p(s(X),X).
:- 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 rt7/1.
rt7(0).
rt7(A) :-
gnd(A).
rt7(s(A)) :-
rt7(A).
:- regtype rt6/1.
rt6(0).
rt6(s(A)) :-
rt7(A).
:- regtype rt4/1.
rt4(0).
rt4(s(A)) :-
gnd(A).