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/tmpRzpdvv/star2.pl
}
{loaded in 3500.218 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 8.0 msec.}
{written file /tmp/tmpRzpdvv/star2_det_co.pl}
:- module(_1,[star/2],[assertions]).

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

:- true pred star(A,B)
         : ( ground([A,B]), gnd(A), gnd(B) )
        => ( ground([A,B]), gnd(A), rt16(B) )
         + ( is_det, mut_exclusive ).

:- true pred star([_1|_2],B)
         : ( ground([B,_1,_2]), gnd(B), gnd(_1), rt5(_2) )
        => ( ground([B,_1,_2]), rt11(B), gnd(_1), rt5(_2) )
         + ( is_det, mut_exclusive ).

star(_1,[]).
star([X|U],[X|W]) :-
        app(U,V,W),
        star([X|U],W).

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

app([],L,L).
app([X|L],M,[X|N]) :-
        app(L,M,N).


:- regtype rt18/1.

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


:- regtype rt17/1.

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


:- regtype rt16/1.

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


:- regtype rt6/1.

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


:- regtype rt5/1.

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


:- regtype rt12/1.

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


:- regtype rt11/1.

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