I have updated package pac to 1.6.5. The log below should be reproduced.
Sample queries of path counting for rectangle grid graphs in library(pac(zdd/‘minato-2r’)) may take long time. For example rect(7, 7) for 8x8 grids takes about 30 seconds. The usual prolog programming with list of visited nodes, I gues, does not terminate for the query in reasonable number of days ! However, the current ZDD of mine is surely still a toy level. It might be time for me to ask true experts on ZDD for help.
% swipl
?- pack_install(pac).
?- use_module(library(pac)).
?- use_module(util('ptq-fragment')).
?- module(ptqfrag).
ptqfrag: ?- run_samples.
ptq(s,[john,is,a,man],[man(j),find(j,j)]).
Ans = true.
ptq(s,[every,man,is,john],[man(j),find(j,j)]).
Ans = true.
ptq(s,[every,man,is,john],[man(j),man(k)]).
Ans = false.
ptq(s,[every,man,finds,every,man],[man(j),man(k),find(j,j)]).
Ans = false.
ptq(pn,[john],[]).
Ans = [j].
ptq(np,[a,unicorn],[male(j),male(b),female(m),unicorn(u),find(m,u),walk(j),walk(b),walk(m)]).
Ans = [[b,j,m,u],[b,j,u],[b,m,u],[b,u],[j,m,u],[j,u],[m,u],[u]].
ptq(s,[a,unicorn,walks],[male(j),male(b),female(m),unicorn(u),find(m,u),walk(j),walk(b),walk(m)]).
Ans = false.
ptq(vp,[find,a,unicorn],[male(j),male(b),female(m),unicorn(u),find(m,u),walk(j),walk(b),walk(m)]).
Ans = [m].
ptq(s,[john,finds,a,unicorn],[male(j),male(b),female(m),unicorn(u),find(m,u),walk(j),walk(b),walk(m)]).
Ans = false.
ptq(tv,[find],[man(a),find(j,a),walk(j)]).
Ans = [j-a].
ptq(itv,[walk],[man(a),find(j,a),walk(j)]).
Ans = [j].
ptq(vp,[find,a,unicorn],[unicorn(a),find(j,a),walk(j)]).
Ans = [j].
ptq(s,[john,walks],[man(a),find(j,a),walk(j)]).
Ans = true.
ptq(s,[every,man,walks],[man(a),find(j,a),walk(j)]).
Ans = false.
ptq(s,[every,man,walks],[man(j),find(j,a),walk(j)]).
Ans = true.
true.
ptqfrag: ?- use_module(util('pac-test')).
ptqfrag: ?- module(pac_test).
pac_test: ?- test.
math:nCr(100, 50, A) ==> 100891344545564193334812497256.
Sum=sum(0), for( 1 - 100, pred(Sum, [I]:- ( arg(1, Sum, S), Si is S+I, setarg(1, Sum, Si)))) ==> sum(5050).
test done.
true.
pac_test: ?- use_module(zdd('minato-r2')).
pac_test: ?- module(minato_r2).
minato_r2: ?- time(test(rect(5,5), C)).
% 16,798,943 inferences, 1.074 CPU in 1.079 seconds (100% CPU, 15638314 Lips)
C = 1262816.