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

:- true pred app(_1,[_2],Ys)
         : ( native_props:mshare([[Ys]]), ground([_1,_2]), rt8(_1), term(Ys), gnd(_2) )
        => ( ground([_1,Ys,_2]), rt20(_1), rt18(Ys), gnd(_2) )
         + ( is_det, mut_exclusive ).

:- true pred app(_1,_2,Ys)
         : ( native_props:mshare([[Ys]]), ground([_1,_2]), rt14(_1), rt13(_2), term(Ys) )
        => ( ground([_1,_2,Ys]), rt15(_1), rt13(_2), rt13(Ys) )
         + ( is_det, mut_exclusive ).

:- true pred app(_1,[_2],Ys)
         : ( native_props:mshare([[Ys]]), var(Ys), ground([_1,_2]), rt3(_1), term(Ys), gnd(_2) )
        => ( ground([_1,Ys,_2]), rt5(_1), rt4(Ys), gnd(_2) )
         + ( is_det, mut_exclusive ).

app([X|Xs],Ys,[X|Zs]) :-
        app(Xs,Ys,Zs).
app([],Ys,Ys).

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

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

:- true pred reverse(A,B)
         : ( native_props:mshare([[B]]), var(B), ground([A]), gnd(A), term(B) )
        => ( ground([A,B]), rt9(A), rt8(B) )
         + ( is_det, mut_exclusive ).

reverse([X|Xs],Ys) :-
        reverse(Xs,Zs),
        app(Zs,[X],Ys).
reverse([],[]).


:- regtype rt26/1.

rt26([]).
rt26([A|B]) :-
        gnd(A),
        rt26(B).


:- regtype rt25/1.

rt25([]).
rt25([A|B]) :-
        gnd(A),
        rt26(B).


:- regtype rt24/1.

rt24([]).
rt24([A|B]) :-
        gnd(A),
        rt25(B).


:- regtype rt23/1.

rt23([]).
rt23([A|B]) :-
        gnd(A),
        rt19(B).


:- regtype rt8/1.

rt8([]).
rt8([A]) :-
        gnd(A).


:- regtype rt20/1.

rt20([]).
rt20([A|B]) :-
        gnd(A),
        rt15(B).


:- regtype rt19/1.

rt19([]).
rt19([A]) :-
        gnd(A).


:- regtype rt18/1.

rt18([A|B]) :-
        gnd(A),
        rt19(B).


:- regtype rt14/1.

rt14([]).


:- regtype rt13/1.

rt13([A]) :-
        gnd(A).


:- regtype rt15/1.

rt15([]).


:- regtype rt10/1.

rt10([]).
rt10([A|B]) :-
        gnd(A),
        rt10(B).


:- regtype rt9/1.

rt9([]).
rt9([A|B]) :-
        gnd(A),
        rt10(B).


:- regtype rt3/1.

rt3([]).


:- regtype rt5/1.

rt5([]).


:- regtype rt4/1.

rt4([A]) :-
        gnd(A).