Hi Discourse,
I am very much satisfied with recent qcompiling functions.
In fact I have replaced almost all qsaved states versions
with qcompile ones.
Although almost everything is file as for me,
but some qcompiled predicates expanded by term_expansion
for block macros with begin-end gets undefined which is qcompiled
by this:
?- [misc(zdd)].
However the following works around without problem.
?- qcompile(misc(zdd)).
Also does deleting the zdd.qfl file before.
I may miss something simple about qcompiling. Any help is
appreciated.
The above mentioned block macros look like this:
:- bekind(zmatrix, []).
matrix(Dim, Init) =
xargs([OutMatrix] :-
create_matrix(Dim, OutMatrix, Init)).
tr(A) = :transpose_matrix@A.
A + B = :add_matrix_matrix@A@B.
A * B = :mul_matrix_matrix@A@B.
closure(A, N) = :path_join_power_series(K)@A :- K is N.
X = `X.
:- ekind.
% ?- listing(zmatrix).
%@ zmatrix(matrix(A, C), B) :-
%@ !,
%@ create_matrix(A, B, C).
%@ zmatrix(tr(A), C) :-
%@ !,
%@ zmatrix(A, B),
%@ transpose_matrix(B, C).
%@ zmatrix(A+B, E) :-
%@ !,
%@ zmatrix(A, C),
%@ zmatrix(B, D),
%@ add_matrix_matrix(C, D, E).
%@ zmatrix(A*B, E) :-
%@ !,
%@ zmatrix(A, C),
%@ zmatrix(B, D),
%@ mul_matrix_matrix(C, D, E).
%@ zmatrix(closure(B, A), E) :-
%@ C is A,
%@ !,
%@ zmatrix(B, D),
%@ path_join_power_series(C, D, E).
%@ zmatrix(A, A) :-
%@ !.
%@
%@ true.
Kuniaki Mukai