I am checking my codes on ZDD (pack library(pac)/misc/zdd.pl). Now most part of
codes are junk. However some of basic codes are still live powerful enough to
see ZDD merit, which is hard to see in the standard list operations in prolog.
The following two queries show such power, I hope.
?- numlist(1,10000, Ns), numlist(10, 10000, Ms),
time(zdd(( F=pow(Ns), G=pow(Ms), S=(F-G), card(S, C)))).
1,104,164 inferences, 0.084 CPU in 0.099 seconds (85% CPU, 13151229 Lips)
?- numlist(1, 16, R), time(zdd((X=pow(R), Y=pow(R), Z=X**Y, card(Z, C)))).
132,399,262 inferences, 9.834 CPU in 9.892 seconds (99% CPU, 13463357 Lips)
C = 1048561 .
Some basic operations used in this queries.
X + Y : union of X and Y.
X * Y : intersection of X and Y.
X - Y : subtraction of X from Y.
merge(X, Y): merge of X and Y.
merge(X, Y) = {C | C is the union of A and B for some A in X and B in Y}
X ** Y : product of X and Y.
X**Y = { P | P is the cartension product B and C for some B in X and C in Y}
pow(A) : power set of A: The set of subsets of A.
I have no information on recent status on ZDD, but I have resumed enjoying zdd
programming. (Prolog progrmming is still one of my hobby.) More than one year ago, a
young friend of mine on computer science gave me a warning on how powerful
Minato’s ZDD program is, showing me a demo site on ZDD with his iPad, which
overwhelmed me enough at that moment. But still I keep my interest in ZDD
programming, because, IMHO, zero-suppress rule of ZDD is a natural
implementation of the axiom of extentionality of the set theory. This simple
view has been very useful for me to write and check correctness of my codes on ZDD.
Kuniaki Mukai