Name: q/1
Name: p/2
Name: test/1
ap(XX,YY) :- append(X,Y,[1,3,2]), sort(X,XX), sort(Y,YY).
Calls:
Name: sort/2
Name: append/3
Block: bl(-,?) bl(?,-)
bl(X,Y) :- (X=Y -> print(eq_bl(X,Y)),nl,fail ; print(neq_bl(X,Y))),nl.
Name: nl
Name: print/1
Name: fail
Name: =/2
Name: ->/3
Called:
Name: tbl/2
call_other_module(X) :- empty_avl(E), avl_store(a,E,1,X).
Name: avl_store/4
Name: empty_avl/1
ex(A,B) :- A=..[_|AA], length(AA,L), ex2(L,B).
Name: ex2/2
Name: length/2
Name: =../2
ex2(0,R) :- !,R=null. ex2(N,N).
Name: !
Name: ex/2
ift(A,B) :- (A==B -> print(eq(A,B)) ; print(neq(A,B))),nl, if(member(A,[a,b,c]), print(mem1(A)) , print(not_mem1(A))),nl, (A==B -> print(eq(A,B)) ; print(neq(A,B))),nl, (member(A,[a,b,c]) -> print(mem2(A)) ; print(not_mem2(A))),nl.
Name: member/2
Name: ==/2
Name: if/3
Block: myapp(-,?,-)
myapp([],X,X). myapp([H|X],Y,[H|Z]) :- myapp(X,Y,Z).
Name: RECURSIVE_CALL/3
Name: twomyapp/1
mymem(X,[X|_]). mymem(X,[_|T]) :- mymem(X,T).
Name: RECURSIVE_CALL/2
Name: protect/2
myop(mypred). myop(mypred2). myop(mypred3).
Name: test_univ_call/2
mypred(0,100). mypred(1,110).
mypred2(2,120).
mypred3(3,130).
p(a,X) :- s(X). p(b,X) :- t(X). p(X,Y) :- number(X), Y is X*X. p(c,c). p(d,e).
Name: is/2
Name: number/1
Name: t/1
Name: s/1
print_code([]). print_code([H|T]) :- portray_clause(H), print_code(T).
Name: RECURSIVE_CALL/1
Name: portray_clause/1
Name: test_ex/2
Name: test_if/2
Name: test_bl/1
protect(X,R) :- (mymem(Y,X) -> print(mem(Y,X)),R=mem(Y) ; print(not_mem(_,X)),R=not_mem), nl.
Name: mymem/2
q(X) :- p(X,X).
s(a). s(b). s(a). s(b).
t(c).
tbl(X,Y) :- if(bl(X,Y),print(neq_tbl(X,Y)),print(eq_tbl(X,Y))),nl.
Name: bl/2
test(X) :- nl,pe(p(X,X),R), print(p_code(R)), member((test_pe:p(X,X):-B),R),call(B).
Name: call/1
Name: pe/2
test_ap(X,Y) :- nl,pe(ap(X,Y),R), print(ap_code(R)),nl, member((test_pe:ap(X,Y):-B),R),call(B).
test_bl(X) :- nl,nl, pe(tbl(_XX,b),R), print_code(R), member((test_pe:tbl(X,b):-B),R),call(B).
Name: print_code/1
test_ex(X,Y) :- nl,pe(ex(_,_),R), print_code(R),nl, member((test_pe:ex(X,Y):-B),R),call(B).
test_if(X,Y) :- nl,nl, pe(ift(X,Y),R), print_code(R), member((test_pe:ift(X,Y):-B),R),call(B).
test_memo(X) :- nl,nl, partially_evaluate_and_load(twomyapp(X),C), call(C), clear_specialized_code.
Name: clear_specialized_code
Name: partially_evaluate_and_load/2
test_protect(X,R) :- nl,nl, partially_evaluate_and_load(protect(X,R),C), call(C), clear_specialized_code.
test_univ_call(Arg,Y) :- myop(F), X=..[F,Arg,Y], call(X).
Name: myop/1
twomyapp(X) :- (myapp(X,[a],R1) -> myapp(X,[a],R2) ; R1=[],R2=[]), print(res(R1,R2)),nl.
Name: myapp/3