:- module( _, [exp/2], [assertions , regtypes , basicmodes , nativeprops] ).

exp([[num(int(_1)),num(int(A))]],[num(int(1))]) :-
        A>=0,
        A=<0 .
exp([[num(int(A)),num(int(B))]],[num(int(C))]) :-
        B>=0,
        B>0,
        C is 1*A,
        D is B+ -1,
        D=<0 .
exp([[num(int(A)),num(int(B))]],[C]) :-
        B>=0,
        B>0,
        D is 1*A,
        E is B+ -1,
        E>0,
        F is D*A,
        G is E+ -1,
        execute_notrace_1(A,B,F,G,_1,_2,_3,_4,_5,C,_6) .
exp([[num(int(_1)),num(int(A))]],[refE(loc(1))]) :-
        A<0 .

execute_notrace_1(_1,_2,A,B,[],_3,_4,_5,_6,num(int(A)),[]) :-
        B=<0 .
execute_notrace_1(A,B,C,D,E,F,G,H,I,J,K) :-
        D>0,
        L is C*A,
        M is D+ -1,
        execute_notrace_1(A,B,L,M,E,F,G,H,I,J,K) .


